Detail - Setting

Setting Host or Servicecheck states

[6.7.2 and above] You can choose hosts or services using the same URL parameters as the status API

Input:

{
 "notifications": { "enabled": 0 }
}

Output:

{"success": "1"}

Possible input values for host:

{ 
 "active_checks": { 
  "host_enabled": 0, // or 1
  "services_enabled": 1 // or 0
 },
 "passive_checks": {
  "enabled": 0, // or 1
 },
 "set_state": {
  "result": 0, // 0=UP, 1=DOWN, 2=UNREACHABLE
  "output": "Plugin output|time=9", // Must be set not empty. Add perfdata after pipe symbol
 },
 "notifications": {
  "host_enabled": 0, // or 1
  "services_enabled": 0, // or 1
 },
 "event_handler": {
  "enabled": 0, // or 1
 },
 "flap_detection": {
  "enabled": 0, // or 1
 },
 "recheck": {
  "check_host": 0,       // or 1. If both are 0, then nothing is sent to the Orchestrator
  "check_services": 0, // or 1
  "time" : 1234567890, // Epoch seconds. Default now
 }
}

[6.7.2 and above] Possible input for services:

{ 
 "active_checks": { 
  "enabled": 0, // or 1
 },
 "passive_checks": {
  "enabled": 0, // or 1
 },
 "set_state": {
  "result": 0, // 0=OK, 1=WARNING, 2=CRITICAL, 3=UNKNOWN
  "output": "Plugin output|time=9", // Must be set not empty. Add perfdata after pipe symbol
 },
 "notifications": {
  "enabled": 0, // or 1
 },
 "event_handler": {
  "enabled": 0, // or 1
 },
 "flap_detection": {
  "enabled": 0, // or 1
 },
 "recheck": {
   "time" : 1234567890, // Epoch seconds. Default now
 }
}

You can also set some input using parameters.

Valid parameters for hosts:

  • active_checks::host_enabled
  • active_checks::services_enabled
  • passive_checks::enabled
  • notifications::host_enabled
  • notifications::services_enabled
  • event_handler::enabled
  • flap_detection::enabled

Valid parameters for services:

  • active_checks::enabled
  • passive_checks::enabled
  • notifications::enabled
  • event_handler::enabled
  • flap_detection::enabled