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