Status

Hosts

GET /v2/status/hosts

Returns all hosts.

Return type:list(LiveHost)
POST /v2/status/hosts

Given a LiveQuery, returns all matching hosts. :type query: LiveQuery

Return type:list(LiveHost)
GET /v2/status/hosts/(host_name)

Returns a specific host.

Return type:LiveHost
GET /v2/status/hosts/(host_name)/config

Returns config from a specific host.

POST /v2/status/hosts/(host_name)/results

Submit a new check result.

Parameters:
  • data (CheckResult) – a check result within the request body.
GET /v2/status/hosts/(host_name)/metrics

Returns all metrics name for a host.

Return type:list(LiveMetric)
GET /v2/status/hosts/(host_name)/metrics/(metric_name)

Return the last measure for the metric name

of the service name on the host name

Return type:LiveMetric
POST /v2/status/hosts/(host_name)/metrics/(metric_name)

Given a time delta, returns all matching metrics.

Parameters:
  • time (TimeDelta) – a time delta within the request body.
Return type:

list(LiveMetric)

POST /v2/status/hosts/(host_name)/services/(service_description)/results

Submit a new check result.

Parameters:
  • data (CheckResult) – a check result within the request body.
GET /v2/status/hosts/(host_name)/services/(service_description)/metrics

Returns all metrics name for a host with a service.

Return type:list(LiveMetric)
GET /v2/status/hosts/(host_name)/services/(service_description)/metrics/(metric_name)

Return the last measure for the metric name

of the service name on the host name.

Return type:LiveMetric
POST /v2/status/hosts/(host_name)/services/(service_description)/metrics/(metric_name)

Returns all matching metrics.

Parameters:
  • time (TimeDelta) – a time delta within the request body.
Return type:

list(LiveMetric)

GET /v2/status/hosts/(host_name)/events

Returns all events from a specific host.

GET /v2/status/hosts/(host_name)/events/acknowledgements

Returns all acks from a specific host.

GET /v2/status/hosts/(host_name)/events/comments

Returns all comments from a specific host.

GET /v2/status/hosts/(host_name)/events/downtimes

Returns all downtimes from a specific host.

GET /v2/status/hosts/(host_name)/events/notifications

Returns all notifications from a specific host.

Services

GET /v2/status/services

Returns all services.

Return type:list(LiveService)
POST /v2/status/services

Given a LiveQuery, returns all matching services. :type query: LiveQuery

Return type:list(LiveService)

types documentation

type LiveService

Data samples:

Json
{
    "acknowledged": true, 
    "description": "Serves Stuff", 
    "host_name": "Webserver", 
    "last_check": 1429220785, 
    "last_state_change": 1429220785.481679, 
    "long_output": "Serves /var/www/\nServes /home/webserver/www/", 
    "plugin_output": "HTTP OK - GOT NICE RESPONSE", 
    "service_description": "Apache", 
    "state": "OK"
}
XML
<value>
  <host_name>Webserver</host_name>
  <service_description>Apache</service_description>
  <description>Serves Stuff</description>
  <state>OK</state>
  <acknowledged>true</acknowledged>
  <last_check>1429220785</last_check>
  <last_state_change>1429220785.48</last_state_change>
  <plugin_output>HTTP OK - GOT NICE RESPONSE</plugin_output>
  <long_output>Serves /var/www/
Serves /home/webserver/www/</long_output>
</value>
acknowledged
Type:bool

Wether or not the problem, if any, has been acknowledged

description
Type:unicode

The description of the sevice

host_name
Type:unicode

The host for the service

last_check
Type:int

The last time the service was checked

last_state_change
Type:float

The last time the state has changed

long_output
Type:unicode

Plugin long output of the last check

plugin_output
Type:unicode

Plugin output of the last check

service_description
Type:unicode

The name of the service

state
Type:unicode

The current state of the service

type LiveHost

Data samples:

Json
{
    "acknowledged": true, 
    "address": "127.0.0.1", 
    "childs": [
        "surveil.com"
    ], 
    "description": "Very Nice Host", 
    "host_name": "CoolHost", 
    "last_check": 1429220785, 
    "last_state_change": 1429220785, 
    "long_output": "The ping was great\nI love epic ping-pong games", 
    "parents": [
        "parent.com"
    ], 
    "plugin_output": "PING OK - Packet loss = 0%, RTA = 0.02 ms", 
    "services": [
        "load", 
        "cpu", 
        "disk_usage"
    ], 
    "state": "OK"
}
XML
<value>
  <host_name>CoolHost</host_name>
  <address>127.0.0.1</address>
  <childs>
    <item>surveil.com</item>
  </childs>
  <parents>
    <item>parent.com</item>
  </parents>
  <description>Very Nice Host</description>
  <state>OK</state>
  <acknowledged>true</acknowledged>
  <last_check>1429220785</last_check>
  <last_state_change>1429220785</last_state_change>
  <plugin_output>PING OK - Packet loss = 0%, RTA = 0.02 ms</plugin_output>
  <long_output>The ping was great
I love epic ping-pong games</long_output>
  <services>
    <item>load</item>
    <item>cpu</item>
    <item>disk_usage</item>
  </services>
</value>
acknowledged
Type:bool

Wether or not the problem, if any, has been acknowledged

address
Type:unicode

The address of the host

childs
Type:list(unicode)

The childs of the host

description
Type:unicode

The description of the host

host_name
Type:unicode

The name of the host

last_check
Type:int

The last time the host was checked

last_state_change
Type:int

The last time the state has changed

long_output
Type:unicode

Plugin long output of the last check

parents
Type:list(unicode)

The parents of the host

plugin_output
Type:unicode

Plugin output of the last check

services
Type:list(unicode)

The services of the host

state
Type:unicode

The current state of the host

type LiveQuery

Holds a sample query encoded in json.

Data samples:

Json
{
    "fields": [
        "host_name", 
        "last_check"
    ], 
    "filters": "{\"isnot\": {\"state\": [\"0\", \"1\"], \"host_state\": [\"2\"]}}"
}
XML
<value>
  <filters>{"isnot": {"state": ["0", "1"], "host_state": ["2"]}}</filters>
  <fields>
    <item>host_name</item>
    <item>last_check</item>
  </fields>
</value>
fields
Type:list(unicode)

List of fields to include in the response.

filters
Type:unicode

The filter expression encoded in json.

type LiveMetric

Data samples:

Json
{
    "critical": "100", 
    "max": "100", 
    "metric_name": "pl", 
    "min": "0", 
    "unit": "s", 
    "value": "0", 
    "warning": "100"
}
XML
<value>
  <metric_name>pl</metric_name>
  <max>100</max>
  <min>0</min>
  <critical>100</critical>
  <warning>100</warning>
  <value>0</value>
  <unit>s</unit>
</value>
critical
Type:unicode

Critical value for the metric

max
Type:unicode

Maximum value for the metric

metric_name
Type:unicode

Name of the metric

min
Type:unicode

Minimal value for the metric

unit
Type:unicode

Unit of the metric

value
Type:unicode

Current value of the metric

warning
Type:unicode

Warning value for the metric

type TimeDelta

Hold a time.

Data samples:

Json
{
    "begin": "2015-01-29T21:50:44Z", 
    "end": "2015-01-29T22:50:44Z"
}
XML
<value>
  <begin>2015-01-29T21:50:44Z</begin>
  <end>2015-01-29T22:50:44Z</end>
</value>
begin
Type:unicode

The begin time of a measure in RFC3339.

end
Type:unicode

The end time of a measure in RFC3339.