Skip to content

REST API Endpoints ​

The Thruk REST API provides access to Thruk and Livestatus information.

For API details, see REST API.

GET / ​

lists all available rest urls. alias for /index

GET /alerts ​

lists alerts based on logfiles. alias for /logs?type[~]=^(HOST|SERVICE) ALERT

GET /checks/stats ​

lists host / service check statistics.

AttributeTypeUnitDescription
hosts_active_15_percnumber%percent of active hosts during the last 15 minutes
hosts_active_15_sumnumberamount of active hosts during the last 15 minutes
hosts_active_1_percnumber%same for last minute
hosts_active_1_sumnumbersame for last minute
hosts_active_5_percnumber%same for last 5 minutes
hosts_active_5_sumnumbersame for last 5 minutes
hosts_active_60_percnumber%same for last 60 minutes
hosts_active_60_sumnumbersame for last 60 minutes
hosts_active_all_percnumber%percent of total active hosts
hosts_active_all_sumnumberamount of total active hosts
hosts_active_state_change_avgnumber%average percent state change
hosts_active_state_change_maxnumber%maximum state change over all active hosts
hosts_active_state_change_minnumber%minimum state change over all active hosts
hosts_active_state_change_sumnumber%sum state change over all hosts
hosts_active_sumnumbernumber of active hosts
hosts_execution_time_avgnumbersaverage execution time over all hosts
hosts_execution_time_maxnumbersmaximum execution time over all hosts
hosts_execution_time_minnumbersminimum execution time over all hosts
hosts_execution_time_sumnumberssum execution time over all hosts
hosts_latency_avgnumberhost latency average
hosts_latency_maxnumberminimum host latency
hosts_latency_minnumberminimum host latency
hosts_latency_sumnumbersum latency over all hosts
hosts_passive_15_percnumber%percent of passive hosts during the last 15 minutes
hosts_passive_15_sumnumberamount of passive hosts during the last 15 minutes
hosts_passive_1_percnumber%same for last minute
hosts_passive_1_sumnumbersame for last minute
hosts_passive_5_percnumber%same for last 5 minutes
hosts_passive_5_sumnumbersame for last 5 minutes
hosts_passive_60_percnumber%same for last 60 minutes
hosts_passive_60_sumnumbersame for last 60 minutes
hosts_passive_all_percnumber%percent of total passive hosts
hosts_passive_all_sumnumberamount of total passive hosts
hosts_passive_state_change_avgnumber%average percent state change for passive hosts
hosts_passive_state_change_maxnumber%maximum state change over all passive hosts
hosts_passive_state_change_minnumber%minimum state change over all passive hosts
hosts_passive_state_change_sumnumber%sum state change over all passive hosts
hosts_passive_sumnumbernumber of passive hosts
services_active_15_percnumber%percent of active services during the last 15 minutes
services_active_15_sumnumberamount of active services during the last 15 minutes
services_active_1_percnumber%same for last minute
services_active_1_sumnumbersame for last minute
services_active_5_percnumber%same for last 5 minutes
services_active_5_sumnumbersame for last 5 minutes
services_active_60_percnumber%same for last 60 minutes
services_active_60_sumnumbersame for last 60 minutes
services_active_all_percnumber%percent of total active services
services_active_all_sumnumberamount of total active services
services_active_state_change_avgnumber%average percent state change
services_active_state_change_maxnumber%maximum state change over all active services
services_active_state_change_minnumber%minimum state change over all active services
services_active_state_change_sumnumber%sum state change over all services
services_active_sumnumbernumber of active services
services_execution_time_avgnumbersaverage execution time over all services
services_execution_time_maxnumbersmaximum execution time over all services
services_execution_time_minnumbersminimum execution time over all services
services_execution_time_sumnumberssum execution time over all services
services_latency_avgnumberservices latency average
services_latency_maxnumberminimum services latency
services_latency_minnumberminimum services latency
services_latency_sumnumbersum latency over all services
services_passive_15_percnumber%percent of passive services during the last 15 minutes
services_passive_15_sumnumberamount of passive services during the last 15 minutes
services_passive_1_percnumber%same for last minute
services_passive_1_sumnumbersame for last minute
services_passive_5_percnumber%same for last 5 minutes
services_passive_5_sumnumbersame for last 5 minutes
services_passive_60_percnumber%same for last 60 minutes
services_passive_60_sumnumbersame for last 60 minutes
services_passive_all_percnumber%percent of total passive services
services_passive_all_sumnumberamount of total passive services
services_passive_state_change_avgnumber%average percent state change for passive services
services_passive_state_change_maxnumber%maximum state change over all passive services
services_passive_state_change_minnumber%minimum state change over all passive services
services_passive_state_change_sumnumber%sum state change over all passive services
services_passive_sumnumbernumber of passive services

POST /cmd ​

Sends any command.

Required arguments:

  • cmd

Optional arguments:

  • host
  • hostgroup
  • service
  • servicegroup
  • contact
  • contactgroup

GET /commands ​

lists livestatus commands. see https://www.naemon.io/documentation/usersguide/livestatus.html#commands for details.

GET /commands/<name> ​

lists commands for given name. alias for /commands?name=<name>

GET /commands/<name>/config ​

Returns configuration for given command. You will find available attributes here: https://www.naemon.io/documentation/usersguide/objectdefinitions.html#command

POST /commands/<name>/config ​

Replace command configuration completely, use PATCH to only update specific attributes.

PATCH /commands/<name>/config ​

Update command configuration partially.

DELETE /commands/<name>/config ​

Deletes given command from configuration.

GET /comments ​

lists livestatus comments. see https://www.naemon.io/documentation/usersguide/livestatus.html#comments for details.

GET /comments/<id> ​

lists comments for given id. alias for /comments?id=<id>

POST /config/check ​

Returns result from config check. This check does require changes to be saved to disk before running the check.

GET /config/diff ​

Optional arguments:

  • ignore_whitespace

Returns differences between filesystem and stashed config changes.

AttributeTypeUnitDescription
filestringfile name of changed file
outputstringdiff output
peer_keystringid as defined in Thruk::Backend component configuration

POST /config/discard ​

Reverts stashed configuration changes. Alias for /config/revert

GET /config/files ​

returns all config files

AttributeTypeUnitDescription
contentstringraw file content
hexstringhex sum for this file
mtimetimeunix timestamp of last modification
pathstringfilesystem path
peer_keystringid as defined in Thruk::Backend component configuration
readonlybooleanreadonly flag

GET /config/fullobjects ​

Returns list of all objects with templates expanded. Used templates are saved to the :TEMPLATES attribute

AttributeTypeUnitDescription
...stringobject attributes like defined in the source config files
:FILEstringfilename and line number
:IDstringinternal uniq id
:PEER_KEYstringid of remote site
:PEER_NAMEstringname of remote site
:READONLYbooleanflag whether file is readonly
:TEMPLATESarray_of_stringslist of used template
:TYPEstringobject type, ex.: host

GET /config/objects ​

Returns list of all objects with their raw config. Use /config/fullobjects to get the full expanded config.

AttributeTypeUnitDescription
...stringobject attributes like defined in the source config files
:FILEstringfilename and line number
:IDinternal uniq id
:PEER_KEYstringid of remote site
:PEER_NAMEstringname of remote site
:READONLYbooleanflag whether file is readonly
:TYPEstringobject type, ex.: host

POST /config/objects ​

Create a new object. Besides the actual object configuration, this requires 2 special parameters, :FILE and :TYPE.

PATCH /config/objects ​

Change attributes for all matching objects. CAUTION Review the filters before submitting a bulk change. This example changes all hosts with max_check_attempts=3 to max_check_attempts=5:

sh
  thruk r -m PATCH -d max_check_attempts=5 '/config/objects?:TYPE=host&max_check_attempts=3'

DELETE /config/objects ​

Delete objects based on filters. CAUTION: A broad filter can select all objects. Confirm the filters before deleting. Requests without query parameters are rejected. This example removes all contacts matching a name:

sh
  thruk r -m DELETE '/config/objects?contact_name=test'

POST /config/objects/<id> ​

Replace object configuration completely.

PATCH /config/objects/<id> ​

Update object configuration partially.

DELETE /config/objects/<id> ​

Remove given object from configuration.

GET /config/precheck ​

Returns result from Thruks config precheck. The precheck does not require changes to be saved to disk before running the check.

AttributeTypeUnitDescription
errorsarray_of_stringslist of errors encountered
failedbooleanboolean flag whether configuration check has failed or not
peer_keystringid as defined in Thruk::Backend component configuration

POST /config/reload ​

Reloads configuration with the configured reload command.

POST /config/revert ​

Reverts stashed configuration changes.

POST /config/save ​

Saves stashed configuration changes to disk.

GET /contactgroups ​

lists livestatus contactgroups. see https://www.naemon.io/documentation/usersguide/livestatus.html#contactgroups for details.

GET /contactgroups/<name> ​

lists contactgroups for given name. alias for /contactgroups?name=<name>

POST /contactgroups/<name>/cmd/... ​

list of supported commands:

POST /contactgroups/<name>/cmd/disable_contactgroup_host_notifications ​

Disables host notifications for all contacts in a particular contactgroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_contactgroup_host_notifications.html for details.

POST /contactgroups/<name>/cmd/disable_contactgroup_svc_notifications ​

Disables service notifications for all contacts in a particular contactgroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_contactgroup_svc_notifications.html for details.

POST /contactgroups/<name>/cmd/enable_contactgroup_host_notifications ​

Enables host notifications for all contacts in a particular contactgroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_contactgroup_host_notifications.html for details.

POST /contactgroups/<name>/cmd/enable_contactgroup_svc_notifications ​

Enables service notifications for all contacts in a particular contactgroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_contactgroup_svc_notifications.html for details.

GET /contactgroups/<name>/config ​

Returns configuration for given contactgroup. You will find available attributes here: https://www.naemon.io/documentation/usersguide/objectdefinitions.html#contactgroup

POST /contactgroups/<name>/config ​

Replace contactgroup configuration completely, use PATCH to only update specific attributes.

PATCH /contactgroups/<name>/config ​

Update contactgroup configuration partially.

DELETE /contactgroups/<name>/config ​

Deletes given contactgroup from configuration.

GET /contacts ​

lists livestatus contacts. see https://www.naemon.io/documentation/usersguide/livestatus.html#contacts for details.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
in_host_notification_periodbooleanWhether the contact is currently in its host notification period
in_service_notification_periodbooleanWhether the contact is currently in its service notification period
modified_attributes_listarray_of_stringsA list of all modified attributes

GET /contacts/<name> ​

lists contacts for given name. alias for /contacts?name=<name>

POST /contacts/<name>/cmd/... ​

list of supported commands:

POST /contacts/<name>/cmd/change_contact_host_notification_timeperiod ​

Changes the host notification timeperiod for a particular contact to what is specified by the 'notification_timeperiod' option. The 'notification_timeperiod' option should be the short name of the timeperiod that is to be used as the contact's host notification timeperiod. The timeperiod must have been configured in Naemon before it was last (re)started.

Required arguments:

  • timeperiod

See https://www.naemon.io/documentation/developer/externalcommands/change_contact_host_notification_timeperiod.html for details.

POST /contacts/<name>/cmd/change_contact_svc_notification_timeperiod ​

Changes the service notification timeperiod for a particular contact to what is specified by the 'notification_timeperiod' option. The 'notification_timeperiod' option should be the short name of the timeperiod that is to be used as the contact's service notification timeperiod. The timeperiod must have been configured in Naemon before it was last (re)started.

