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