Status - Service List

Request URL: /rest/status/service

The URL parameters includes the service object filtering parameters. These are also available:

Example output Copied

Note

The host portion could have two additional keys regarding Monitoring Collector and/or Cluster health. See Host Summary for more details.
    {
       "list" : [
          {
             "alias" : "Opsview Master Server",    // Host description
             "comments" : "1",
             "current_check_attempt" : "0",
             "downtime" : "0",
             "hostgroup" : "US Data Centre",       // Host group for the host
             "icon" : "opsview",
             "ip" : "10.10.10.10",                 // Network address for the host
             "last_check" : "1970-01-01 00:00:00",
             "max_check_attempts" : "0",
             "name" : "opsview",
             "num_interfaces" : "0",
             "num_services" : "6",
             "output" : "Dummy output",
             "services" : [
                {
                   "current_check_attempt" : "1",
                   "downtime" : "0",
                   "last_check" : "2011-01-16 22:51:29",
                   "markdown" : "0",
                   "max_check_attempts" : "3",
                   "name" : "Collector-node: opcollector",
                   "output" : "collector-node check with fake results",
                   "perfdata_available" : "1",
                   "service_object_id" : "219",
                   "state" : "ok",
                   "state_type" : "hard",
                   "state_duration" : "9296782",
                   "unhandled" : "0"
                },
                {
                   "current_check_attempt" : "1",
                   "downtime" : "0",
                   "last_check" : "2011-01-16 22:52:34",
                   "markdown" : "0",
                   "max_check_attempts" : "3",
                   "name" : "Collector-node: opcollectorclusterA",
                   "output" : "collector-node opcollectorclusterA check with fake results",
                   "perfdata_available" : "1",
                   "service_object_id" : "220",
                   "state" : "critical",
                   "state_type" : "soft",
                   "state_duration" : "9296717",
                   "unhandled" : "1"
                }
             ],
             "state" : "up",
             "state_type" : "hard",
             "state_duration" : "1304515071",
             "summary" : {
                "critical" : "1",
                "handled" : "1",
                "computed_state" : "critical",
                "ok" : "1",
                "total" : "2",
                "unhandled" : "1"
             },
             "unhandled" : "0"
          }
       ],
       "summary" : {
          "handled" : "2",
          "host" : {
             "handled" : "1",
             "total" : "1",
             "unhandled" : "0",
             "up" : "1"
          },
          "service" : {
             "critical" : "1",
             "handled" : "1",
             "ok" : "1",
             "total" : "2",
             "unhandled" : "1"
          },
          "total" : "3",
          "unhandled" : "1"
       }
    }

The following attributes will only be returned if true for a host or service. If the attribute does not exist, you can assume that the values are 0:

Note

The format of the last_check field has changed to being epoch seconds. To have the old behaviour, use the URL parameter of format_datetime=1.
["Opsview On-premises"] ["API", "Technical Reference"]

Was this topic helpful?