Required arguments:

  • timeperiod

See https://www.naemon.io/documentation/developer/externalcommands/change_contact_svc_notification_timeperiod.html for details.

POST /contacts/<name>/cmd/change_custom_contact_var ​

Changes the value of a custom contact variable.

Required arguments:

  • name
  • value

See https://www.naemon.io/documentation/developer/externalcommands/change_custom_contact_var.html for details.

POST /contacts/<name>/cmd/disable_contact_host_notifications ​

Disables host notifications for a particular contact.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_contact_host_notifications.html for details.

POST /contacts/<name>/cmd/disable_contact_svc_notifications ​

Disables service notifications for a particular contact.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_contact_svc_notifications.html for details.

POST /contacts/<name>/cmd/enable_contact_host_notifications ​

Enables host notifications for a particular contact.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_contact_host_notifications.html for details.

POST /contacts/<name>/cmd/enable_contact_svc_notifications ​

Enables service notifications for a particular contact.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_contact_svc_notifications.html for details.

GET /contacts/<name>/config ​

Returns configuration for given contact. You will find available attributes here: https://www.naemon.io/documentation/usersguide/objectdefinitions.html#contact

POST /contacts/<name>/config ​

Replace contact configuration completely, use PATCH to only update specific attributes.

PATCH /contacts/<name>/config ​

Update contact configuration partially.

DELETE /contacts/<name>/config ​

Deletes given contact from configuration.

GET /contacts/totals ​

hash of livestatus contacts totals statistics.

AttributeTypeUnitDescription
totalnumbertotal number of contacts

GET /downtimes ​

lists livestatus downtimes. see https://www.naemon.io/documentation/usersguide/livestatus.html#downtimes for details.

GET /downtimes/<id> ​

lists downtimes for given id. alias for /downtimes?id=<id>

GET /hostgroups ​

lists livestatus hostgroups. see https://www.naemon.io/documentation/usersguide/livestatus.html#hostgroups for details.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
num_services_hard_critnumberNumber of services in hard CRITICAL state
num_services_hard_oknumberNumber of services in hard OK state
num_services_hard_unknownnumberNumber of services in hard UNKNOWN state
num_services_hard_warnnumberNumber of services in hard WARNING state

GET /hostgroups/<name> ​

lists hostgroups for given name. alias for /hostgroups?name=<name>

GET /hostgroups/<name>/availability ​

list availability for this hostgroup.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
hoststringhost name
scheduled_time_downnumberstotal seconds in state down (during downtimes)
scheduled_time_down_percentnumber%time down in percent of total time (during downtimes)
scheduled_time_indeterminatenumberstotal seconds unknown (during downtimes)
scheduled_time_indeterminate_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_unreachablenumberstotal seconds in state unreachable (during downtimes)
scheduled_time_unreachable_percentnumber%time unreachable in percent of total time (during downtimes)
scheduled_time_upnumberstotal seconds in state up (during downtimes)
scheduled_time_up_percentnumber%time up in percent of total time (during downtimes)
time_downnumberstotal seconds in state down
time_down_percentnumber%time down in percent of total time
time_indeterminate_nodatanumberstotal seconds without any data
time_indeterminate_nodata_percentnumber%time without any data in percent of total time
time_indeterminate_notrunningnumberstotal seconds during core not running
time_indeterminate_notrunning_percentnumber%time during core not running in percent of total time
time_indeterminate_outside_timeperiodnumberstotal seconds outside the given timeperiod
time_indeterminate_outside_timeperiod_percentnumber%time outside the given timeperiod in percent of total time
time_unreachablenumberstotal seconds in state unreachable
time_unreachable_percentnumber%time unreachable in percent of total time
time_upnumberstotal seconds in state up
time_up_percentnumber%time up in percent of total time

POST /hostgroups/<name>/cmd/... ​

list of supported commands:

POST /hostgroups/<name>/cmd/disable_hostgroup_host_checks ​

Sends the DISABLE_HOSTGROUP_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_hostgroup_host_checks.html for details.

POST /hostgroups/<name>/cmd/disable_hostgroup_host_notifications ​

Sends the DISABLE_HOSTGROUP_HOST_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_hostgroup_host_notifications.html for details.

POST /hostgroups/<name>/cmd/disable_hostgroup_passive_host_checks ​

Disables passive checks for all hosts in a particular hostgroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_hostgroup_passive_host_checks.html for details.

POST /hostgroups/<name>/cmd/disable_hostgroup_passive_svc_checks ​

Disables passive checks for all services associated with hosts in a particular hostgroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_hostgroup_passive_svc_checks.html for details.

POST /hostgroups/<name>/cmd/disable_hostgroup_svc_checks ​

Sends the DISABLE_HOSTGROUP_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_hostgroup_svc_checks.html for details.

POST /hostgroups/<name>/cmd/disable_hostgroup_svc_notifications ​

Sends the DISABLE_HOSTGROUP_SVC_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_hostgroup_svc_notifications.html for details.

POST /hostgroups/<name>/cmd/enable_hostgroup_host_checks ​

Sends the ENABLE_HOSTGROUP_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_hostgroup_host_checks.html for details.

POST /hostgroups/<name>/cmd/enable_hostgroup_host_notifications ​

Sends the ENABLE_HOSTGROUP_HOST_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_hostgroup_host_notifications.html for details.

POST /hostgroups/<name>/cmd/enable_hostgroup_passive_host_checks ​

Enables passive checks for all hosts in a particular hostgroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_hostgroup_passive_host_checks.html for details.

POST /hostgroups/<name>/cmd/enable_hostgroup_passive_svc_checks ​

Enables passive checks for all services associated with hosts in a particular hostgroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_hostgroup_passive_svc_checks.html for details.

POST /hostgroups/<name>/cmd/enable_hostgroup_svc_checks ​

Sends the ENABLE_HOSTGROUP_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_hostgroup_svc_checks.html for details.

POST /hostgroups/<name>/cmd/enable_hostgroup_svc_notifications ​

Sends the ENABLE_HOSTGROUP_SVC_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_hostgroup_svc_notifications.html for details.

POST /hostgroups/<name>/cmd/schedule_hostgroup_host_downtime ​

Sends the SCHEDULE_HOSTGROUP_HOST_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_hostgroup_host_downtime.html for details.

POST /hostgroups/<name>/cmd/schedule_hostgroup_svc_downtime ​

Sends the SCHEDULE_HOSTGROUP_SVC_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_hostgroup_svc_downtime.html for details.

GET /hostgroups/<name>/config ​

Returns configuration for given hostgroup. You will find available attributes here: https://www.naemon.io/documentation/usersguide/objectdefinitions.html#hostgroup

POST /hostgroups/<name>/config ​

Replace hostgroups configuration completely, use PATCH to only update specific attributes.

PATCH /hostgroups/<name>/config ​

Update hostgroup configuration partially.

DELETE /hostgroups/<name>/config ​

Deletes given hostgroup from configuration.

GET /hostgroups/<name>/outages ​

list of outages for this hostgroup.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
classstringhost/service status
durationnumbersoutage duration in seconds
endtimeunix timestamp of outage end
hoststringhost name
plugin_outputstringlast plugin output during outage
servicestringservice description (only for service outages)
starttimeunix timestamp of outage start
typestringlog entry type

GET /hostgroups/<name>/stats ​

hash of livestatus hostgroup statistics. alias for /hosts/stats?groups[gte]=<name>

Additional attributes added by Thruk:

AttributeTypeUnitDescription
active_checks_disabled_activenumberHosts with active checks disabled that are active
active_checks_disabled_passivenumberHosts with active checks disabled that are passive
downnumberNumber of hosts in DOWN state
down_and_acknumberNumber of hosts in DOWN state with acknowledgement
down_and_disabled_activenumberNumber of hosts in DOWN state with active checks disabled
down_and_disabled_passivenumberNumber of hosts in DOWN state with passive checks disabled
down_and_schedulednumberNumber of hosts in DOWN state with scheduled downtime
down_and_unhandlednumberNumber of unhandled hosts in DOWN state
down_hardnumberNumber of hosts in hard DOWN state
down_softnumberNumber of hosts in soft DOWN state
eventhandler_disabledbooleanWhether event handler is disabled
flappingbooleanWhether the host is flapping
flapping_disabledbooleanWhether flap detection is disabled
hardstringHard state as string
notifications_disabledbooleanWhether notifications are disabled
outagesnumberNumber of current outages
passive_checks_disabledbooleanWhether passive checks are disabled
pendingnumberNumber of pending hosts
pending_and_disablednumberNumber of pending hosts with checks disabled

GET /hosts ​

lists livestatus hosts. see https://www.naemon.io/documentation/usersguide/livestatus.html#hosts for details.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
accept_passive_checksbooleanWhether passive host checks are accepted (0/1)
action_url_expandedstringThe action url with the most important macros expanded
check_freshnessnumberWhether freshness checks are activated (0/1)
check_optionsnumberThe current check option: forced, normal, freshness (0-2)
checks_enablednumberWhether checks are enabled (0/1)
childsarray_of_stringsA list of all direct children of the host
commentsarray_of_stringsA list of the ids of all comments
comments_infostringA list of all comments with id, author, comment, entry_type and entry_time
comments_with_infostringA list of all comments with id, author, comment, entry_type, expires and expire_time
custom_variable_namesarray_of_stringsA list of the names of all custom variables
custom_variable_valuesarray_of_stringsA list of the values of the custom variables
custom_variablesarray_of_stringsA dictionary of the custom variables
downtimes_infostringA list of the ids of all downtimes with additional info
downtimes_with_infonumberNumber of downtimes with additional info
groupsarray_of_stringsA list of all host groups this host is in
hard_statenumberThe hard state of the host
icon_image_expandedstringThe icon image with the most important macros expanded
in_check_periodbooleanWhether this host is currently in its check period (0/1)
in_notification_periodbooleanWhether this host is currently in its notification period (0/1)
is_executingbooleanWhether there is a check currently running (0/1)
latencynumberHost check latency in seconds
modified_attributes_listarray_of_stringsA list of all modified attributes
notes_expandedstringThe notes with the most important macros expanded
notes_url_expandedstringThe notes url with the most important macros expanded

GET /hosts/<name> ​

lists hosts for given name. alias for /hosts?name=<name>

GET /hosts/<name>/alerts ​

lists alerts for given host. alias for /logs?type[~]=^(HOST|SERVICE) ALERT&host_name=<name> supports wildcards for: <name>

GET /hosts/<name>/availability ​

list availability for this host.

Optional arguments:

  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
scheduled_time_downnumberstotal seconds in state down (during downtimes)
scheduled_time_down_percentnumber%time down in percent of total time (during downtimes)
scheduled_time_indeterminatenumberstotal seconds unknown (during downtimes)
scheduled_time_indeterminate_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_unreachablenumberstotal seconds in state unreachable (during downtimes)
scheduled_time_unreachable_percentnumber%time unreachable in percent of total time (during downtimes)
scheduled_time_upnumberstotal seconds in state up (during downtimes)
scheduled_time_up_percentnumber%time up in percent of total time (during downtimes)
time_downnumberstotal seconds in state down
time_down_percentnumber%time down in percent of total time
time_indeterminate_nodatanumberstotal seconds without any data
time_indeterminate_nodata_percentnumber%time without any data in percent of total time
time_indeterminate_notrunningnumberstotal seconds during core not running
time_indeterminate_notrunning_percentnumber%time during core not running in percent of total time
time_indeterminate_outside_timeperiodnumberstotal seconds outside the given timeperiod
time_indeterminate_outside_timeperiod_percentnumber%time outside the given timeperiod in percent of total time
time_unreachablenumberstotal seconds in state unreachable
time_unreachable_percentnumber%time unreachable in percent of total time
time_upnumberstotal seconds in state up
time_up_percentnumber%time up in percent of total time

