1# Appendix <a id="appendix"></a> 2 3## External Commands List <a id="external-commands-list-detail"></a> 4 5Additional details can be found in the [Icinga 1.x Documentation](https://docs.icinga.com/latest/en/extcommands2.html) 6 7 Command name | Parameters | Description 8 ------------------------------------------|-----------------------------------|-------------------------- 9 PROCESS_HOST_CHECK_RESULT | ;<host_name>;<status_code>;<plugin_output> (3) | - 10 PROCESS_SERVICE_CHECK_RESULT | ;<host_name>;<service_name>;<return_code>;<plugin_output> (4) | - 11 SCHEDULE_HOST_CHECK | ;<host_name>;<check_time> (2) | - 12 SCHEDULE_FORCED_HOST_CHECK | ;<host_name>;<check_time> (2) | - 13 SCHEDULE_SVC_CHECK | ;<host_name>;<service_name>;<check_time> (3) | - 14 SCHEDULE_FORCED_SVC_CHECK | ;<host_name>;<service_name>;<check_time> (3) | - 15 ENABLE_HOST_CHECK | ;<host_name> (1) | - 16 DISABLE_HOST_CHECK | ;<host_name> (1) | - 17 ENABLE_SVC_CHECK | ;<host_name>;<service_name> (2) | - 18 DISABLE_SVC_CHECK | ;<host_name>;<service_name> (2) | - 19 SHUTDOWN_PROCESS | - | - 20 RESTART_PROCESS | - | - 21 SCHEDULE_FORCED_HOST_SVC_CHECKS | ;<host_name>;<check_time> (2) | - 22 SCHEDULE_HOST_SVC_CHECKS | ;<host_name>;<check_time> (2) | - 23 ENABLE_HOST_SVC_CHECKS | ;<host_name> (1) | - 24 DISABLE_HOST_SVC_CHECKS | ;<host_name> (1) | - 25 ACKNOWLEDGE_SVC_PROBLEM | ;<host_name>;<service_name>;<sticky>;<notify>;<persistent>;<author>;<comment> (7) | Note: Icinga 2 treats all comments as persistent. 26 ACKNOWLEDGE_SVC_PROBLEM_EXPIRE | ;<host_name>;<service_name>;<sticky>;<notify>;<persistent>;<timestamp>;<author>;<comment> (8) | Note: Icinga 2 treats all comments as persistent. 27 REMOVE_SVC_ACKNOWLEDGEMENT | ;<host_name>;<service_name> (2) | - 28 ACKNOWLEDGE_HOST_PROBLEM | ;<host_name>;<sticky>;<notify>;<persistent>;<author>;<comment> (6) | Note: Icinga 2 treats all comments as persistent. 29 ACKNOWLEDGE_HOST_PROBLEM_EXPIRE | ;<host_name>;<sticky>;<notify>;<persistent>;<timestamp>;<author>;<comment> (7) | Note: Icinga 2 treats all comments as persistent. 30 REMOVE_HOST_ACKNOWLEDGEMENT | ;<host_name> (1) | - 31 DISABLE_HOST_FLAP_DETECTION | ;<host_name> (1) | - 32 ENABLE_HOST_FLAP_DETECTION | ;<host_name> (1) | - 33 DISABLE_SVC_FLAP_DETECTION | ;<host_name>;<service_name> (2) | - 34 ENABLE_SVC_FLAP_DETECTION | ;<host_name>;<service_name> (2) | - 35 ENABLE_HOSTGROUP_SVC_CHECKS | ;<hostgroup_name> (1) | - 36 DISABLE_HOSTGROUP_SVC_CHECKS | ;<hostgroup_name> (1) | - 37 ENABLE_SERVICEGROUP_SVC_CHECKS | ;<servicegroup_name> (1) | - 38 DISABLE_SERVICEGROUP_SVC_CHECKS | ;<servicegroup_name> (1) | - 39 ENABLE_PASSIVE_HOST_CHECKS | ;<host_name> (1) | - 40 DISABLE_PASSIVE_HOST_CHECKS | ;<host_name> (1) | - 41 ENABLE_PASSIVE_SVC_CHECKS | ;<host_name>;<service_name> (2) | - 42 DISABLE_PASSIVE_SVC_CHECKS | ;<host_name>;<service_name> (2) | - 43 ENABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS | ;<servicegroup_name> (1) | - 44 DISABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS | ;<servicegroup_name> (1) | - 45 ENABLE_HOSTGROUP_PASSIVE_SVC_CHECKS | ;<hostgroup_name> (1) | - 46 DISABLE_HOSTGROUP_PASSIVE_SVC_CHECKS | ;<hostgroup_name> (1) | - 47 PROCESS_FILE | ;<file_name>;<delete> (2) | - 48 SCHEDULE_SVC_DOWNTIME | ;<host_name>;<service_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (9) | - 49 DEL_SVC_DOWNTIME | ;<downtime_id> (1) | - 50 SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME | ;<host_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (8) | - 51 SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME | ;<host_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (8) | - 52 SCHEDULE_HOST_DOWNTIME | ;<host_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (8) | - 53 DEL_HOST_DOWNTIME | ;<downtime_id> (1) | - 54 DEL_DOWNTIME_BY_HOST_NAME | ;<host_name>[;<service_name;>[;<start_time;>[;<comment_text;>]]] (1) | - 55 SCHEDULE_HOST_SVC_DOWNTIME | ;<host_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (8) | - 56 SCHEDULE_HOSTGROUP_HOST_DOWNTIME | ;<hostgroup_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (8) | - 57 SCHEDULE_HOSTGROUP_SVC_DOWNTIME | ;<hostgroup_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (8) | - 58 SCHEDULE_SERVICEGROUP_HOST_DOWNTIME | ;<servicegroup_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (8) | - 59 SCHEDULE_SERVICEGROUP_SVC_DOWNTIME | ;<servicegroup_name>;<start_time>;<end_time>;<fixed>;<trigger_id>;<duration>;<author>;<comment> (8) | - 60 ADD_HOST_COMMENT | ;<host_name>;<persistent>;<author>;<comment> (4) | Note: Icinga 2 treats all comments as persistent. 61 DEL_HOST_COMMENT | ;<comment_id> (1) | - 62 ADD_SVC_COMMENT | ;<host_name>;<service_name>;<persistent>;<author>;<comment> (5) | Note: Icinga 2 treats all comments as persistent. 63 DEL_SVC_COMMENT | ;<comment_id> (1) | - 64 DEL_ALL_HOST_COMMENTS | ;<host_name> (1) | - 65 DEL_ALL_SVC_COMMENTS | ;<host_name>;<service_name> (2) | - 66 SEND_CUSTOM_HOST_NOTIFICATION | ;<host_name>;<options>;<author>;<comment> (4) | - 67 SEND_CUSTOM_SVC_NOTIFICATION | ;<host_name>;<service_name>;<options>;<author>;<comment> (5) | - 68 DELAY_HOST_NOTIFICATION | ;<host_name>;<notification_time> (2) | - 69 DELAY_SVC_NOTIFICATION | ;<host_name>;<service_name>;<notification_time> (3) | - 70 ENABLE_HOST_NOTIFICATIONS | ;<host_name> (1) | - 71 DISABLE_HOST_NOTIFICATIONS | ;<host_name> (1) | - 72 ENABLE_SVC_NOTIFICATIONS | ;<host_name>;<service_name> (2) | - 73 DISABLE_SVC_NOTIFICATIONS | ;<host_name>;<service_name> (2) | - 74 ENABLE_HOST_SVC_NOTIFICATIONS | ;<host_name> (1) | - 75 DISABLE_HOST_SVC_NOTIFICATIONS | ;<host_name> (1) | - 76 DISABLE_HOSTGROUP_HOST_CHECKS | ;<hostgroup_name> (1) | - 77 DISABLE_HOSTGROUP_PASSIVE_HOST_CHECKS | ;<hostgroup_name> (1) | - 78 DISABLE_SERVICEGROUP_HOST_CHECKS | ;<servicegroup_name> (1) | - 79 DISABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS | ;<servicegroup_name> (1) | - 80 ENABLE_HOSTGROUP_HOST_CHECKS | ;<hostgroup_name> (1) | - 81 ENABLE_HOSTGROUP_PASSIVE_HOST_CHECKS | ;<hostgroup_name> (1) | - 82 ENABLE_SERVICEGROUP_HOST_CHECKS | ;<servicegroup_name> (1) | - 83 ENABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS | ;<servicegroup_name> (1) | - 84 ENABLE_NOTIFICATIONS | - | - 85 DISABLE_NOTIFICATIONS | - | - 86 ENABLE_FLAP_DETECTION | - | - 87 DISABLE_FLAP_DETECTION | - | - 88 ENABLE_EVENT_HANDLERS | - | - 89 DISABLE_EVENT_HANDLERS | - | - 90 ENABLE_PERFORMANCE_DATA | - | - 91 DISABLE_PERFORMANCE_DATA | - | - 92 START_EXECUTING_HOST_CHECKS | - | - 93 STOP_EXECUTING_HOST_CHECKS | - | - 94 START_EXECUTING_SVC_CHECKS | - | - 95 STOP_EXECUTING_SVC_CHECKS | - | - 96 CHANGE_NORMAL_SVC_CHECK_INTERVAL | ;<host_name>;<service_name>;<check_interval> (3) | - 97 CHANGE_NORMAL_HOST_CHECK_INTERVAL | ;<host_name>;<check_interval> (2) | - 98 CHANGE_RETRY_SVC_CHECK_INTERVAL | ;<host_name>;<service_name>;<check_interval> (3) | - 99 CHANGE_RETRY_HOST_CHECK_INTERVAL | ;<host_name>;<check_interval> (2) | - 100 ENABLE_HOST_EVENT_HANDLER | ;<host_name> (1) | - 101 DISABLE_HOST_EVENT_HANDLER | ;<host_name> (1) | - 102 ENABLE_SVC_EVENT_HANDLER | ;<host_name>;<service_name> (2) | - 103 DISABLE_SVC_EVENT_HANDLER | ;<host_name>;<service_name> (2) | - 104 CHANGE_HOST_EVENT_HANDLER | ;<host_name>;<event_command_name> (2) | - 105 CHANGE_SVC_EVENT_HANDLER | ;<host_name>;<service_name>;<event_command_name> (3) | - 106 CHANGE_HOST_CHECK_COMMAND | ;<host_name>;<check_command_name> (2) | - 107 CHANGE_SVC_CHECK_COMMAND | ;<host_name>;<service_name>;<check_command_name> (3) | - 108 CHANGE_MAX_HOST_CHECK_ATTEMPTS | ;<host_name>;<check_attempts> (2) | - 109 CHANGE_MAX_SVC_CHECK_ATTEMPTS | ;<host_name>;<service_name>;<check_attempts> (3) | - 110 CHANGE_HOST_CHECK_TIMEPERIOD | ;<host_name>;<timeperiod_name> (2) | - 111 CHANGE_SVC_CHECK_TIMEPERIOD | ;<host_name>;<service_name>;<timeperiod_name> | - 112 CHANGE_CUSTOM_HOST_VAR | ;<host_name>;<var_name>;<var_value> (3) | - 113 CHANGE_CUSTOM_SVC_VAR | ;<host_name>;<service_name>;<var_name>;<var_value> (4) | - 114 CHANGE_CUSTOM_USER_VAR | ;<user_name>;<var_name>;<var_value> (3) | - 115 CHANGE_CUSTOM_CHECKCOMMAND_VAR | ;<check_command_name>;<var_name>;<var_value> (3) | - 116 CHANGE_CUSTOM_EVENTCOMMAND_VAR | ;<event_command_name>;<var_name>;<var_value> (3) | - 117 CHANGE_CUSTOM_NOTIFICATIONCOMMAND_VAR | ;<notification_command_name>;<var_name>;<var_value> (3) | - 118 ENABLE_HOSTGROUP_HOST_NOTIFICATIONS | ;<hostgroup_name> (1) | - 119 ENABLE_HOSTGROUP_SVC_NOTIFICATIONS | ;<hostgroup_name> (1) | - 120 DISABLE_HOSTGROUP_HOST_NOTIFICATIONS | ;<hostgroup_name> (1) | - 121 DISABLE_HOSTGROUP_SVC_NOTIFICATIONS | ;<hostgroup_name> (1) | - 122 ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS | ;<servicegroup_name> (1) | - 123 DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS | ;<servicegroup_name> (1) | - 124 ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS | ;<servicegroup_name> (1) | - 125 DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS | ;<servicegroup_name> (1) | - 126 127 128## Schemas <a id="schemas"></a> 129 130By convention `CheckCommand`, `EventCommand`, and `NotificationCommand` objects 131are exported using a prefix. This is mandatory for unique objects in the 132command tables. 133 134Object | Prefix 135------------------------|------------------------ 136CheckCommand | check\_ 137EventCommand | event\_ 138NotificationCommand | notification\_ 139 140### DB IDO Schema <a id="schema-db-ido"></a> 141 142There is a detailed documentation for the Icinga IDOUtils 1.x 143database schema available on [https://docs.icinga.com/latest/en/db_model.html] 144 145#### DB IDO Schema Extensions <a id="schema-db-ido-extensions"></a> 146 147Icinga 2 specific extensions are shown below: 148 149New table: `endpointstatus` 150 151 Table | Column | Type | Default | Description 152 --------------------|--------------------|----------|---------|------------- 153 endpoints | endpoint_object_id | bigint | NULL | FK: objects table 154 endpoints | identity | TEXT | NULL | endpoint name 155 endpoints | node | TEXT | NULL | local node name 156 endpoints | zone_object_id | bigint | NULL | zone object where this endpoint is a member of 157 158New table: `endpointstatus` 159 160 Table | Column | Type | Default | Description 161 --------------------|--------------------|----------|---------|------------- 162 endpointstatus | endpoint_object_id | bigint | NULL | FK: objects table 163 endpointstatus | identity | TEXT | NULL | endpoint name 164 endpointstatus | node | TEXT | NULL | local node name 165 endpointstatus | is_connected | smallint | 0 | update on endpoint connect/disconnect 166 endpointstatus | zone_object_id | bigint | NULL | zone object where this endpoint is a member of 167 168New tables: `zones` and `zonestatus`: 169 170 Table | Column | Type | Default | Description 171 --------------------|--------------------|----------|---------|------------- 172 zones | zone_object_id | bigint | NULL | FK: objects table 173 zones | parent_zone_object_id | bigint | NULL | FK: zones table 174 zones | is_global | smallint | 0 | zone is global 175 176 177New columns: 178 179 Table | Column | Type | Default | Description 180 --------------------|-------------------------|----------|---------|------------- 181 all status/history | endpoint_object_id | bigint | NULL | FK: objects table 182 servicestatus | check_source | TEXT | NULL | node name where check was executed 183 hoststatus | check_source | TEXT | NULL | node name where check was executed 184 statehistory | check_source | TEXT | NULL | node name where check was executed 185 servicestatus | is_reachable | integer | NULL | object reachability 186 hoststatus | is_reachable | integer | NULL | object reachability 187 logentries | object_id | bigint | NULL | FK: objects table (service associated with column) 188 {host,service}group | notes | TEXT | NULL | - 189 {host,service}group | notes_url | TEXT | NULL | - 190 {host,service}group | action_url | TEXT | NULL | - 191 customvariable* | is_json | integer | 0 | Defines whether `varvalue` is a json encoded string from custom variables, or not 192 servicestatus | original_attributes | TEXT | NULL | JSON encoded dictionary of original attributes if modified at runtime. 193 hoststatus | original_attributes | TEXT | NULL | JSON encoded dictionary of original attributes if modified at runtime. 194 195Additional command custom variables populated from 'vars' dictionary. 196Additional global custom variables populated from 'Vars' constant (object_id is NULL). 197 198### Livestatus Schema <a id="schema-livestatus"></a> 199 200#### Livestatus Schema Extensions <a id="schema-livestatus-extensions"></a> 201 202Icinga 2 specific extensions are shown below: 203 204New table: `endpoints`: 205 206 Table | Column 207 ----------|-------------- 208 endpoints | name 209 endpoints | identity 210 endpoints | node 211 endpoints | is_connected 212 endpoints | zone 213 214New table: `zones`: 215 216 Table | Column 217 ----------|-------------- 218 zone | name 219 zone | endpoints 220 zone | parent 221 zone | global 222 223New columns: 224 225 Table | Column 226 ----------|-------------- 227 hosts | is_reachable 228 services | is_reachable 229 hosts | cv_is_json 230 services | cv_is_json 231 contacts | cv_is_json 232 hosts | check_source 233 services | check_source 234 downtimes | triggers 235 downtimes | trigger_time 236 commands | custom_variable_names 237 commands | custom_variable_values 238 commands | custom_variables 239 commands | modified_attributes 240 commands | modified_attributes_list 241 status | custom_variable_names 242 status | custom_variable_values 243 status | custom_variables 244 hosts | original_attributes 245 services | original_attributes 246 247Command custom variables reflect the local 'vars' dictionary. 248Status custom variables reflect the global 'Vars' constant. 249 250#### Livestatus Hosts Table Attributes <a id="schema-livestatus-hosts-table-attributes"></a> 251 252 Key | Type | Note 253 ----------------------|-----------|------------------------- 254 name | string | . 255 display_name | string | . 256 alias | string | same as display_name. 257 address | string | . 258 address6 | string | NEW in Icinga. 259 check_command | string | . 260 check_command_expanded | string | . 261 event_handler | string | . 262 notification_period | string | host with notifications: period. 263 check_period | string | . 264 notes | string | . 265 notes_expanded | string | . 266 notes_url | string | . 267 notes_url_expanded | string | . 268 action_url | string | . 269 action_url_expanded | string | . 270 plugin_output | string | . 271 perf_data | string | . 272 icon_image | string | . 273 icon_image_expanded | string | . 274 icon_image_alt | stirng | . 275 statusmap_image | string | . 276 long_plugin_output | string | . 277 max_check_attempts | int | . 278 flap_detection_enabled | int | . 279 check_freshness | int | . 280 process_performance_data | int | . 281 accept_passive_checks | int | . 282 event_handler_enabled | int | . 283 acknowledgement_type | int | Only 0 or 1. 284 check_type | int | . 285 last_state | int | . 286 last_hard_state | int | . 287 current_attempt | int | . 288 last_notification | int | host with notifications: last notification. 289 next_notification | int | host with notifications: next notification. 290 next_check | int | . 291 last_hard_state_change | int | . 292 has_been_checked | int | . 293 current_notification_number | int | host with notifications: number. 294 total_services | int | . 295 checks_enabled | int | . 296 notifications_enabled | int | . 297 acknowledged | int | . 298 state | int | . 299 state_type | int | . 300 no_more_notifications | int | notification_interval == 0 && volatile == false. 301 last_check | int | . 302 last_state_change | int | . 303 last_time_up | int | . 304 last_time_down | int | . 305 last_time_unreachable | int | . 306 is_flapping | int | . 307 scheduled_downtime_depth | int | . 308 active_checks_enabled | int | . 309 modified_attributes | array | . 310 modified_attributes_list | array | . 311 check_interval | double | . 312 retry_interval | double | . 313 notification_interval | double | host with notifications: smallest interval. 314 low_flap_threshold | double | flapping_threshold 315 high_flap_threshold | double | flapping_threshold 316 latency | double | . 317 execution_time | double | . 318 percent_state_change | double | flapping. 319 in_notification_period | int | host with notifications: matching period. 320 in_check_period | int | . 321 contacts | array | host with notifications, users and user groups. 322 downtimes | array | id. 323 downtimes_with_info | array | id+author+comment. 324 comments | array | id. 325 comments_with_info | array | id+author+comment. 326 comments_with_extra_info | array | id+author+comment+entry_type+entry_time. 327 custom_variable_names | array | . 328 custom_variable_values | array | . 329 custom_variables | array | Array of custom variable array pair. 330 parents | array | Direct host parents. 331 childs | array | Direct host children (Note: `childs` is inherited from the origin MK_Livestatus protocol). 332 num_services | int | . 333 worst_service_state | int | All services and their worst state. 334 num_services_ok | int | All services with Ok state. 335 num_services_warn | int | All services with Warning state. 336 num_services_crit | int | All services with Critical state. 337 num_services_unknown | int | All services with Unknown state. 338 worst_service_hard_state | int | All services and their worst hard state. 339 num_services_hard_ok | int | All services in a hard state with Ok state. 340 num_services_hard_warn | int | All services in a hard state with Warning state. 341 num_services_hard_crit | int | All services in a hard state with Critical state. 342 num_services_hard_unknown | int | All services in a hard state with Unknown state. 343 hard_state | int | Returns OK if state is OK. Returns current state if now a hard state type. Returns last hard state otherwise. 344 staleness | int | Indicates time since last check normalized onto the check_interval. 345 groups | array | All hostgroups this host is a member of. 346 contact_groups | array | All usergroups associated with this host through notifications. 347 services | array | All services associated with this host. 348 services_with_state | array | All services associated with this host with state and hasbeenchecked. 349 services_with_info | array | All services associated with this host with state, hasbeenchecked and output. 350 351Not supported: `initial_state`, `pending_flex_downtime`, `check_flapping_recovery_notification`, 352`is_executing`, `check_options`, `obsess_over_host`, `first_notification_delay`, `x_3d`, `y_3d`, `z_3d`, 353`x_2d`, `y_2d`, `filename`, `pnpgraph_present`. 354 355#### Livestatus Hostgroups Table Attributes <a id="schema-livestatus-hostgroups-table-attributes"></a> 356 357 Key | Type | Note 358 ----------------------|-----------|------------------------- 359 name | string | . 360 alias | string | `display_name` attribute. 361 notes | string | . 362 notes_url | string | . 363 action_url | string | . 364 members | array | . 365 members_with_state | array | Host name and state. 366 worst_host_state | int | Of all group members. 367 num_hosts | int | In this group. 368 num_hosts_pending | int | . 369 num_hosts_up | int | . 370 num_hosts_down | int | . 371 num_hosts_unreach | int | . 372 num_services | int | Number of services associated with hosts in this hostgroup. 373 worst_services_state | int | . 374 num_services_pending | int | . 375 num_services_ok | int | . 376 num_services_warn | int | . 377 num_services_crit | int | . 378 num_services_unknown | int | . 379 worst_service_hard_state | int | . 380 num_services_hard_ok | int | . 381 num_services_hard_warn | int | . 382 num_services_hard_crit | int | . 383 num_services_hard_unknown | int | . 384 385#### Livestatus Services Table Attributes <a id="schema-livestatus-services-table-attributes"></a> 386 387 Key | Type | Note 388 ----------------------|-----------|------------------------- 389 description | string | . 390 display_name | string | . 391 alias | string | same as display_name. 392 check_command | string | . 393 check_command_expanded | string | . 394 event_handler | string | . 395 notification_period | string | host with notifications: period. 396 check_period | string | . 397 notes | string | . 398 notes_expanded | string | . 399 notes_url | string | . 400 notes_url_expanded | string | . 401 action_url | string | . 402 action_url_expanded | string | . 403 plugin_output | string | . 404 perf_data | string | . 405 icon_image | string | . 406 icon_image_expanded | string | . 407 icon_image_alt | stirng | . 408 statusmap_image | string | . 409 long_plugin_output | string | . 410 max_check_attempts | int | . 411 flap_detection_enabled | int | . 412 check_freshness | int | . 413 process_performance_data | int | . 414 accept_passive_checks | int | . 415 event_handler_enabled | int | . 416 acknowledgement_type | int | Only 0 or 1. 417 check_type | int | . 418 last_state | int | . 419 last_hard_state | int | . 420 current_attempt | int | . 421 last_notification | int | service with notifications: last notification. 422 next_notification | int | service with notifications: next notification. 423 next_check | int | . 424 last_hard_state_change | int | . 425 has_been_checked | int | . 426 current_notification_number | int | service with notifications: number. 427 checks_enabled | int | . 428 notifications_enabled | int | . 429 acknowledged | int | . 430 state | int | . 431 state_type | int | . 432 no_more_notifications | int | notification_interval == 0 && volatile == false. 433 last_check | int | . 434 last_state_change | int | . 435 last_time_ok | int | . 436 last_time_warning | int | . 437 last_time_critical | int | . 438 last_time_unknown | int | . 439 is_flapping | int | . 440 scheduled_downtime_depth | int | . 441 active_checks_enabled | int | . 442 modified_attributes | array | . 443 modified_attributes_list | array | . 444 check_interval | double | . 445 retry_interval | double | . 446 notification_interval | double | service with notifications: smallest interval. 447 low_flap_threshold | double | flapping_threshold 448 high_flap_threshold | double | flapping_threshold 449 latency | double | . 450 execution_time | double | . 451 percent_state_change | double | flapping. 452 in_notification_period | int | service with notifications: matching period. 453 in_check_period | int | . 454 contacts | array | service with notifications, users and user groups. 455 downtimes | array | id. 456 downtimes_with_info | array | id+author+comment. 457 comments | array | id. 458 comments_with_info | array | id+author+comment. 459 comments_with_extra_info | array | id+author+comment+entry_type+entry_time. 460 custom_variable_names | array | . 461 custom_variable_values | array | . 462 custom_variables | array | Array of custom variable array pair. 463 hard_state | int | Returns OK if state is OK. Returns current state if now a hard state type. Returns last hard state otherwise. 464 staleness | int | Indicates time since last check normalized onto the check_interval. 465 groups | array | All hostgroups this host is a member of. 466 contact_groups | array | All usergroups associated with this host through notifications. 467 host_ | join | Prefix for attributes from implicit join with hosts table. 468 469Not supported: `initial_state`, `is_executing`, `check_options`, `obsess_over_service`, `first_notification_delay`, 470`pnpgraph_present`. 471 472#### Livestatus Servicegroups Table Attributes <a id="schema-livestatus-servicegroups-table-attributes"></a> 473 474 Key | Type | Note 475 ----------------------|-----------|------------------------- 476 name | string | . 477 alias | string | `display_name` attribute. 478 notes | string | . 479 notes_url | string | . 480 action_url | string | . 481 members | array | CSV format uses `host|service` syntax. 482 members_with_state | array | Host, service, hoststate, servicestate. 483 worst_service_state | int | . 484 num_services | int | . 485 num_services_pending | int | . 486 num_services_ok | int | . 487 num_services_warn | int | . 488 num_services_crit | int | . 489 num_services_unknown | int | . 490 num_services_hard_ok | int | . 491 num_services_hard_warn | int | . 492 num_services_hard_crit | int | . 493 num_services_hard_unknown | int | . 494 495#### Livestatus Contacts Table Attributes <a id="schema-livestatus-contacts-table-attributes"></a> 496 497 Key | Type | Note 498 ----------------------|-----------|------------------------- 499 name | string | . 500 alias | string | `display_name` attribute. 501 email | string | . 502 pager | string | . 503 host_notification_period | string | . 504 service_notification_period | string | . 505 host_notifications_enabled | int | . 506 service_notifications_enabled | int | . 507 in_host_notification_period | int | . 508 in_service_notification_period | int | . 509 custom_variable_names | array | . 510 custom_variable_values | array | . 511 custom_variables | array | Array of customvariable array pairs. 512 modified_attributes | array | . 513 modified_attributes_list | array | . 514 515 516Not supported: `can_submit_commands`. 517 518#### Livestatus Contactgroups Table Attributes <a id="schema-livestatus-contactgroups-table-attributes"></a> 519 520 Key | Type | Note 521 ----------------------|-----------|------------------------- 522 name | string | . 523 alias | string | `display_name` attribute. 524 members | array | . 525 526 527#### Livestatus Commands Table Attributes <a id="schema-livestatus-commands-table-attributes"></a> 528 529 Key | Type | Note 530 ----------------------|-----------|------------------------- 531 name | string | 3 types of commands in Icinga 2. 532 line | string | . 533 534 535#### Livestatus Status Table Attributes <a id="schema-livestatus-status-table-attributes"></a> 536 537 Key | Type | Note 538 ----------------------|-----------|------------------------- 539 connections | int | Since application start. 540 connections_rate | double | . 541 service_checks | int | Since application start. 542 service_checks_rate | double | . 543 host_checks | int | Since application start. 544 host_checks_rate | double | . 545 external_commands | int | Since application start. 546 external_commands_rate | double | . 547 nagios_pid | string | Application PID. 548 enable_notifications | int | . 549 execute_service_checks | int | . 550 accept_passive_service_checks | int | . 551 execute_host_checks | int | . 552 accept_passive_host_checks | int | . 553 enable_event_handlers | int | . 554 check_service_freshness | int | . 555 check_host_freshness | int | . 556 enable_flap_detection | int | . 557 process_performance_data | int | . 558 check_external_commands | int | Always enabled. 559 program_start | int | In seconds. 560 last_command_check | int | Always. 561 interval_length | int | Compatibility mode: 60. 562 num_hosts | int | . 563 num_services | int | . 564 program_version | string | 2.0. 565 livestatus_active_connections | string | . 566 567Not supported: `neb_callbacks`, `neb_callbacks_rate`, `requests`, `requests_rate`, `forks`, `forks_rate`, 568`log_messages`, `log_messages_rate`, `livechecks`, `livechecks_rate`, `livecheck_overflows`, 569`livecheck_overflows_rate`, `obsess_over_services`, `obsess_over_hosts`, `last_log_rotation`, 570`external_command_buffer_slots`, `external_command_buffer_usage`, `external_command_buffer_max`, 571`cached_log_messages`, `livestatus_queued_connections`, `livestatus_threads`. 572 573 574#### Livestatus Comments Table Attributes <a id="schema-livestatus-comments-table-attributes"></a> 575 576 Key | Type | Note 577 ----------------------|-----------|------------------------- 578 author | string | . 579 comment | string | . 580 id | int | legacy_id. 581 entry_time | string | Seconds. 582 type | int | 1=host, 2=service. 583 is_service | int | . 584 persistent | int | Always. 585 source | string | Always external (1). 586 entry_type | int | . 587 expires | int | . 588 expire_time | string | Seconds. 589 service_ | join | Prefix for attributes from implicit join with services table. 590 host_ | join | Prefix for attributes from implicit join with hosts table. 591 592 593#### Livestatus Downtimes Table Attributes <a id="schema-livestatus-downtimes-table-attributes"></a> 594 595 Key | Type | Note 596 ----------------------|-----------|------------------------- 597 author | string | . 598 comment | string | . 599 id | int | legacy_id. 600 entry_time | string | Seconds. 601 type | int | 1=active, 0=pending. 602 is_service | int | . 603 start_time | string | Seconds. 604 end_time | string | Seconds. 605 fixed | int | 0=flexible, 1=fixed. 606 duration | int | . 607 triggered_by | int | legacy_id. 608 triggers | int | NEW in Icinga 2. 609 trigger_time | string | NEW in Icinga 2. 610 service_ | join | Prefix for attributes from implicit join with services table. 611 host_ | join | Prefix for attributes from implicit join with hosts table. 612 613 614#### Livestatus Timeperiods Table Attributes <a id="schema-livestatus-timeperiods-table-attributes"></a> 615 616 Key | Type | Note 617 ----------------------|-----------|------------------------- 618 name | string | . 619 alias | string | `display_name` attribute. 620 in | int | Current time is in timeperiod or not. 621 622#### Livestatus Log Table Attributes <a id="schema-livestatus-log-table-attributes"></a> 623 624 Key | Type | Note 625 ----------------------|-----------|------------------------- 626 time | int | Time of log event (unix timestamp). 627 lineno | int | Line number in `CompatLogger` log file. 628 class | int | Log message class: 0=info, 1=state, 2=program, 3=notification, 4=passive, 5=command. 629 message | string | Complete message line. 630 type | string | Text before the colon `:`. 631 options | string | Text after the colon `:`. 632 comment | string | Comment if available. 633 plugin_output | string | Check output if available. 634 state | int | Host or service state. 635 state_type | int | State type if available. 636 attempt | int | Current check attempt. 637 service_description | string | . 638 host_name | string | . 639 contact_name | string | . 640 command_name | string | . 641 current_service_ | join | Prefix for attributes from implicit join with services table. 642 current_host_ | join | Prefix for attributes from implicit join with hosts table. 643 current_contact_ | join | Prefix for attributes from implicit join with contacts table. 644 current_command_ | join | Prefix for attributes from implicit join with commands table. 645 646#### Livestatus Statehist Table Attributes <a id="schema-livestatus-statehist-table-attributes"></a> 647 648 Key | Type | Note 649 ----------------------|-----------|------------------------- 650 time | int | Time of log event (unix timestamp). 651 lineno | int | Line number in `CompatLogger` log file. 652 from | int | Start timestamp (unix timestamp). 653 until | int | End timestamp (unix timestamp). 654 duration | int | until-from. 655 duration_part | double | duration / query_part. 656 state | int | State: 0=ok, 1=warn, 2=crit, 3=unknown, -1=notmonitored. 657 host_down | int | Host associated with the service is down or not. 658 in_downtime | int | Host/service is in downtime. 659 in_host_downtime | int | Host associated with the service is in a downtime or not. 660 is_flapping | int | Host/service is flapping. 661 in_notification_period | int | Host/service notification periods match or not. 662 notification_period | string | Host/service notification period. 663 host_name | string | . 664 service_description | string | . 665 log_output | string | Log file output for this state. 666 duration_ok | int | until-from for OK state. 667 duration_part_ok | double | . 668 duration_warning | int | until-from for Warning state. 669 duration_part_warning | double | . 670 duration_critical | int | until-from for Critical state. 671 duration_part_critical | double | . 672 duration_unknown | int | until-from for Unknown state. 673 duration_part_unknown | double | . 674 duration_unmonitored | int | until-from for Not-Monitored state. 675 duration_part_unmonitored | double | . 676 current_service_ | join | Prefix for attributes from implicit join with services table. 677 current_host_ | join | Prefix for attributes from implicit join with hosts table. 678 679Not supported: `debug_info`. 680 681#### Livestatus Hostsbygroup Table Attributes <a id="schema-livestatus-hostsbygroup-table-attributes"></a> 682 683All [hosts](24-appendix.md#schema-livestatus-hosts-table-attributes) table attributes grouped with 684the [hostgroups](24-appendix.md#schema-livestatus-hostgroups-table-attributes) table prefixed with `hostgroup_`. 685 686#### Livestatus Servicesbygroup Table Attributes <a id="schema-livestatus-servicesbygroup-table-attributes"></a> 687 688All [services](24-appendix.md#schema-livestatus-services-table-attributes) table attributes grouped with 689the [servicegroups](24-appendix.md#schema-livestatus-servicegroups-table-attributes) table prefixed with `servicegroup_`. 690 691#### Livestatus Servicesbyhostgroup Table Attributes <a id="schema-livestatus-servicesbyhostgroup-table-attributes"></a> 692 693All [services](24-appendix.md#schema-livestatus-services-table-attributes) table attributes grouped with 694the [hostgroups](24-appendix.md#schema-livestatus-hostgroups-table-attributes) table prefixed with `hostgroup_`. 695 696