Hey! These docs are for version 6.3, which is no longer officially supported. Click here for the latest version, 6.7!

Using the detail endpoint to retrieve information

You can choose hosts or services using the same URL parameters as the status API

The endpoint will return data similar to the following:

 "object": {
  "hostname": "opsview",
  "servicename": "HTTP",              // Does not exist for host detail
  "state": "UP",                      // Possible values: 
                                      //   For host: UP, DOWN, UNREACHABLE. 
                                      //   For Service: OK, WARNING, CRITICAL, UNKNOWN
  "alias": "host description",        // Host description
  "ip": "localhost",                  // IP field for the host
  "state_duration": 1880,             // number of seconds
  "output": "OK - localhost: rta 0.0.29ms lost 0%", // Text to display. Maybe long so needs to wrap. Max 16K
  "perfdata": "rta=0.0.29ms;500.000;1000.000", // Text. Maybe long so needs to wrap. Max 16K
  "current_attempt": 1,               // Number
  "max_attempts": 2,                  // Number. Always lower than current_attempt
  "state_type": 0,                    // 0=soft, 1=hard
  "last_check": 1234567890,           // epoch seconds. 0 = not been checked
  "monitored_by": "Collector",          // Name of monitoring cluster. Could be null if monitoring collector is deleted
  "check_type": 1,                    // Options: 1 = Active Plugin, 2 = Passive, 4 = SNMP Trap, 5 = SNMP Polling. Could be null to be unknown
  "latency": 0.000,
  "duration": 0.003,
  "next_check_expected": 1234567890,  // epoch seconds. If 0, not known
  "last_state_change": 1234567890,    // epoch seconds
  "acknowledged": 0,                  // 0=no, 1=yes. If host or service is acknowledged
  "is_flapping": 1,                      // 0=no, 1=yes
  "in_downtime": 0,                   // 0=no, 1=yes
  "status_update_time": 1234567890,   // epoch seconds. When the last result was received
  "active_checks": 1,                 // 0=no, 1=yes. If active checks enabled
  "active_checks_services_enabled": 9 // Number of services with active checks enabled on this host. Not present for services
  "passive_checks": 0,                // 0=no, 1=yes. If passive checks enabled
  "notifications": 1,                 // 0=no, 1=yes. If notifications enabled
  "notifications_services_enabled": 7 // Number of services with notifications enabled on this host. Not present for services
  "event_handler": 1,                 // 0=no, 1=yes. If event handler enabled
  "flap_detection": 1,                // 0=no, 1=yes. If flap detection enabled
  "can_testservicecheck": 1,          // Tells front end if this service is testable. Will not exist if not. Not present for hosts
  "num_interfaces": 3,                // Number of interfaces on this host. Not present for services
  "total_services": 9,                // Number of services on this host
  "perfdata_available": 1,            // 0=no, 1=yes. If performance data is available for this service. Not present for hosts
  "unhandled": 0,                     // 1=unhandled, 0=handled. Not present for hosts

Note: last_notification and notification_number is removed in 6.0 as this is no longer stored at the object level.