POST /hosts/<name>/cmd/... ​

list of supported commands:

POST /hosts/<name>/cmd/acknowledge_host_problem ​

Sends the ACKNOWLEDGE_HOST_PROBLEM command.

Required arguments:

  • comment_data

Optional arguments:

  • sticky_ack
  • send_notification
  • persistent_comment
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/acknowledge_host_problem.html for details.

POST /hosts/<name>/cmd/acknowledge_host_problem_expire ​

Sends the ACKNOWLEDGE_HOST_PROBLEM_EXPIRE command.

Required arguments:

  • comment_data

Optional arguments:

  • sticky_ack
  • send_notification
  • persistent_comment
  • end_time
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/acknowledge_host_problem_expire.html for details.

POST /hosts/<name>/cmd/add_host_comment ​

Sends the ADD_HOST_COMMENT command.

Required arguments:

  • comment_data

Optional arguments:

  • persistent_comment
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/add_host_comment.html for details.

POST /hosts/<name>/cmd/change_custom_host_var ​

Changes the value of a custom host variable.

Required arguments:

  • name
  • value

See https://www.naemon.io/documentation/developer/externalcommands/change_custom_host_var.html for details.

POST /hosts/<name>/cmd/change_host_check_timeperiod ​

Changes the valid check period for the specified host.

Required arguments:

  • timeperiod

See https://www.naemon.io/documentation/developer/externalcommands/change_host_check_timeperiod.html for details.

POST /hosts/<name>/cmd/change_host_modattr ​

Sends the CHANGE_HOST_MODATTR command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/change_host_modattr.html for details.

POST /hosts/<name>/cmd/change_host_notification_timeperiod ​

Changes the host notification timeperiod to what is specified by the 'notification_timeperiod' option. The 'notification_timeperiod' option should be the short name of the timeperiod that is to be used as the service notification timeperiod. The timeperiod must have been configured in Naemon before it was last (re)started.

Required arguments:

  • timeperiod

See https://www.naemon.io/documentation/developer/externalcommands/change_host_notification_timeperiod.html for details.

POST /hosts/<name>/cmd/change_max_host_check_attempts ​

Changes the maximum number of check attempts (retries) for a particular host.

Required arguments:

  • interval

See https://www.naemon.io/documentation/developer/externalcommands/change_max_host_check_attempts.html for details.

POST /hosts/<name>/cmd/change_normal_host_check_interval ​

Changes the normal (regularly scheduled) check interval for a particular host.

Required arguments:

  • interval

See https://www.naemon.io/documentation/developer/externalcommands/change_normal_host_check_interval.html for details.

POST /hosts/<name>/cmd/change_retry_host_check_interval ​

Changes the retry check interval for a particular host.

Required arguments:

  • interval

See https://www.naemon.io/documentation/developer/externalcommands/change_retry_host_check_interval.html for details.

POST /hosts/<name>/cmd/del_active_host_downtimes ​

Removes all currently active downtimes for this host.

This command does not require any arguments.

POST /hosts/<name>/cmd/del_all_host_comments ​

Sends the DEL_ALL_HOST_COMMENTS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/del_all_host_comments.html for details.

POST /hosts/<name>/cmd/del_comment ​

Removes comment by id for this host.

Required arguments:

  • comment_id

POST /hosts/<name>/cmd/del_downtime ​

Removes downtime by id for this host.

Required arguments:

  • downtime_id

POST /hosts/<name>/cmd/delay_host_notification ​

Sends the DELAY_HOST_NOTIFICATION command.

Required arguments:

  • notification_time

See https://www.naemon.io/documentation/developer/externalcommands/delay_host_notification.html for details.

POST /hosts/<name>/cmd/disable_all_notifications_beyond_host ​

Sends the DISABLE_ALL_NOTIFICATIONS_BEYOND_HOST command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_all_notifications_beyond_host.html for details.

POST /hosts/<name>/cmd/disable_host_and_child_notifications ​

Sends the DISABLE_HOST_AND_CHILD_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_host_and_child_notifications.html for details.

POST /hosts/<name>/cmd/disable_host_check ​

Sends the DISABLE_HOST_CHECK command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_host_check.html for details.

POST /hosts/<name>/cmd/disable_host_event_handler ​

Sends the DISABLE_HOST_EVENT_HANDLER command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_host_event_handler.html for details.

POST /hosts/<name>/cmd/disable_host_flap_detection ​

Sends the DISABLE_HOST_FLAP_DETECTION command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_host_flap_detection.html for details.

POST /hosts/<name>/cmd/disable_host_notifications ​

Sends the DISABLE_HOST_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_host_notifications.html for details.

POST /hosts/<name>/cmd/disable_host_svc_checks ​

Sends the DISABLE_HOST_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_host_svc_checks.html for details.

POST /hosts/<name>/cmd/disable_host_svc_notifications ​

Sends the DISABLE_HOST_SVC_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_host_svc_notifications.html for details.

POST /hosts/<name>/cmd/disable_passive_host_checks ​

Sends the DISABLE_PASSIVE_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_passive_host_checks.html for details.

POST /hosts/<name>/cmd/enable_all_notifications_beyond_host ​

Sends the ENABLE_ALL_NOTIFICATIONS_BEYOND_HOST command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_all_notifications_beyond_host.html for details.

POST /hosts/<name>/cmd/enable_host_and_child_notifications ​

Sends the ENABLE_HOST_AND_CHILD_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_host_and_child_notifications.html for details.

POST /hosts/<name>/cmd/enable_host_check ​

Sends the ENABLE_HOST_CHECK command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_host_check.html for details.

POST /hosts/<name>/cmd/enable_host_event_handler ​

Sends the ENABLE_HOST_EVENT_HANDLER command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_host_event_handler.html for details.

POST /hosts/<name>/cmd/enable_host_flap_detection ​

Sends the ENABLE_HOST_FLAP_DETECTION command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_host_flap_detection.html for details.

POST /hosts/<name>/cmd/enable_host_notifications ​

Sends the ENABLE_HOST_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_host_notifications.html for details.

POST /hosts/<name>/cmd/enable_host_svc_checks ​

Sends the ENABLE_HOST_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_host_svc_checks.html for details.

POST /hosts/<name>/cmd/enable_host_svc_notifications ​

Sends the ENABLE_HOST_SVC_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_host_svc_notifications.html for details.

POST /hosts/<name>/cmd/enable_passive_host_checks ​

Sends the ENABLE_PASSIVE_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_passive_host_checks.html for details.

POST /hosts/<name>/cmd/note ​

Add host note to core log.

Required arguments:

  • log

POST /hosts/<name>/cmd/process_host_check_result ​

Sends the PROCESS_HOST_CHECK_RESULT command.

Required arguments:

  • plugin_state
  • plugin_output

Optional arguments:

  • performance_data

See https://www.naemon.io/documentation/developer/externalcommands/process_host_check_result.html for details.

POST /hosts/<name>/cmd/remove_host_acknowledgement ​

Sends the REMOVE_HOST_ACKNOWLEDGEMENT command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/remove_host_acknowledgement.html for details.

POST /hosts/<name>/cmd/schedule_and_propagate_host_downtime ​

Sends the SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_and_propagate_host_downtime.html for details.

POST /hosts/<name>/cmd/schedule_and_propagate_triggered_host_downtime ​

Sends the SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_and_propagate_triggered_host_downtime.html for details.

POST /hosts/<name>/cmd/schedule_forced_host_check ​

Sends the SCHEDULE_FORCED_HOST_CHECK command.

Optional arguments:

  • start_time

See https://www.naemon.io/documentation/developer/externalcommands/schedule_forced_host_check.html for details.

POST /hosts/<name>/cmd/schedule_forced_host_svc_checks ​

Sends the SCHEDULE_FORCED_HOST_SVC_CHECKS command.

Optional arguments:

  • start_time

See https://www.naemon.io/documentation/developer/externalcommands/schedule_forced_host_svc_checks.html for details.

POST /hosts/<name>/cmd/schedule_host_check ​

Sends the SCHEDULE_HOST_CHECK command.

Optional arguments:

  • start_time

See https://www.naemon.io/documentation/developer/externalcommands/schedule_host_check.html for details.

POST /hosts/<name>/cmd/schedule_host_downtime ​

Sends the SCHEDULE_HOST_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_host_downtime.html for details.

POST /hosts/<name>/cmd/schedule_host_svc_checks ​

Sends the SCHEDULE_HOST_SVC_CHECKS command.

Optional arguments:

  • start_time

See https://www.naemon.io/documentation/developer/externalcommands/schedule_host_svc_checks.html for details.

POST /hosts/<name>/cmd/schedule_host_svc_downtime ​

Sends the SCHEDULE_HOST_SVC_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_host_svc_downtime.html for details.

POST /hosts/<name>/cmd/send_custom_host_notification ​

Sends the SEND_CUSTOM_HOST_NOTIFICATION command.

Required arguments:

  • comment_data

Optional arguments:

  • options
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/send_custom_host_notification.html for details.

POST /hosts/<name>/cmd/set_host_notification_number ​

Sets the current notification number for a particular host. A value of 0 indicates that no notification has yet been sent for the current host problem. Useful for forcing an escalation (based on notification number) or replicating notification information in redundant monitoring environments. Notification numbers greater than zero have no noticeable affect on the notification process if the host is currently in an UP state.

Required arguments:

  • number

See https://www.naemon.io/documentation/developer/externalcommands/set_host_notification_number.html for details.

POST /hosts/<name>/cmd/start_obsessing_over_host ​

Sends the START_OBSESSING_OVER_HOST command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/start_obsessing_over_host.html for details.

POST /hosts/<name>/cmd/stop_obsessing_over_host ​

Sends the STOP_OBSESSING_OVER_HOST command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/stop_obsessing_over_host.html for details.

GET /hosts/<name>/commandline ​

displays commandline for check command of given hosts. supports wildcards for: <name>

AttributeTypeUnitDescription
check_commandstringname of the check_command including arguments
command_linestringfull expanded command line (if possible)
errorstringcontains the error if expanding failed for some reason
host_namestringhost name
peer_keystringid as defined in Thruk::Backend component configuration
peer_namestringname as defined in Thruk::Backend component configuration
peer_sectionstringsection as defined in Thruk::Backend component configuration

GET /hosts/<name>/config ​

Returns configuration for given host. You will find available attributes here: https://www.naemon.io/documentation/usersguide/objectdefinitions.html#host

POST /hosts/<name>/config ​

Replace host configuration completely, use PATCH to only update specific attributes.

PATCH /hosts/<name>/config ​

Update host configuration partially.

DELETE /hosts/<name>/config ​

Deletes given host from configuration.

GET /hosts/<name>/notifications ​

lists notifications for given host. alias for /logs?class=3&host_name=<name> supports wildcards for: <name>

GET /hosts/<name>/outages ​

list of outages for this host.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
classstringhost/service status
durationnumbersoutage duration in seconds
endtimeunix timestamp of outage end
hoststringhost name
plugin_outputstringlast plugin output during outage
starttimeunix timestamp of outage start
typestringlog entry type

