Nodes/{name}/health/states: GET

Gets details about system health states for the node or nodes of node class.

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The GET nodes/nodeName/health/states request gets information about the system health states of the specified node or node class. For more information about the fields in the data structures that are returned, see the topics mmhealth command and mmces command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/nodes/nodeName/health/states
where
nodes/nodeName
Specifies the node about which you want to get information. Required.
health/states
Specifies that you need to get the details of the system health state of the node. Required.

Request headers

Content-Type: application/json
Accept: application/json

Request parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of request parameters
Parameter name Description and applicable keywords Required/optional
fields Comma separated list of fields to be included in response. ':all:' selects all available fields. Optional.
filter Filter objects by expression. For example, 'status=HEALTHY,entityType=FILESET' Optional.
name Name of the node. Required.

Request data

No request data.

Response data

{
    "status": {
      "code":ReturnCode",
      "message":"ReturnMessage"
     },
    "paging": 
     {
     "next": "URL"
     },
   events: [
      {
         "oid":"ID",
         "component":"Component",
         "reportingnode":" Node Name",
         "type":" {TIP | STATE_CHANGE | NOTICE}",
         "activeSince":"Time",
         "name":"Event Name",
         "message":"Message",
         "entityType":"Entity Type",
         "entityName":" Name",
         "userAction":" Action",
         "description":" Description",
         "state":"Event State",
         "severity":"Severiy",
         "parentName":"Name",
      }
   ],
}
For more information about the fields in the following data structures, see the links at the end of this topic.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.
"paging"
The URL to retrieve the next page. Paging is enabled when more than 1000 objects are returned by the query.
"events":
An array of elements that describe the system health event. Each element describes one node.
"oid":"ID
The internal unique ID of the event.
"component":"Component
The component to which the event belongs.
"reportingnode":" Node Name
The node in which the event is reported.
"type":" {TIP | STATE_CHANGE | NOTICE}
Specifies the event type.
"activeSince":"Time
The time at which the event occurred.
"name":"Event Name
The name of the event.
"message":"Message
The event message.
"entityType":"Entity Type
The type of the entity for which the event occurred.
"entityName":" Name
The name of the entity for which the event occurred.
"userAction":" Action
The user action that is required to resolve the event.
"description":" Description
Description of the event.
"state":"Event State
The state of the event.
"severity":"Severiy
Severity of the event.
"parentName":"Name
Name of the parent event to which this event belongs.

Examples

The following example gets information about the events reported in the node testnode1-d.localnet.com.

Request URL:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 
'https://198.51.100.1:443/scalemgmt/v2/node/testnode1-d.localnet.com/health/states
Response data:
Note: In the JSON data that is returned, the return code indicates whether the command is successful. The response code 200 indicates that the command successfully retrieved the information. Error code 400 represents an invalid request and 500 represents internal server error.
{
  "states" : [ {
    "activeSince" : "2017-03-02 15:21:57,431",
    "component" : "THRESHOLD",
    "entityName" : "mari-11.localnet.com",
    "entityType" : "NODE",
    "oid" : 4,
    "reportingNode" : "mari-11.localnet.com",
    "state" : "HEALTHY"
  }, {
    "activeSince" : "2017-03-02 15:21:58,284",
    "component" : "NETWORK",
    "entityName" : "mari-11.localnet.com",
    "entityType" : "NODE",
    "oid" : 5,
    "reportingNode" : "mari-11.localnet.com",
    "state" : "HEALTHY"
  }, {
    "activeSince" : "2017-03-02 15:24:57,143",
    "component" : "PERFMON",
    "entityName" : "mari-11.localnet.com",
    "entityType" : "NODE",
    "oid" : 6,
    "reportingNode" : "mari-11.localnet.com",
    "state" : "HEALTHY"
  }, {
    "activeSince" : "2017-03-02 15:21:58,284",
    "component" : "NETWORK",
    "entityName" : "eth0",
    "entityType" : "NIC",
    "oid" : 9,
    "parentName" : "mari-11.localnet.com",
    "reportingNode" : "mari-11.localnet.com",
    "state" : "HEALTHY"
  }
  ],
  "status" : {
    "code" : 200,
    "message" : "The request finished successfully"
  }
}