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                 | ;&lt;host_name&gt;;&lt;status_code&gt;;&lt;plugin_output&gt; (3) | -
10  PROCESS_SERVICE_CHECK_RESULT              | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;return_code&gt;;&lt;plugin_output&gt; (4) | -
11  SCHEDULE_HOST_CHECK                       | ;&lt;host_name&gt;;&lt;check_time&gt; (2)  | -
12  SCHEDULE_FORCED_HOST_CHECK                | ;&lt;host_name&gt;;&lt;check_time&gt; (2)  | -
13  SCHEDULE_SVC_CHECK                        | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;check_time&gt; (3)  | -
14  SCHEDULE_FORCED_SVC_CHECK                 | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;check_time&gt; (3)  | -
15  ENABLE_HOST_CHECK                         | ;&lt;host_name&gt; (1)  | -
16  DISABLE_HOST_CHECK                        | ;&lt;host_name&gt; (1) | -
17  ENABLE_SVC_CHECK                          | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
18  DISABLE_SVC_CHECK                         | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
19  SHUTDOWN_PROCESS                          | - | -
20  RESTART_PROCESS                           | - | -
21  SCHEDULE_FORCED_HOST_SVC_CHECKS           | ;&lt;host_name&gt;;&lt;check_time&gt; (2)  | -
22  SCHEDULE_HOST_SVC_CHECKS                  | ;&lt;host_name&gt;;&lt;check_time&gt; (2)  | -
23  ENABLE_HOST_SVC_CHECKS                    | ;&lt;host_name&gt; (1) | -
24  DISABLE_HOST_SVC_CHECKS                   | ;&lt;host_name&gt; (1) | -
25  ACKNOWLEDGE_SVC_PROBLEM                   | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;sticky&gt;;&lt;notify&gt;;&lt;persistent&gt;;&lt;author&gt;;&lt;comment&gt; (7) | Note: Icinga 2 treats all comments as persistent.
26  ACKNOWLEDGE_SVC_PROBLEM_EXPIRE            | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;sticky&gt;;&lt;notify&gt;;&lt;persistent&gt;;&lt;timestamp&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | Note: Icinga 2 treats all comments as persistent.
27  REMOVE_SVC_ACKNOWLEDGEMENT                | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
28  ACKNOWLEDGE_HOST_PROBLEM                  | ;&lt;host_name&gt;;&lt;sticky&gt;;&lt;notify&gt;;&lt;persistent&gt;;&lt;author&gt;;&lt;comment&gt; (6) | Note: Icinga 2 treats all comments as persistent.
29  ACKNOWLEDGE_HOST_PROBLEM_EXPIRE           | ;&lt;host_name&gt;;&lt;sticky&gt;;&lt;notify&gt;;&lt;persistent&gt;;&lt;timestamp&gt;;&lt;author&gt;;&lt;comment&gt; (7) | Note: Icinga 2 treats all comments as persistent.
30  REMOVE_HOST_ACKNOWLEDGEMENT               | ;&lt;host_name&gt; (1)  | -
31  DISABLE_HOST_FLAP_DETECTION               | ;&lt;host_name&gt; (1)  | -
32  ENABLE_HOST_FLAP_DETECTION                | ;&lt;host_name&gt; (1)  | -
33  DISABLE_SVC_FLAP_DETECTION                | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
34  ENABLE_SVC_FLAP_DETECTION                 | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
35  ENABLE_HOSTGROUP_SVC_CHECKS               | ;&lt;hostgroup_name&gt; (1)  | -
36  DISABLE_HOSTGROUP_SVC_CHECKS              | ;&lt;hostgroup_name&gt; (1)  | -
37  ENABLE_SERVICEGROUP_SVC_CHECKS            | ;&lt;servicegroup_name&gt; (1)  | -
38  DISABLE_SERVICEGROUP_SVC_CHECKS           | ;&lt;servicegroup_name&gt; (1)  | -
39  ENABLE_PASSIVE_HOST_CHECKS                | ;&lt;host_name&gt; (1)  | -
40  DISABLE_PASSIVE_HOST_CHECKS               | ;&lt;host_name&gt; (1)  | -
41  ENABLE_PASSIVE_SVC_CHECKS                 | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
42  DISABLE_PASSIVE_SVC_CHECKS                | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
43  ENABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS    | ;&lt;servicegroup_name&gt; (1)  | -
44  DISABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS   | ;&lt;servicegroup_name&gt; (1)  | -
45  ENABLE_HOSTGROUP_PASSIVE_SVC_CHECKS       | ;&lt;hostgroup_name&gt; (1)  | -
46  DISABLE_HOSTGROUP_PASSIVE_SVC_CHECKS      | ;&lt;hostgroup_name&gt; (1)  | -
47  PROCESS_FILE                              | ;&lt;file_name&gt;;&lt;delete&gt; (2)  | -
48  SCHEDULE_SVC_DOWNTIME                     | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (9)  | -
49  DEL_SVC_DOWNTIME                          | ;&lt;downtime_id&gt; (1)   | -
50  SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME      | ;&lt;host_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | -
51  SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME | ;&lt;host_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | -
52  SCHEDULE_HOST_DOWNTIME                    | ;&lt;host_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | -
53  DEL_HOST_DOWNTIME                         | ;&lt;downtime_id&gt; (1)  | -
54  DEL_DOWNTIME_BY_HOST_NAME                 | ;&lt;host_name&gt;[;&lt;service_name;&gt;[;&lt;start_time;&gt;[;&lt;comment_text;&gt;]]] (1)  | -
55  SCHEDULE_HOST_SVC_DOWNTIME                | ;&lt;host_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | -
56  SCHEDULE_HOSTGROUP_HOST_DOWNTIME          | ;&lt;hostgroup_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | -
57  SCHEDULE_HOSTGROUP_SVC_DOWNTIME           | ;&lt;hostgroup_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | -
58  SCHEDULE_SERVICEGROUP_HOST_DOWNTIME       | ;&lt;servicegroup_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | -
59  SCHEDULE_SERVICEGROUP_SVC_DOWNTIME        | ;&lt;servicegroup_name&gt;;&lt;start_time&gt;;&lt;end_time&gt;;&lt;fixed&gt;;&lt;trigger_id&gt;;&lt;duration&gt;;&lt;author&gt;;&lt;comment&gt; (8)  | -
60  ADD_HOST_COMMENT                          | ;&lt;host_name&gt;;&lt;persistent&gt;;&lt;author&gt;;&lt;comment&gt; (4)  | Note: Icinga 2 treats all comments as persistent.
61  DEL_HOST_COMMENT                          | ;&lt;comment_id&gt; (1)  | -
62  ADD_SVC_COMMENT                           | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;persistent&gt;;&lt;author&gt;;&lt;comment&gt; (5)  | Note: Icinga 2 treats all comments as persistent.
63  DEL_SVC_COMMENT                           | ;&lt;comment_id&gt; (1)  | -
64  DEL_ALL_HOST_COMMENTS                     | ;&lt;host_name&gt; (1)  | -
65  DEL_ALL_SVC_COMMENTS                      | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
66  SEND_CUSTOM_HOST_NOTIFICATION             | ;&lt;host_name&gt;;&lt;options&gt;;&lt;author&gt;;&lt;comment&gt; (4)  | -
67  SEND_CUSTOM_SVC_NOTIFICATION              | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;options&gt;;&lt;author&gt;;&lt;comment&gt; (5)  | -
68  DELAY_HOST_NOTIFICATION                   | ;&lt;host_name&gt;;&lt;notification_time&gt; (2)  | -
69  DELAY_SVC_NOTIFICATION                    | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;notification_time&gt; (3)  | -
70  ENABLE_HOST_NOTIFICATIONS                 | ;&lt;host_name&gt; (1)  | -
71  DISABLE_HOST_NOTIFICATIONS                | ;&lt;host_name&gt; (1)  | -
72  ENABLE_SVC_NOTIFICATIONS                  | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
73  DISABLE_SVC_NOTIFICATIONS                 | ;&lt;host_name&gt;;&lt;service_name&gt; (2) | -
74  ENABLE_HOST_SVC_NOTIFICATIONS		    | ;&lt;host_name&gt; (1)  | -
75  DISABLE_HOST_SVC_NOTIFICATIONS	    | ;&lt;host_name&gt; (1)  | -
76  DISABLE_HOSTGROUP_HOST_CHECKS             | ;&lt;hostgroup_name&gt; (1)  | -
77  DISABLE_HOSTGROUP_PASSIVE_HOST_CHECKS     | ;&lt;hostgroup_name&gt; (1)  | -
78  DISABLE_SERVICEGROUP_HOST_CHECKS          | ;&lt;servicegroup_name&gt; (1)  | -
79  DISABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS  | ;&lt;servicegroup_name&gt; (1)  | -
80  ENABLE_HOSTGROUP_HOST_CHECKS              | ;&lt;hostgroup_name&gt; (1)  | -
81  ENABLE_HOSTGROUP_PASSIVE_HOST_CHECKS      | ;&lt;hostgroup_name&gt; (1) | -
82  ENABLE_SERVICEGROUP_HOST_CHECKS           | ;&lt;servicegroup_name&gt; (1)  | -
83  ENABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS   | ;&lt;servicegroup_name&gt; (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          | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;check_interval&gt; (3)  | -
97  CHANGE_NORMAL_HOST_CHECK_INTERVAL         | ;&lt;host_name&gt;;&lt;check_interval&gt; (2)  | -
98  CHANGE_RETRY_SVC_CHECK_INTERVAL           | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;check_interval&gt; (3)  | -
99  CHANGE_RETRY_HOST_CHECK_INTERVAL          | ;&lt;host_name&gt;;&lt;check_interval&gt; (2) | -
100  ENABLE_HOST_EVENT_HANDLER                 | ;&lt;host_name&gt; (1)  | -
101  DISABLE_HOST_EVENT_HANDLER                | ;&lt;host_name&gt; (1)  | -
102  ENABLE_SVC_EVENT_HANDLER                  | ;&lt;host_name&gt;;&lt;service_name&gt; (2)  | -
103  DISABLE_SVC_EVENT_HANDLER                 | ;&lt;host_name&gt;;&lt;service_name&gt; (2) | -
104  CHANGE_HOST_EVENT_HANDLER                 | ;&lt;host_name&gt;;&lt;event_command_name&gt; (2)  | -
105  CHANGE_SVC_EVENT_HANDLER                  | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;event_command_name&gt; (3)  | -
106  CHANGE_HOST_CHECK_COMMAND                 | ;&lt;host_name&gt;;&lt;check_command_name&gt; (2)  | -
107  CHANGE_SVC_CHECK_COMMAND                  | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;check_command_name&gt; (3)  | -
108  CHANGE_MAX_HOST_CHECK_ATTEMPTS            | ;&lt;host_name&gt;;&lt;check_attempts&gt; (2)  | -
109  CHANGE_MAX_SVC_CHECK_ATTEMPTS             | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;check_attempts&gt; (3)  | -
110  CHANGE_HOST_CHECK_TIMEPERIOD              | ;&lt;host_name&gt;;&lt;timeperiod_name&gt; (2)   | -
111  CHANGE_SVC_CHECK_TIMEPERIOD               | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;timeperiod_name&gt;  | -
112  CHANGE_CUSTOM_HOST_VAR                    | ;&lt;host_name&gt;;&lt;var_name&gt;;&lt;var_value&gt; (3)  | -
113  CHANGE_CUSTOM_SVC_VAR                     | ;&lt;host_name&gt;;&lt;service_name&gt;;&lt;var_name&gt;;&lt;var_value&gt; (4)  | -
114  CHANGE_CUSTOM_USER_VAR                    | ;&lt;user_name&gt;;&lt;var_name&gt;;&lt;var_value&gt; (3)  | -
115  CHANGE_CUSTOM_CHECKCOMMAND_VAR            | ;&lt;check_command_name&gt;;&lt;var_name&gt;;&lt;var_value&gt; (3)  | -
116  CHANGE_CUSTOM_EVENTCOMMAND_VAR            | ;&lt;event_command_name&gt;;&lt;var_name&gt;;&lt;var_value&gt; (3)  | -
117  CHANGE_CUSTOM_NOTIFICATIONCOMMAND_VAR     | ;&lt;notification_command_name&gt;;&lt;var_name&gt;;&lt;var_value&gt; (3)  | -
118  ENABLE_HOSTGROUP_HOST_NOTIFICATIONS       | ;&lt;hostgroup_name&gt; (1) | -
119  ENABLE_HOSTGROUP_SVC_NOTIFICATIONS        | ;&lt;hostgroup_name&gt; (1)  | -
120  DISABLE_HOSTGROUP_HOST_NOTIFICATIONS      | ;&lt;hostgroup_name&gt; (1)  | -
121  DISABLE_HOSTGROUP_SVC_NOTIFICATIONS       | ;&lt;hostgroup_name&gt; (1)  | -
122  ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS    | ;&lt;servicegroup_name&gt; (1)  | -
123  DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS   | ;&lt;servicegroup_name&gt; (1)  | -
124  ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS     | ;&lt;servicegroup_name&gt; (1)  | -
125  DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS    | ;&lt;servicegroup_name&gt; (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