GET /hosts/<name>/services ​

lists services for given host. alias for /services?host_name=<name>

GET /hosts/availability ​

list availability for all hosts.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well

supports hostgroup filter, ex. GET /hosts/availability?hostgroup=foo

AttributeTypeUnitDescription
hoststringhost name
scheduled_time_downnumberstotal seconds in state down (during downtimes)
scheduled_time_down_percentnumber%time down in percent of total time (during downtimes)
scheduled_time_indeterminatenumberstotal seconds unknown (during downtimes)
scheduled_time_indeterminate_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_unreachablenumberstotal seconds in state unreachable (during downtimes)
scheduled_time_unreachable_percentnumber%time unreachable in percent of total time (during downtimes)
scheduled_time_upnumberstotal seconds in state up (during downtimes)
scheduled_time_up_percentnumber%time up in percent of total time (during downtimes)
time_downnumberstotal seconds in state down
time_down_percentnumber%time down in percent of total time
time_indeterminate_nodatanumberstotal seconds without any data
time_indeterminate_nodata_percentnumber%time without any data in percent of total time
time_indeterminate_notrunningnumberstotal seconds during core not running
time_indeterminate_notrunning_percentnumber%time during core not running in percent of total time
time_indeterminate_outside_timeperiodnumberstotal seconds outside the given timeperiod
time_indeterminate_outside_timeperiod_percentnumber%time outside the given timeperiod in percent of total time
time_unreachablenumberstotal seconds in state unreachable
time_unreachable_percentnumber%time unreachable in percent of total time
time_upnumberstotal seconds in state up
time_up_percentnumber%time up in percent of total time

GET /hosts/outages ​

list of outages for all hosts.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
classhost/service status
durationnumbersoutage duration in seconds
endtimeunix timestamp of outage end
hoststringhost name
plugin_outputstringlast plugin output during outage
starttimeunix timestamp of outage start
typestringlog entry type

GET /hosts/stats ​

hash of livestatus host statistics.

AttributeTypeUnitDescription
active_checks_disabled_activenumbernumber of active hosts which have active checks disabled
active_checks_disabled_passivenumbernumber of passive hosts which have active checks disabled
downnumbernumber of down hosts
down_and_acknumbernumber of down hosts which are acknowledged
down_and_disabled_activenumbernumber of active down hosts which have active checks disabled
down_and_disabled_passivenumbernumber of passive down hosts which have active checks disabled
down_and_schedulednumbernumber of down hosts which are in a scheduled downtime
down_and_unhandlednumbernumber of unhandled down hosts
down_hardnumbernumber of hard down hosts
down_hard_unhandlednumbernumber of unhandled hard down hosts
down_softnumbernumber of soft down hosts
eventhandler_disablednumbernumber of hosts with eventhandlers disabled
flappingnumbernumber of flapping hosts
flapping_disablednumbernumber of hosts with flapping detection disabled
hardnumbernumber of hosts in hard state
notifications_disablednumbernumber of hosts with notifications disabled
outagesnumbernumber of network outages
passive_checks_disablednumbernumber of hosts which do not accept passive check results
pendingnumbernumber of pending hosts
pending_and_disablednumbernumber of pending hosts with active checks disabled
pending_and_schedulednumbernumber of pending hosts which are in a scheduled downtime
plain_downnumbernumber of down hosts which are not acknowleded or in a downtime
plain_pendingnumbernumber of pending hosts which are not acknowleded or in a downtime
plain_unreachablenumbernumber of unreachable hosts which are not acknowleded or in a downtime
plain_upnumbernumber of up hosts which are not acknowleded or in a downtime
softnumbernumber of hosts in soft state
totalnumbertotal number of hosts
total_activenumbertotal number of active hosts
total_passivenumbertotal number of passive hosts
unreachablenumbernumber of unreachable hosts
unreachable_and_acknumbernumber of unreachable hosts which are acknowledged
unreachable_and_disabled_activenumbernumber of active unreachable hosts which have active checks disabled
unreachable_and_disabled_passivenumbernumber of passive unreachable hosts which have active checks disabled
unreachable_and_schedulednumbernumber of unreachable hosts which are in a scheduled downtime
unreachable_and_unhandlednumbernumber of unhandled unreachable hosts
unreachable_hardnumbernumber of unreachable hosts in hard state
unreachable_hard_unhandlednumbernumber of unhandled unreachable hosts in hard state
unreachable_softnumbernumber of unreachable hosts in soft state
upnumbernumber of up hosts
up_and_disabled_activenumbernumber of active up hosts which have active checks disabled
up_and_disabled_passivenumbernumber of passive up hosts which have active checks disabled
up_and_schedulednumbernumber of up hosts which are in a scheduled downtime

GET /hosts/totals ​

hash of livestatus host totals statistics. its basically a reduced set of /hosts/stats.

AttributeTypeUnitDescription
downnumbernumber of down hosts
down_and_unhandlednumbernumber of down hosts which are neither acknowledged nor in scheduled downtime
pendingnumbernumber of pending hosts
totalnumbertotal number of hosts
unreachablenumbernumber of unreachable hosts
unreachable_and_unhandlednumbernumber of unreachable hosts which are neither acknowledged nor in scheduled downtime
upnumbernumber of up hosts

GET /index ​

lists all available rest urls.

AttributeTypeUnitDescription
descriptionstringdescription of the url
protocolstringprotocol to use for this url
urlstringthe rest url

GET /lmd/sites ​

lists connected sites. Only available if LMD (use_lmd) is enabled.

AttributeTypeUnitDescription
addrstringaddress of the remote site
bytes_receivednumberbytestotal bytes received from this site
bytes_sendnumberbytestotal bytes send to this site
federation_addrstringcontains the real address if using federation
federation_keystringcontains the real peer key if using federation
federation_namestringcontains the real name if using federation
federation_typestringcontains the real backend type if using federation
federation_versionstringcontains the real backend version if using federation
flagsarray_of_stringscontains the lmd flags for this backend
idlingbooleanflag if the connection is in idle mode
keystringprimary id of this site
last_errortimelast error message
last_onlinetimetimestamp when the site was last time online
last_querytimetimestamp of the last received query for this site
last_updatetimetimestamp of the last update
lmd_last_cache_updatetimesame as last_update
namestringname of the site
parentstringparent id for lmd federation setups
peer_keystringid as defined in Thruk::Backend component configuration
peer_namestringname as defined in Thruk::Backend component configuration
queriesnumbernumber of queries received
response_timenumbersresponse time in seconds
sectionthruks section
statusstringconnection status of this site

GET /logs ​

lists livestatus logs. see https://www.naemon.io/documentation/usersguide/livestatus.html#log for details.

GET /notifications ​

lists notifications based on logfiles. alias for /logs?class=3

Additional attributes added by Thruk:

AttributeTypeUnitDescription
attemptnumberCurrent attempt number when this log entry was generated
classnumberThe class of the message as integer (0:info, 1:state, 2:program, 3:notification, 4:passive, 5:command)
command_namestringCommand name associated with this log entry
commentstringComment text from the log entry
contact_namestringContact name associated with this log entry
host_namestringHost name associated with this log entry
linenonumberLine number of the log entry in the log file
messagestringLog message text
optionsstringOptions string from the log entry
peer_keystringid as defined in Thruk::Backend component configuration
peer_namestringname as defined in Thruk::Backend component configuration
plugin_outputstringPlugin output from the log entry
service_descriptionstringService description associated with this log entry
statenumberState of the host or service at the time of the log entry
state_typestringState type (HARD or SOFT)
timetimeTimestamp of the log entry (unix timestamp)
typestringType of the log entry

GET /processinfo ​

lists livestatus sites status. see https://www.naemon.io/documentation/usersguide/livestatus.html#status for details.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
check_external_commandsnumberWhether the core accepts external commands (0/1)
data_source_versionstringVersion of the data source (livestatus version)
nagios_pidnumberThe process ID of the monitoring core
obsess_over_hostsbooleanWhether the core obsesses over hosts (0/1)
obsess_over_servicesbooleanWhether the core obsesses over services (0/1)
peer_addrstringAddress of the peer (ip:port or unix socket)
peer_keystringid as defined in Thruk::Backend component configuration
peer_namestringname as defined in Thruk::Backend component configuration

GET /processinfo/stats ​

lists livestatus sites statistics. see https://www.naemon.io/documentation/usersguide/livestatus.html#status for details.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
cached_log_messagesnumberNumber of cached log messages
connectionsnumberNumber of connections
connections_ratenumberConnections per second
forksnumberNumber of forks
forks_ratenumberForks per second
host_checksnumberNumber of host checks
host_checks_ratenumberHost checks per second
log_messagesnumberNumber of log messages
log_messages_ratenumberLog messages per second
neb_callbacksnumberNumber of NEB callbacks
neb_callbacks_ratenumberNEB callbacks per second
requestsnumberNumber of requests
requests_ratenumberRequests per second
service_checksnumberNumber of service checks
service_checks_ratenumberService checks per second

GET /servicegroups ​

lists livestatus servicegroups. see https://www.naemon.io/documentation/usersguide/livestatus.html#servicegroups for details.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
num_services_hard_critnumberNumber of services in hard CRITICAL state
num_services_hard_oknumberNumber of services in hard OK state
num_services_hard_unknownnumberNumber of services in hard UNKNOWN state
num_services_hard_warnnumberNumber of services in hard WARNING state
peer_keystringid as defined in Thruk::Backend component configuration
peer_namestringname as defined in Thruk::Backend component configuration

GET /servicegroups/<name> ​

lists servicegroups for given name. alias for /servicegroups?name=<name>

GET /servicegroups/<name>/availability ​

list availability for this servicegroup.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
hoststringhost name
scheduled_time_criticalnumberstotal seconds in state critical (during downtimes)
scheduled_time_critical_percentnumber%time critical in percent of total time (during downtimes)
scheduled_time_indeterminatenumberstotal seconds unknown (during downtimes)
scheduled_time_indeterminate_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_oknumberstotal seconds in state ok (during downtimes)
scheduled_time_ok_percentnumber%time ok in percent of total time (during downtimes)
scheduled_time_unknownnumberstotal seconds in state unknown (during downtimes)
scheduled_time_unknown_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_warningnumberstotal seconds in state warning (during downtimes)
scheduled_time_warning_percentnumber%time warning in percent of total time (during downtimes)
servicestringservice description
time_criticalnumberstotal seconds in state critical
time_critical_percentnumber%time critical in percent of total time
time_indeterminate_nodatanumberstotal seconds without any data
time_indeterminate_nodata_percentnumber%time without any data in percent of total time (during downtimes)
time_indeterminate_notrunningnumberstotal seconds during core not running
time_indeterminate_notrunning_percentnumber%time during core not running in percent of total time
time_indeterminate_outside_timeperiodnumberstotal seconds outside the given timeperiod
time_indeterminate_outside_timeperiod_percentnumber%time outside the given timeperiod in percent of total time
time_oknumberstotal seconds in state ok
time_ok_percentnumber%time ok in percent of total time
time_unknownnumberstotal seconds in state unknown
time_unknown_percentnumber%time unknown in percent of total time
time_warningnumberstotal seconds in state warning
time_warning_percentnumber%time warning in percent of total time

POST /servicegroups/<name>/cmd/... ​

list of supported commands:

POST /servicegroups/<name>/cmd/disable_servicegroup_host_checks ​

