Retrieving situation status information

These examples show how to retrieve situation status information. You can retrieve information about current statuses, or you can retrieve a history of the statuses.

You can filter your results by including certain situation status attributes in the request. For more information, see Filter results by attributes.

Note: A request to a remote monitoring server (RTEMS) returns information about situation statuses from the remote monitoring server. When a query is sent to the hub monitoring server (hub TEMS), it returns information about both the hub TEMS and the RTEMS.

Request current situation statuses

Current situation status attributes collect status information on situations and policies that are running.

To retrieve current situation status information, use the GET /situations/status endpoint, as follows:
  • Use the following path to request the current status of all defined situations:
    https://host:port/api/v1/situations/status
    The result of this request is a list of current statuses for all defined situations.
  • To request the status of a specific situation, include the name parameter, set to the unique identifier given to the situation or policy:
    https://host:port/api/v1/situations/status?name=situation_name
    The result of this request is only the status for the specified situation. By default, the results for the situation are not included in the response.
    To retrieve the results for a situation status, include the includeResults parameter, set to true:
    https://host:port/api/v1/situations/status?name=situation_name&includeResults=true
  • You can also filter the results by various attributes, as shown in the following examples:
    https://host:port/api/v1/situations/status?node=node_name
    https://host:port/api/v1/situations/status?originnode=origin_node_name
    https://host:port/api/v1/situations/status?atomize=display_item
    https://host:port/api/v1/situations/status?deltastat=situation_status
    You can combine the attribute query parameters in a single request as needed. For more information, see Filter results by attributes.

Request situation status history

To retrieve situation status history, use the GET /situations/status/history endpoint.

When using this endpoint, you must specify the time from when to retrieve the history by including the required time value query parameter timeFrom and the optional parameter timeTill. For more information about using the time value parameters, see Using time values for requests.

The following examples show how to retrieve situation status history:

  • Use the following path to request the status history of all defined situations since a certain time:
    https://host:port/api/v1/situations/status/history?timeFrom=YYYMMDDHHMMSS
    The result of this request is a list of status history for all defined situations from the time specified.
    To include an end time, also include the timeTill parameter in the request:
    https://host:port/api/v1/situations/status/history?timeFrom=YYYMMDDHHMMSS&timeTill=YYYMMDDHHMMSS
  • To request the status history for a specific situation, include the name parameter, set to the unique identifier given to the situation or policy:
    https://host:port/api/v1/situations/status/history?name=situation_name&timeFrom=YYYMMDDHHMMSS
    The result of this request is the status history for the specified situation. By default, the results for the situation are not included in the response.
    To retrieve the results for a situation status, include the includeResults parameter, set to true:
    https://host:port/api/v1/situations/status/history?name=situation_name&timeFrom=YYYMMDDHHMMSS&includeResults=true
  • You can also filter the results by various attributes, as shown in the following examples:
    https://host:port/api/v1/situations/status/history?timeFrom=YYYMMDDHHMMSS&node=node_name
    https://host:port/api/v1/situations/status/history?timeFrom=YYYMMDDHHMMSS&originnode=origin_node_name
    https://host:port/api/v1/situations/status/history?timeFrom=YYYMMDDHHMMSS&atomize=display_item
    https://host:port/api/v1/situations/status/history?timeFrom=YYYMMDDHHMMSS&deltastat=situation_status
    You can combine the attribute query parameters in a single request as needed. For more information, see Filter results by attributes.

Filter results by attributes

When requesting situation status information using GET /situations/status or GET /situations/status/history, you can filter the results by available attributes that you specify using query parameters.

The following table describes the query parameters for the attributes that you can use to filter your request and also provides a relevant location for the attribute in the Tivoli Enterprise Portal (TEP):
Table 1. Attributes eligible for situation status filtering
Parameter Description Location in TEP
name Situation name. The unique identifier given to the situation or policy. Message Log view, Name field
node Node. The name of the managed system where the situation is distributed and monitored. Use /system/nodes to get information about all nodes on the system. Message Log view, Node field
originnode Origin node. The name of the managed system where the situation was triggered. Use /system/nodes to get information about all nodes on the system. Message Log view, Origin Node field
atomize Display Item. For multiple-row attribute groups, this attribute enables the situation to continue to test all rows in the data sampling and open events.

Only columns from tables that are specified in the main formula and are eligible for ATOMIZE are processed.

For example, the following specification requests that only the columns from table REALTHDA that are eligible for ATOMIZE are included in the results:
atomize="REALTHDA.TDIDPLAN"
Tip: You can use the GET /system/tables?name=REALTHDA endpoint to identify columns that are eligible for ATOMIZE, as indicated by "ATOMIZE": true.
Message Log view, Display Item field
deltastat Situation status. The possible values are as follows:
A
Acknowledged. The situation event has been acknowledged.
D
Deleted. The situation has been deleted.
X
Problem. The situation is in a problem state.
F
Expired. The acknowledgment has expired and the situation is still true.
Y
Open. The situation is running and is true.
N
Closed. The situation is running, has been true, and is now false.
E
Reopened. The acknowledgment was removed before it had expired and the situation is still true.
L
(Current situation status only) Started. The situation has been started.
S
(Situation status history only) Started. The situation was started.
P
Stopped. The situation has been stopped.
Message Log view, Status field