Status - Host Summary

Request URL: /rest/status/host

URL parameters:

Example output for /rest/status/host?host=opcollector&host=opsview:

    {
       "list" : [
          {
             "alias" : "Collector",          // Host alias (host description)
             "cstatus" : "1",                // When 'include_cluster_health=1'. Only set if value > 0
                                              //  not set = host has no cluster health problem (no icon)
                                              //  1 = host's monitored_by is degraded, (gray warning)
                                              //  2 = host's monitored_by is offline (gray failure)
                                              //  3 = host is a collector and is degraded, (yellow warning)
                                              //  4 = host is a collector and is offline (red failure)
             "current_check_attempt" : "0",  // Current check attempt for host
             "downtime" : "0",               // 0=no downtime, 1=downtime in future, 2=downtime currently
             "icon" : "opsview",             // Short name for the host icon
             "last_check" : "0",             // Time of the last check for the host
             "max_check_attempts" : "0",     // Maximum check attempts for host
             "monitored_by_name" : "Master", // When ?include_monitored_by=1. Name of monitoring cluster
             "monitored_by" : "1",           // When ?include_monitored_by=1. ID number of monitoring cluster
             "name" : "opcollector",         // Host name
             "num_interfaces" : "0",         // Number of interfaces as defined in host edit snmp tab
             "num_services" : "6",           // Total number of services on this host. Note, a user may not be able to see all services due to permissions
             "output" : "Dummy output",      // Text from plugin output
             "state" : "up",                 // Current state of host. Possible values: up, down, unreachable
             "state_duration" : 12345,       // Time in seconds since the last state change
             "state_type" : "soft",          // State type. Possible values: soft, hard
             "summary" : {                   // Summarised information of all services on this host. Note, states with no services in this state will not appear
                "critical" : {
                   "unhandled" : "1"
                },
                "handled" : "1",
                "ok" : {
                   "handled" : "1"
                },
                "total" : "2",
                "unhandled" : "1"
             },
             "unhandled" : "0"
          },
          {
             "alias" : "Opsview Master Server",
             "comments" : "1",
             "current_check_attempt" : "0",
             "downtime" : "0",
             "icon" : "opsview",
             "last_check" : "0",
             "max_check_attempts"  : "0",
             "monitored_by_name" : "Master",        // When ?include_monitored_by=1. Name of monitoring cluster
             "monitored_by" : "1",                  // When ?include_monitored_by=1. ID number of monitoring cluster
             "name" : "opsview",
             "num_interfaces" : "0",
             "num_services" : "6",
             "output" : "Dummy output",
             "state" : "up",
             "state_duration" : 12345,
             "state_type" : "soft",
             "summary" : {
                "critical" : {
                   "unhandled" : "1"
                },
                "handled" : "1",
                "ok" : {
                   "handled" : "1"
                },
                "total" : "2",
                "unhandled" : "1"
             },
             "unhandled" : "0"
          }
       ],
       "summary" : {
          "handled" : "4",
          "host" : {
             "handled" : "2",
             "total" : "2",
             "unhandled" : "0",
             "up" : "2"
          },
          "service" : {
             "critical" : "2",
             "handled" : "2",
             "ok" : "2",
             "total" : "4",
             "unhandled" : "2"
          },
          "total" : "6",
          "unhandled" : "2",
          "last_reload_time" : "1234567890",   // Last time of reload
       }
    }

Where:

The status of the monitored_by server can be determined from cstatus:

Note

The following attributes will only be returned if true. If the attribute does not exist, you can assume that the values are 0:
["Opsview On-premises"] ["API", "Technical Reference"]

Was this topic helpful?