Sends the DISABLE_SERVICEGROUP_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_servicegroup_host_checks.html for details.

POST /servicegroups/<name>/cmd/disable_servicegroup_host_notifications ​

Sends the DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_servicegroup_host_notifications.html for details.

POST /servicegroups/<name>/cmd/disable_servicegroup_passive_host_checks ​

Disables the acceptance and processing of passive checks for all hosts that have services that are members of a particular service group.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_servicegroup_passive_host_checks.html for details.

POST /servicegroups/<name>/cmd/disable_servicegroup_passive_svc_checks ​

Disables the acceptance and processing of passive checks for all services in a particular servicegroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_servicegroup_passive_svc_checks.html for details.

POST /servicegroups/<name>/cmd/disable_servicegroup_svc_checks ​

Sends the DISABLE_SERVICEGROUP_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_servicegroup_svc_checks.html for details.

POST /servicegroups/<name>/cmd/disable_servicegroup_svc_notifications ​

Sends the DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_servicegroup_svc_notifications.html for details.

POST /servicegroups/<name>/cmd/enable_servicegroup_host_checks ​

Sends the ENABLE_SERVICEGROUP_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_servicegroup_host_checks.html for details.

POST /servicegroups/<name>/cmd/enable_servicegroup_host_notifications ​

Sends the ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_servicegroup_host_notifications.html for details.

POST /servicegroups/<name>/cmd/enable_servicegroup_passive_host_checks ​

Enables the acceptance and processing of passive checks for all hosts that have services that are members of a particular service group.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_servicegroup_passive_host_checks.html for details.

POST /servicegroups/<name>/cmd/enable_servicegroup_passive_svc_checks ​

Enables the acceptance and processing of passive checks for all services in a particular servicegroup.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_servicegroup_passive_svc_checks.html for details.

POST /servicegroups/<name>/cmd/enable_servicegroup_svc_checks ​

Sends the ENABLE_SERVICEGROUP_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_servicegroup_svc_checks.html for details.

POST /servicegroups/<name>/cmd/enable_servicegroup_svc_notifications ​

Sends the ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_servicegroup_svc_notifications.html for details.

POST /servicegroups/<name>/cmd/schedule_servicegroup_host_downtime ​

Sends the SCHEDULE_SERVICEGROUP_HOST_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_servicegroup_host_downtime.html for details.

POST /servicegroups/<name>/cmd/schedule_servicegroup_svc_downtime ​

Sends the SCHEDULE_SERVICEGROUP_SVC_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_servicegroup_svc_downtime.html for details.

GET /servicegroups/<name>/config ​

Returns configuration for given servicegroup. You will find available attributes here: https://www.naemon.io/documentation/usersguide/objectdefinitions.html#servicegroup

POST /servicegroups/<name>/config ​

Replace servicegroup configuration completely, use PATCH to only update specific attributes.

PATCH /servicegroups/<name>/config ​

Update servicegroup configuration partially.

DELETE /servicegroups/<name>/config ​

Deletes given servicegroup from configuration.

GET /servicegroups/<name>/outages ​

list of outages for this servicegroup.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
classstringhost/service status
durationnumbersoutage duration in seconds
endtimeunix timestamp of outage end
hoststringhost name
plugin_outputstringlast plugin output during outage
servicestringservice description (only for service outages)
starttimeunix timestamp of outage start
typestringlog entry type

GET /servicegroups/<name>/stats ​

hash of livestatus servicegroup statistics. alias for /services/stats?service_groups[gte]=<name>

Additional attributes added by Thruk:

AttributeTypeUnitDescription
active_checks_disabled_activenumberServices with active checks disabled that are active
active_checks_disabled_passivenumberServices with active checks disabled that are passive
criticalnumberNumber of services in CRITICAL state
critical_and_acknumberNumber of services in CRITICAL state with acknowledgement
critical_and_disabled_activenumberNumber of services in CRITICAL state with active checks disabled
critical_and_disabled_passivenumberNumber of services in CRITICAL state with passive checks disabled
critical_and_schedulednumberNumber of services in CRITICAL state with scheduled downtime
critical_and_unhandlednumberNumber of unhandled services in CRITICAL state
critical_hardnumberNumber of services in hard CRITICAL state
critical_hard_unhandlednumberNumber of unhandled services in hard CRITICAL state
critical_on_down_hostnumberNumber of services in CRITICAL state on down hosts
critical_softnumberNumber of services in soft CRITICAL state
eventhandler_disabledbooleanWhether event handler is disabled
flappingnumberNumber of services that are flapping
flapping_disabledbooleanWhether flap detection is disabled
hardnumberNumber of services in hard state
notifications_disabledbooleanWhether notifications are disabled
oknumberNumber of services in OK state
ok_and_disabled_activenumberNumber of services in OK state with active checks disabled
ok_and_disabled_passivenumberNumber of services in OK state with passive checks disabled

GET /services ​

lists livestatus services. see https://www.naemon.io/documentation/usersguide/livestatus.html#services for details.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
accept_passive_checksbooleanWhether passive service checks are accepted (0/1)
action_url_expandedstringThe action url with the most important macros expanded
check_optionsstringThe current check option: forced, normal, freshness (0-2)
checks_enabledbooleanWhether checks are enabled (0/1)
commentsstringA list of the ids of all comments
comments_infostringA list of all comments with id, author, comment, entry_type and entry_time
comments_with_infostringA list of all comments with id, author, comment, entry_type, expires and expire_time
custom_variable_namesarray_of_stringsA list of the names of all custom variables
custom_variable_valuesarray_of_stringsA list of the values of the custom variables

GET /services/<host>/<service> ​

lists services for given host and name. alias for /services?host_name=<host_name>&description=<service> supports wildcards for: <host> and <service>

GET /services/<host>/<service>/availability ​

list of outages for this service.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
scheduled_time_criticalnumberstotal seconds in state critical (during downtimes)
scheduled_time_critical_percentnumber%time critical in percent of total time (during downtimes)
scheduled_time_indeterminatenumberstotal seconds unknown (during downtimes)
scheduled_time_indeterminate_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_oknumberstotal seconds in state ok (during downtimes)
scheduled_time_ok_percentnumber%time ok in percent of total time (during downtimes)
scheduled_time_unknownnumberstotal seconds in state unknown (during downtimes)
scheduled_time_unknown_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_warningnumberstotal seconds in state warning (during downtimes)
scheduled_time_warning_percentnumber%time warning in percent of total time (during downtimes)
time_criticalnumberstotal seconds in state critical
time_critical_percentnumber%time critical in percent of total time
time_indeterminate_nodatanumberstotal seconds without any data
time_indeterminate_nodata_percentnumber%time without any data in percent of total time (during downtimes)
time_indeterminate_notrunningnumberstotal seconds during core not running
time_indeterminate_notrunning_percentnumber%time during core not running in percent of total time
time_indeterminate_outside_timeperiodnumberstotal seconds outside the given timeperiod
time_indeterminate_outside_timeperiod_percentnumber%time outside the given timeperiod in percent of total time
time_oknumberstotal seconds in state ok
time_ok_percentnumber%time ok in percent of total time
time_unknownnumberstotal seconds in state unknown
time_unknown_percentnumber%time unknown in percent of total time
time_warningnumberstotal seconds in state warning
time_warning_percentnumber%time warning in percent of total time

POST /services/<host>/<service>/cmd/... ​

list of supported commands:

POST /services/<host>/<service>/cmd/acknowledge_svc_problem ​

Sends the ACKNOWLEDGE_SVC_PROBLEM command.

Required arguments:

  • comment_data

Optional arguments:

  • sticky_ack
  • send_notification
  • persistent_comment
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/acknowledge_svc_problem.html for details.

POST /services/<host>/<service>/cmd/acknowledge_svc_problem_expire ​

Sends the ACKNOWLEDGE_SVC_PROBLEM_EXPIRE command.

Required arguments:

  • comment_data

Optional arguments:

  • sticky_ack
  • send_notification
  • persistent_comment
  • end_time
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/acknowledge_svc_problem_expire.html for details.

POST /services/<host>/<service>/cmd/add_svc_comment ​

Sends the ADD_SVC_COMMENT command.

Required arguments:

  • comment_data

Optional arguments:

  • persistent_comment
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/add_svc_comment.html for details.

POST /services/<host>/<service>/cmd/change_custom_svc_var ​

Changes the value of a custom service variable.

Required arguments:

  • name
  • value

See https://www.naemon.io/documentation/developer/externalcommands/change_custom_svc_var.html for details.

POST /services/<host>/<service>/cmd/change_max_svc_check_attempts ​

Changes the maximum number of check attempts (retries) for a particular service.

Required arguments:

  • attempts

See https://www.naemon.io/documentation/developer/externalcommands/change_max_svc_check_attempts.html for details.

POST /services/<host>/<service>/cmd/change_normal_svc_check_interval ​

Changes the normal (regularly scheduled) check interval for a particular service

Required arguments:

  • interval

See https://www.naemon.io/documentation/developer/externalcommands/change_normal_svc_check_interval.html for details.

POST /services/<host>/<service>/cmd/change_retry_svc_check_interval ​

Changes the retry check interval for a particular service.

Required arguments:

  • interval

See https://www.naemon.io/documentation/developer/externalcommands/change_retry_svc_check_interval.html for details.

POST /services/<host>/<service>/cmd/change_svc_check_timeperiod ​

Changes the check timeperiod for a particular service to what is specified by the 'check_timeperiod' option. The 'check_timeperiod' option should be the short name of the timeperiod that is to be used as the service check timeperiod. The timeperiod must have been configured in Naemon before it was last (re)started.

Required arguments:

  • timeperiod

See https://www.naemon.io/documentation/developer/externalcommands/change_svc_check_timeperiod.html for details.

POST /services/<host>/<service>/cmd/change_svc_modattr ​

Sends the CHANGE_SVC_MODATTR command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/change_svc_modattr.html for details.

POST /services/<host>/<service>/cmd/change_svc_notification_timeperiod ​

Changes the service notification timeperiod to what is specified by the 'notification_timeperiod' option. The 'notification_timeperiod' option should be the short name of the timeperiod that is to be used as the service notification timeperiod. The timeperiod must have been configured in Naemon before it was last (re)started.

Required arguments:

  • timeperiod

See https://www.naemon.io/documentation/developer/externalcommands/change_svc_notification_timeperiod.html for details.

POST /services/<host>/<service>/cmd/del_active_service_downtimes ​

Removes all currently active downtimes for this service.

This command does not require any arguments.

POST /services/<host>/<service>/cmd/del_all_svc_comments ​

Sends the DEL_ALL_SVC_COMMENTS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/del_all_svc_comments.html for details.

POST /services/<host>/<service>/cmd/del_comment ​

Removes comment by id for this service.

Required arguments:

  • comment_id

POST /services/<host>/<service>/cmd/del_downtime ​

Removes downtime by id for this service.

Required arguments:

  • downtime_id

POST /services/<host>/<service>/cmd/delay_svc_notification ​

Sends the DELAY_SVC_NOTIFICATION command.

Required arguments:

  • notification_time

See https://www.naemon.io/documentation/developer/externalcommands/delay_svc_notification.html for details.

POST /services/<host>/<service>/cmd/disable_passive_svc_checks ​

Sends the DISABLE_PASSIVE_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_passive_svc_checks.html for details.

POST /services/<host>/<service>/cmd/disable_svc_check ​

Sends the DISABLE_SVC_CHECK command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_svc_check.html for details.

POST /services/<host>/<service>/cmd/disable_svc_event_handler ​

Sends the DISABLE_SVC_EVENT_HANDLER command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_svc_event_handler.html for details.

POST /services/<host>/<service>/cmd/disable_svc_flap_detection ​

Sends the DISABLE_SVC_FLAP_DETECTION command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_svc_flap_detection.html for details.

POST /services/<host>/<service>/cmd/disable_svc_notifications ​

Sends the DISABLE_SVC_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_svc_notifications.html for details.

POST /services/<host>/<service>/cmd/enable_passive_svc_checks ​

Sends the ENABLE_PASSIVE_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_passive_svc_checks.html for details.

POST /services/<host>/<service>/cmd/enable_svc_check ​

Sends the ENABLE_SVC_CHECK command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_svc_check.html for details.

POST /services/<host>/<service>/cmd/enable_svc_event_handler ​

Sends the ENABLE_SVC_EVENT_HANDLER command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_svc_event_handler.html for details.

POST /services/<host>/<service>/cmd/enable_svc_flap_detection ​

Sends the ENABLE_SVC_FLAP_DETECTION command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_svc_flap_detection.html for details.

POST /services/<host>/<service>/cmd/enable_svc_notifications ​

Sends the ENABLE_SVC_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_svc_notifications.html for details.

POST /services/<host>/<service>/cmd/note ​

Add service note to core log.

Required arguments:

  • log

POST /services/<host>/<service>/cmd/process_service_check_result ​

Sends the PROCESS_SERVICE_CHECK_RESULT command.

Required arguments:

  • plugin_state
  • plugin_output

Optional arguments:

  • performance_data

See https://www.naemon.io/documentation/developer/externalcommands/process_service_check_result.html for details.

POST /services/<host>/<service>/cmd/remove_svc_acknowledgement ​

Sends the REMOVE_SVC_ACKNOWLEDGEMENT command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/remove_svc_acknowledgement.html for details.

POST /services/<host>/<service>/cmd/schedule_forced_svc_check ​

Sends the SCHEDULE_FORCED_SVC_CHECK command.

Optional arguments:

  • start_time

See https://www.naemon.io/documentation/developer/externalcommands/schedule_forced_svc_check.html for details.

POST /services/<host>/<service>/cmd/schedule_svc_check ​

Sends the SCHEDULE_SVC_CHECK command.

Optional arguments:

  • start_time

See https://www.naemon.io/documentation/developer/externalcommands/schedule_svc_check.html for details.

POST /services/<host>/<service>/cmd/schedule_svc_downtime ​

Sends the SCHEDULE_SVC_DOWNTIME command.

Required arguments:

  • comment_data

Optional arguments:

  • start_time
  • end_time
  • fixed
  • triggered_by
  • duration
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/schedule_svc_downtime.html for details.

POST /services/<host>/<service>/cmd/send_custom_svc_notification ​

Sends the SEND_CUSTOM_SVC_NOTIFICATION command.

Required arguments:

  • comment_data

Optional arguments:

  • options
  • comment_author

See https://www.naemon.io/documentation/developer/externalcommands/send_custom_svc_notification.html for details.

POST /services/<host>/<service>/cmd/set_svc_notification_number ​

Sets the current notification number for a particular service. A value of 0 indicates that no notification has yet been sent for the current service problem. Useful for forcing an escalation (based on notification number) or replicating notification information in redundant monitoring environments. Notification numbers greater than zero have no noticeable affect on the notification process if the service is currently in an OK state.

Required arguments:

  • number

See https://www.naemon.io/documentation/developer/externalcommands/set_svc_notification_number.html for details.

POST /services/<host>/<service>/cmd/start_obsessing_over_svc ​

Sends the START_OBSESSING_OVER_SVC command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/start_obsessing_over_svc.html for details.

POST /services/<host>/<service>/cmd/stop_obsessing_over_svc ​

Sends the STOP_OBSESSING_OVER_SVC command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/stop_obsessing_over_svc.html for details.

GET /services/<host>/<service>/commandline ​

displays commandline for check command of given services. supports wildcards for: <host> and <service>

AttributeTypeUnitDescription
check_commandstringname of the check_command including arguments
command_linestringfull expanded command line (if possible)
errorstringcontains the error if expanding failed for some reason
host_namestringhost name
peer_keystringid as defined in Thruk::Backend component configuration
peer_namestringname as defined in Thruk::Backend component configuration
peer_sectionstringsection as defined in Thruk::Backend component configuration
service_descriptionstringservice name

GET /services/<host>/<service>/config ​

Returns configuration for given service. You will find available attributes here: https://www.naemon.io/documentation/usersguide/objectdefinitions.html#service

POST /services/<host>/<service>/config ​

Replace service configuration completely, use PATCH to only update specific attributes.

PATCH /services/<host>/<service>/config ​

Update service configuration partially.

DELETE /services/<host>/<service>/config ​

Deletes given service from configuration.

GET /services/<host>/<service>/outages ​

list of outages for this service.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
classstringhost/service status
durationnumbersoutage duration in seconds
endtimeunix timestamp of outage end
hoststringhost name
plugin_outputstringlast plugin output during outage
servicestringservice description (only for service outages)
starttimeunix timestamp of outage start
typestringlog entry type

GET /services/availability ​

list availability for all services.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
hoststringhost name
scheduled_time_criticalnumberstotal seconds in state critical (during downtimes)
scheduled_time_critical_percentnumber%time critical in percent of total time (during downtimes)
scheduled_time_indeterminatenumberstotal seconds unknown (during downtimes)
scheduled_time_indeterminate_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_oknumberstotal seconds in state ok (during downtimes)
scheduled_time_ok_percentnumber%time ok in percent of total time (during downtimes)
scheduled_time_unknownnumberstotal seconds in state unknown (during downtimes)
scheduled_time_unknown_percentnumber%time unknown in percent of total time (during downtimes)
scheduled_time_warningnumberstotal seconds in state warning (during downtimes)
scheduled_time_warning_percentnumber%time warning in percent of total time (during downtimes)
servicestringservice description
time_criticalnumberstotal seconds in state critical
time_critical_percentnumber%time critical in percent of total time
time_indeterminate_nodatanumberstotal seconds without any data
time_indeterminate_nodata_percentnumber%time without any data in percent of total time (during downtimes)
time_indeterminate_notrunningnumberstotal seconds during core not running
time_indeterminate_notrunning_percentnumber%time during core not running in percent of total time
time_indeterminate_outside_timeperiodnumberstotal seconds outside the given timeperiod
time_indeterminate_outside_timeperiod_percentnumber%time outside the given timeperiod in percent of total time
time_oknumberstotal seconds in state ok
time_ok_percentnumber%time ok in percent of total time
time_unknownnumberstotal seconds in state unknown
time_unknown_percentnumber%time unknown in percent of total time
time_warningnumberstotal seconds in state warning
time_warning_percentnumber%time warning in percent of total time

GET /services/outages ​

list of outages for all services.

Optional arguments:

  • type - both | hosts | services
  • timeperiod - last24hours | lastmonth | thismonth | ...
  • start - unix timestamp
  • end - unix timestamp
  • withdowntimes - 0/1 whether downtimes should count as outages
  • includesoftstates - 0/1 whether soft states should be used as well
AttributeTypeUnitDescription
classstringhost/service status
durationnumbersoutage duration in seconds
endtimeunix timestamp of outage end
hoststringhost name
plugin_outputstringlast plugin output during outage
servicestringservice description (only for service outages)
starttimeunix timestamp of outage start
typestringlog entry type

GET /services/stats ​

livestatus service statistics.

AttributeTypeUnitDescription
active_checks_disabled_activenumbernumber of active services which have active checks disabled
active_checks_disabled_passivenumbernumber of passive services which have active checks disabled
criticalnumbernumber of critical services
critical_and_acknumbernumber of critical services which are acknowledged
critical_and_disabled_activenumbernumber of active critical services which have active checks disabled
critical_and_disabled_passivenumbernumber of passive critical services which have active checks disabled
critical_and_schedulednumbernumber of critical services which are in a scheduled downtime
critical_and_unhandlednumbernumber of unhandled critical services
critical_hardnumbernumber of critical services in hard state
critical_hard_unhandlednumbernumber of unhandled critical services in hard state
critical_on_down_hostnumbernumber of unhandled critical services on down hosts
critical_softnumbernumber of critical services in soft state
eventhandler_disablednumbernumber of services with eventhandlers disabled
flappingnumbernumber of flapping services
flapping_disablednumbernumber of services with flapping detection disabled
hardnumbernumber of services in hard state
notifications_disablednumbernumber of services with notifications disabled
oknumbernumber of ok services
ok_and_disabled_activenumbernumber of active ok services which have active checks disabled
ok_and_disabled_passivenumbernumber of passive ok services which have active checks disabled
ok_and_schedulednumbernumber of ok services which are in a scheduled downtime
passive_checks_disablednumbernumber of services which do not accept passive check results
pendingnumbernumber of pending services
pending_and_disablednumbernumber of pending services with active checks disabled
pending_and_schedulednumbernumber of pending services which are in a scheduled downtime
plain_criticalnumbernumber of critical services which are not acknowleded or in a downtime
plain_oknumbernumber of ok services which are not acknowleded or in a downtime
plain_pendingnumbernumber of pending services which are not acknowleded or in a downtime
plain_unknownnumbernumber of unknown services which are not acknowleded or in a downtime
plain_warningnumbernumber of warning services which are not acknowleded or in a downtime
softnumbernumber of services in soft state
totalnumbertotal number of services
total_activenumbertotal number of active services
total_passivenumbertotal number of passive services
unknownnumbernumber of unknown services
unknown_and_acknumbernumber of unknown services which are acknowledged
unknown_and_disabled_activenumbernumber of active unknown services which have active checks disabled
unknown_and_disabled_passivenumbernumber of passive unknown services which have active checks disabled
unknown_and_schedulednumbernumber of unknown services which are in a scheduled downtime
unknown_and_unhandlednumbernumber of unhandled unknown services
unknown_hardnumbernumber of unknown services in hard state
unknown_hard_unhandlednumbernumber of unhandled unknown services in hard state
unknown_on_down_hostnumbernumber of unhandled unknown services on down hosts
unknown_softnumbernumber of unknown services in soft state
warningnumbernumber of warning services
warning_and_acknumbernumber of warning services which are acknowledged
warning_and_disabled_activenumbernumber of active warning services which have active checks disabled
warning_and_disabled_passivenumbernumber of passive warning services which have active checks disabled
warning_and_schedulednumbernumber of warning services which are in a scheduled downtime
warning_and_unhandlednumbernumber of unhandled warning services
warning_hardnumbernumber of warning services in hard state
warning_hard_unhandlednumbernumber of unhandled warning services in hard state
warning_on_down_hostnumbernumber of unhandled warning services on down hosts
warning_softnumbernumber of warning services in soft state

GET /services/totals ​

livestatus service totals statistics. its basically a reduced set of /services/stats.

AttributeTypeUnitDescription
criticalnumbernumber of critical services
critical_and_unhandlednumbernumber of critical services which are neither acknowledged nor in scheduled downtime
oknumbernumber of ok services
pendingnumbernumber of pending services
totalnumbertotal number of services
unknownnumbernumber of unknown services
unknown_and_unhandlednumbernumber of unknown services which are neither acknowledged nor in scheduled downtime
warningnumbernumber of warning services
warning_and_unhandlednumbernumber of warning services which are neither acknowledged nor in scheduled downtime

GET /sites ​

lists configured backends

AttributeTypeUnitDescription
addrstringaddress for this connection
connectedbooleanflag whether sites is connected (1) or not (0)
federation_addrstringcontains the real address if using federation
federation_keystringcontains the real peer key if using federation
federation_namestringcontains the real name if using federation
federation_typestringcontains the real backend type if using federation
federation_versionstringcontains the real backend version if using federation
idstringid for this backend
last_errortimeerror message if backend is not connected
localtimetimecurrent local unix timestamp of thruk host
namestringname of the backend
sectionstringsection name
statusboolean0 (OK), 1 (DOWN)
typestringtype of the backend

POST /system/cmd/... ​

list of supported commands:

POST /system/cmd/change_global_host_event_handler ​

Changes the global host event handler command to be that specified by the 'event_handler_command' option. The 'event_handler_command' option specifies the short name of the command that should be used as the new host event handler. The command must have been configured in Naemon before it was last (re)started.

Required arguments:

  • eventhandler

See https://www.naemon.io/documentation/developer/externalcommands/change_global_host_event_handler.html for details.

POST /system/cmd/change_global_svc_event_handler ​

Changes the global service event handler command to be that specified by the 'event_handler_command' option. The 'event_handler_command' option specifies the short name of the command that should be used as the new service event handler. The command must have been configured in Naemon before it was last (re)started.

Required arguments:

  • eventhandler

See https://www.naemon.io/documentation/developer/externalcommands/change_global_svc_event_handler.html for details.

POST /system/cmd/del_downtime_by_host_name ​

This command deletes all downtimes matching the specified filters.

Optional arguments:

  • hostname
  • service_desc
  • start_time
  • comment

See https://www.naemon.io/documentation/developer/externalcommands/del_downtime_by_host_name.html for details.

POST /system/cmd/del_downtime_by_hostgroup_name ​

This command deletes all downtimes matching the specified filters.

Optional arguments:

  • hostgroup_name
  • hostname
  • service_desc
  • start_time
  • comment

See https://www.naemon.io/documentation/developer/externalcommands/del_downtime_by_hostgroup_name.html for details.

POST /system/cmd/del_downtime_by_start_time_comment ​

This command deletes all downtimes matching the specified filters.

Optional arguments:

  • start_time
  • comment

See https://www.naemon.io/documentation/developer/externalcommands/del_downtime_by_start_time_comment.html for details.

POST /system/cmd/del_host_comment ​

Sends the DEL_HOST_COMMENT command.

Required arguments:

  • comment_id

See https://www.naemon.io/documentation/developer/externalcommands/del_host_comment.html for details.

POST /system/cmd/del_host_downtime ​

Sends the DEL_HOST_DOWNTIME command.

Required arguments:

  • downtime_id

See https://www.naemon.io/documentation/developer/externalcommands/del_host_downtime.html for details.

POST /system/cmd/del_svc_comment ​

Sends the DEL_SVC_COMMENT command.

Required arguments:

  • comment_id

See https://www.naemon.io/documentation/developer/externalcommands/del_svc_comment.html for details.

POST /system/cmd/del_svc_downtime ​

Sends the DEL_SVC_DOWNTIME command.

Required arguments:

  • downtime_id

See https://www.naemon.io/documentation/developer/externalcommands/del_svc_downtime.html for details.

POST /system/cmd/disable_event_handlers ​

Sends the DISABLE_EVENT_HANDLERS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_event_handlers.html for details.

POST /system/cmd/disable_flap_detection ​

Sends the DISABLE_FLAP_DETECTION command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_flap_detection.html for details.

POST /system/cmd/disable_host_freshness_checks ​

Disables freshness checks of all hosts on a program-wide basis.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_host_freshness_checks.html for details.

POST /system/cmd/disable_notifications ​

Sends the DISABLE_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_notifications.html for details.

POST /system/cmd/disable_performance_data ​

Sends the DISABLE_PERFORMANCE_DATA command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_performance_data.html for details.

POST /system/cmd/disable_service_freshness_checks ​

Disables freshness checks of all services on a program-wide basis.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/disable_service_freshness_checks.html for details.

POST /system/cmd/enable_event_handlers ​

Sends the ENABLE_EVENT_HANDLERS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_event_handlers.html for details.

POST /system/cmd/enable_flap_detection ​

Sends the ENABLE_FLAP_DETECTION command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_flap_detection.html for details.

POST /system/cmd/enable_host_freshness_checks ​

Enables freshness checks of all hosts on a program-wide basis. Individual hosts that have freshness checks disabled will not be checked for freshness.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_host_freshness_checks.html for details.

POST /system/cmd/enable_notifications ​

Sends the ENABLE_NOTIFICATIONS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_notifications.html for details.

POST /system/cmd/enable_performance_data ​

Sends the ENABLE_PERFORMANCE_DATA command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_performance_data.html for details.

POST /system/cmd/enable_service_freshness_checks ​

Enables freshness checks of all services on a program-wide basis. Individual services that have freshness checks disabled will not be checked for freshness.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/enable_service_freshness_checks.html for details.

POST /system/cmd/log ​

Add custom log entry to core log.

Required arguments:

  • log

See https://www.naemon.io/documentation/developer/externalcommands/log.html for details.

POST /system/cmd/read_state_information ​

Causes Naemon to load all current monitoring status information from the state retention file. Normally, state retention information is loaded when the Naemon process starts up and before it starts monitoring. WARNING: This command will cause Naemon to discard all current monitoring status information and use the information stored in state retention file! Use with care.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/read_state_information.html for details.

POST /system/cmd/restart_process ​

Sends the RESTART_PROCESS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/restart_process.html for details.

POST /system/cmd/restart_program ​

Restarts the Naemon process.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/restart_program.html for details.

POST /system/cmd/save_state_information ​

Causes Naemon to save all current monitoring status information to the state retention file. Normally, state retention information is saved before the Naemon process shuts down and (potentially) at regularly scheduled intervals. This command allows you to force Naemon to save this information to the state retention file immediately. This does not affect the current status information in the Naemon process.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/save_state_information.html for details.

POST /system/cmd/shutdown_process ​

Sends the SHUTDOWN_PROCESS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/shutdown_process.html for details.

POST /system/cmd/shutdown_program ​

Shuts down the Naemon process.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/shutdown_program.html for details.

POST /system/cmd/start_accepting_passive_host_checks ​

Sends the START_ACCEPTING_PASSIVE_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/start_accepting_passive_host_checks.html for details.

POST /system/cmd/start_accepting_passive_svc_checks ​

Sends the START_ACCEPTING_PASSIVE_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/start_accepting_passive_svc_checks.html for details.

POST /system/cmd/start_executing_host_checks ​

Sends the START_EXECUTING_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/start_executing_host_checks.html for details.

POST /system/cmd/start_executing_svc_checks ​

Sends the START_EXECUTING_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/start_executing_svc_checks.html for details.

POST /system/cmd/start_obsessing_over_host_checks ​

Sends the START_OBSESSING_OVER_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/start_obsessing_over_host_checks.html for details.

POST /system/cmd/start_obsessing_over_svc_checks ​

Sends the START_OBSESSING_OVER_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/start_obsessing_over_svc_checks.html for details.

POST /system/cmd/stop_accepting_passive_host_checks ​

Sends the STOP_ACCEPTING_PASSIVE_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/stop_accepting_passive_host_checks.html for details.

POST /system/cmd/stop_accepting_passive_svc_checks ​

Sends the STOP_ACCEPTING_PASSIVE_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/stop_accepting_passive_svc_checks.html for details.

POST /system/cmd/stop_executing_host_checks ​

Sends the STOP_EXECUTING_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/stop_executing_host_checks.html for details.

POST /system/cmd/stop_executing_svc_checks ​

Sends the STOP_EXECUTING_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/stop_executing_svc_checks.html for details.

POST /system/cmd/stop_obsessing_over_host_checks ​

Sends the STOP_OBSESSING_OVER_HOST_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/stop_obsessing_over_host_checks.html for details.

POST /system/cmd/stop_obsessing_over_svc_checks ​

Sends the STOP_OBSESSING_OVER_SVC_CHECKS command.

This command does not require any arguments.

See https://www.naemon.io/documentation/developer/externalcommands/stop_obsessing_over_svc_checks.html for details.

GET /thruk ​

hash of basic information about this thruk instance

AttributeTypeUnitDescription
rest_versionstringrest api version
thruk_versionstringthruk version
thruk_release_datestringthruk release date
localtimetimecurrent server unix timestamp / epoch
project_rootstringthruk root folder
etc_pathstringconfiguration folder
var_pathstringvariable data folder
extra_versionstringmight contain omd version
extra_linkstringcontains link from extra_versions product

GET /thruk/api_keys ​

lists api keys

AttributeTypeUnitDescription
commentstringcomment of this api key
createdtimeunixtimestamp of when the key was created
digeststringused hash algorithm
filestringpath to stored file
force_userstringsuper user keys can enforce a specific user
hashed_keystringhashed private key
last_fromtimeip address of last usage
last_usedtimeunixtimestamp of last usage
rolesarray_of_stringslist of roles this key is limited too
superuserstringflag whether this a global superuser key and not bound to a specific user
userstringusername of key owner

POST /thruk/api_keys ​

create new api key.

Optional arguments:

  • comment
  • superuser (flag to create superuser api key)
  • username (requires admin privileges, assigns key to specific user)
  • roles (restrict roles to given list)
  • force_user (sets username in combination with super user flag)

GET /thruk/api_keys/<id> ​

alias for /thruk/api_keys?hashed_key=<id>

DELETE /thruk/api_keys/<id> ​

remove key for given id.

GET /thruk/bp ​

lists business processes.

AttributeTypeUnitDescription
affected_peersarray_of_stringslist of backend ids used for the last calculation
bp_backendstringid of backend which hosts the business process
create_host_objectboolean0 - do no create a host object, 1 - create naemon host object
draftstringflag whether this is a draft only
filterarray_of_stringslist of enabled filters
idstringprimary id
last_checktimetimestamp of last check result submited
last_state_changetimetimestamp of last state change
namestringname of this business proces
nodesstringall nodes of this business process
rankDirstringflag whether this business process is horizontal or vertical
state_typebooleanflag if this business process uses hard or soft state types
statusnumbercurrent status
status_textstringcurrent status text
templatestringnaemon template used for the generated object
timenumberscalculation duration

POST /thruk/bp ​

create new business process.

GET /thruk/bp/<nr> ​

business processes for given number. alias for /thruk/bp?id=<nr>

POST /thruk/bp/<nr> ​

update business processes configuration for given number.

PATCH /thruk/bp/<nr> ​

update business processes configuration partially for given number.

DELETE /thruk/bp/<nr> ​

remove business processes for given number.

GET /thruk/bp/<nr>/objects ​

combined list of hosts and services directly referenced by a business process. see https://www.naemon.io/documentation/usersguide/livestatus.html#hosts for host columns. see https://www.naemon.io/documentation/usersguide/livestatus.html#services for service columns.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
_typestringobject type: "host" or "service"
host_namestringhost name (added to host rows for uniformity with service rows)

GET /thruk/bp/<nr>/objects/recursive ​

combined list of hosts and services including all transitively linked BPs. see https://www.naemon.io/documentation/usersguide/livestatus.html#hosts for host columns. see https://www.naemon.io/documentation/usersguide/livestatus.html#services for service columns.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
_typestringobject type: "host" or "service"
host_namestringhost name (added to host rows for uniformity with service rows)

POST /thruk/bp/<nr>/refresh ​

recalculate business processes status for given number.

GET /thruk/broadcasts ​

lists broadcasts

AttributeTypeUnitDescription
annotationstringannotation icon for this broadcast
authorstringauthor of the broadcast
authoremailstringauthors E-Mail address, mainly used as macro
contactgroupsarray_of_stringslist of contactgroups if broadcast should be limited to specific groups
contactsarray_of_stringslist of contacts if broadcast should be limited to specific contacts
expiresstringexpire date after which the broadcast won't be displayed anymore
expires_tstimeexpire data as unix timestamp
filestringfilename
frontmatterstringhash list of extraceted frontmatter variables
hide_beforestringdo not show broadcast before this date
hide_before_tstimehide_before as unix timestamp
loginpagebooleanflag whether broadcast should be displayed on the loginpage as well
macrosarray_of_stringshash list of macros
namestringname of this broadcast, mostly used for templates
panoramabooleanflag whether broadcast should be displayed on panorama dashboards
raw_textstringraw broadcast text
templatestringflag whether this broadcast is a template
textstringprocessed broadcast message

POST /thruk/broadcasts ​

create new broadcast.

GET /thruk/broadcasts/<file> ​

alias for /thruk/broadcasts?file=<file>

POST /thruk/broadcasts/<file> ​

update entire broadcast for given file.

PATCH /thruk/broadcasts/<file> ​

update attributes for given broadcast.

DELETE /thruk/broadcasts/<file> ​

remove broadcast for given file.

GET /thruk/cluster ​

lists cluster nodes

AttributeTypeUnitDescription
hostnamestringhost name of the cluster node
last_contacttimetimestamp of last successful contact
last_errortimetext of last error message
maintenanceFlag whether this node is in maintenance mode
node_idstringinternal id for this node
node_urlstringurl to access this node directly
pidsarray_of_stringslist of current process ids of this node
response_timenumbersresponse time in seconds
versionstringversion information of this node

GET /thruk/cluster/<id> ​

return cluster state for given node.

See /thruk/cluster/ for the description of the attributes.

GET /thruk/cluster/heartbeat ​

should not be used, use POST method instead

POST /thruk/cluster/heartbeat ​

send cluster heartbeat to all other nodes

POST /thruk/cluster/restart ​

restarts all cluster nodes sequentially

GET /thruk/config ​

lists configuration information

GET /thruk/jobs ​

lists thruk jobs.

AttributeTypeUnitDescription
cmdstringthe executed command line or perl code
endtimetimestamp when the job finished
forwardstringurl to forward when the job is done
host_idnumberthruk node id this job is run on
host_namestringhostname of the node
idnumberjob id
is_runningbooleanflag whether the job is still running
messagestringcurrent status text
percentnumber%percent of completion
perl_resstringcontains the perl result in case this was a perl job
pidnumberprocess id
rcnumberreturn code
remainingnumbersremaining seconds for the job to complete
show_outputbooleanflag whether output console will be displayed
starttimetimestamp when the job started
stderrstringstderr output
stdoutstringstdout output
timenumbersduration in seconds
userstringusername of the owner

GET /thruk/jobs/<id> ​

get thruk job status for given id. alias for /thruk/jobs?id=<id>

GET /thruk/jobs/<id>/output ​

get thruk job output for given id.

Will return the plain result of a finished job as initially requested. In case jobs takes longer than 30 seconds, this will return 302 redirects to itself until the job succeeds. So if you follow those redirect, you will get the final result as soon as its calculated.

GET /thruk/logcache/stats ​

lists logcache statistics

AttributeTypeUnitDescription
cache_versionstringdb schema version
compact_durationnumbersduration of last compact run in seconds
compact_tilltimetimestamp marker where last compact run finished
data_sizenumberbytesused size of data in bytes
enabledstringflag whether logcache is enabled for this backend or not
index_sizenumberbytesused size of index in bytes
itemsstringnumber of items/rows
keystringpeer key
last_compacttimetimestamp of last compact run
last_entrytimetimestamp of last log entry
last_reordertimetimestamp of last optimize run
last_updatetimetimestamp of last update run
modestringcurrent lock mode
namestringpeer name
reorder_durationnumbersduration of last reorder run in seconds
statusstringhuman readable status
update_durationnumbersduration of last update run in seconds

POST /thruk/logcache/update ​

runs the logcache delta update.

GET /thruk/metrics ​

alias for /thruk/stats

GET /thruk/panorama ​

lists all panorama dashboards.

AttributeTypeUnitDescription
filestringfilename of the dashboard
file_versionstringversion of dashboard format
idinternal id
maintenancestringmaintenance reason (only if in maintenance mode)
nrnumbernumber of the dashboard
objectsnumbernumber of objects
panlet_<nr>stringpanlet definition
readonlybooleanflag whether this dashboard is read-only
scriptedbooleanflag whether this is a scripted dashboard
tabstringstructure of global dashboard settings
tstimetimestamp of last modification
userstringowner of this dashboard

GET /thruk/panorama/<nr> ​

returns panorama dashboard for given number. alias for /thruk/panorama?nr=<nr>

POST /thruk/panorama/<nr>/maintenance ​

Puts given dashboard into maintenance mode.

Required arguments:

  • text

DELETE /thruk/panorama/<nr>/maintenance ​

removes maintenance mode from given dashboard.

GET /thruk/recurring_downtimes ​

lists recurring downtimes.

AttributeTypeUnitDescription
backendsarray_of_stringslist of backends this downtime is used for
childoptionsbooleanflag used for the downtime command
commentstringcomment used for the downtime command
created_bystringusername who created this downtime
durationnumberminutesduration in minutes
edited_bystringusername who last edited this downtime
errorstringcontains the error message if something got wrong with this downtime
filenumberfile number
fixedbooleanflag whether this should create a fixed downtime
flex_rangenumberminutesrange in minutes for flexible downtimes
hostarray_of_stringslist of hostnames
hostgrouparray_of_stringslist of hostgroups
last_changedtimeunix timestamp of last change
schedulearray_of_stringslist of schedules
servicearray_of_stringslist of services
servicegrouparray_of_stringslist of servicegroups
targetstringsets the type of the downtime, ex. host or hostgroup

POST /thruk/recurring_downtimes ​

create new downtime.

GET /thruk/recurring_downtimes/<file> ​

alias for /thruk/recurring_downtimes?file=<file>

POST /thruk/recurring_downtimes/<file> ​

update entire downtime for given file.

PATCH /thruk/recurring_downtimes/<file> ​

update attributes for given downtime.

DELETE /thruk/recurring_downtimes/<file> ​

remove downtime for given file.

GET /thruk/reports ​

list of reports.

AttributeTypeUnitDescription
backendsarray_of_stringslist of backends used in this report
ccstringemail cc address if this report is send by mail
descstringreport description
errorstringcontains error messages (optional)
failedbooleanflag whether the report failed to generate last time
is_publicbooleanflag whether the report is public or not
namestringname of the report
nrnumbernumber of the report
paramsstringreporting parameters
permissionsstringuser/group permission
readonlybooleanflag whether the report is read-only
send_typesarray_of_stringslist of cron entries
templatestringtemplate of the report
tostringemail to address if this report is send by mail
userstringowner

POST /thruk/reports ​

create new report.

GET /thruk/reports/<nr> ​

report for given number.

AttributeTypeUnitDescription
backendsarray_of_stringslist of selected backends.
ccstringcarbon-copy for report email.
descstringdescription.
errorstringcontains error messages (optional)
failedbooleanfailed flag.
is_publicbooleanflag for public reports.
namestringname of the report.
nrstringprimary id.
paramsstringreport parameters.
permissionsstringuser/group permission
readonlybooleanreadonly flag.
send_typesarray_of_stringslist of crontab entries.
templatestringreport template.
tostringemail address the report email.
userstringowner of the report.

POST /thruk/reports/<nr> ​

update entire report for given number.

PATCH /thruk/reports/<nr> ​

update attributes for given number.

DELETE /thruk/reports/<nr> ​

remove report for given number.

POST /thruk/reports/<nr>/generate ​

generate report for given number.

GET /thruk/reports/<nr>/report ​

return the actual report file in binary format.

GET /thruk/sessions ​

lists thruk sessions.

AttributeTypeUnitDescription
activetimetimestamp when session was last time used
addressstringremote address of user
digeststringused hash algorithm
fakebooleanflag whether this is a fake session or not
filestringfile name the session data file
hashed_keystringhashed session id
oauth_groupsstringgroups/roles as provided by the oauth server
rolesstringextra session roles
usernamestringusername of this session

GET /thruk/sessions/<id> ​

get thruk sessions status for given id. alias for /thruk/sessions?id=<id>

GET /thruk/stats ​

lists thruk statistics.

AttributeTypeUnitDescription
business_process_duration_secondsnumbersbusiness process calculation duration in seconds
business_process_last_updatetimetimestamp of last business process calculation
business_process_totalnumbertotal number of business processes
business_process_worker_totalnumbertotal number of worker processes used to calculate business processes
sessions_active_5min_totalnumbertotal number of active thruk sessions (active during the last 5 minutes)
sessions_totalnumbertotal number of thruk sessions
sessions_uniq_user_5min_totalnumbertotal number of uniq users active during the last 5 minutes
sessions_uniq_user_totalnumbertotal number of uniq users
users_locked_totalnumbertotal number of locked thruk users
users_totalnumbertotal number of thruk users

GET /thruk/users ​

lists thruk user profiles.

AttributeTypeUnitDescription
aliasstringalias name
can_submit_commandsbooleanflag whether this account is allowed to submit commands
emailstringemail address
groupsarray_of_stringslist of contactgroups
has_thruk_profilebooleanflag whether this account has a thruk profile or not
idstringusername
last_logintimetimestamp of last successfull login
lockedbooleanflag whether account is locked or not
rolesarray_of_stringslist of roles for this user
tzstringusers selected timezone

GET /thruk/users/<id> ​

get thruk profile for given user. alias for /thruk/users?id=<id>

POST /thruk/users/<id>/cmd/... ​

list of supported commands:

POST /thruk/users/<id>/cmd/lock ​

lock given thruk user.

POST /thruk/users/<id>/cmd/unlock ​

unlock given thruk user.

GET /thruk/whoami ​

show current profile information. alias for /thruk/users?id=<id>

GET /timeperiods ​

lists livestatus timeperiods. see https://www.naemon.io/documentation/usersguide/livestatus.html#timeperiods for details.

Additional attributes added by Thruk:

AttributeTypeUnitDescription
peer_keystringid as defined in Thruk::Backend component configuration
peer_namestringname as defined in Thruk::Backend component configuration

GET /timeperiods/<name> ​

lists timeperiods for given name. alias for /timeperiods?name=<name>

AttributeTypeUnitDescription
peer_keystringid as defined in Thruk::Backend component configuration
peer_namestringname as defined in Thruk::Backend component configuration

GET /timeperiods/<name>/config ​

Returns configuration for given timeperiod. You will find available attributes here: https://www.naemon.io/documentation/usersguide/objectdefinitions.html#timeperiod

POST /timeperiods/<name>/config ​

Replace timeperiod configuration completely, use PATCH to only update specific attributes.

PATCH /timeperiods/<name>/config ​

Update timeperiods configuration partially.

DELETE /timeperiods/<name>/config ​

Deletes given timeperiod from configuration.