1 ## <a id="object-types"></a> Object Types
3 ### <a id="objecttype-host"></a> Host
9 object Host "localhost" {
10 display_name = "The best host there is"
12 groups = [ "all-hosts" ]
14 check_command = "hostalive"
20 ----------------|----------------
21 display_name |**Optional.** A short description of the host.
22 groups |**Optional.** A list of host groups this host belongs to.
23 vars |**Optional.** A dictionary containing custom attributes that are specific to this host.
24 check\_command |**Required.** The name of the check command.
25 max\_check\_attempts|**Optional.** The number of times a host is re-checked before changing into a hard state. Defaults to 3.
26 check\_period |**Optional.** The name of a time period which determines when this host should be checked. Not set by default.
27 check\_interval |**Optional.** The check interval (in seconds). This interval is used for checks when the host is in a `HARD` state. Defaults to 5 minutes.
28 retry\_interval |**Optional.** The retry interval (in seconds). This interval is used for checks when the host is in a `SOFT` state. Defaults to 1 minute.
29 enable\_notifications|**Optional.** Whether notifications are enabled. Defaults to true.
30 enable\_active\_checks|**Optional.** Whether active checks are enabled. Defaults to true.
31 enable\_passive\_checks|**Optional.** Whether passive checks are enabled. Defaults to true.
32 enable\_event\_handler|**Optional.** Enables event handlers for this host. Defaults to true.
33 enable\_flap\_detection|**Optional.** Whether flap detection is enabled. Defaults to true.
34 enable\_perfdata|**Optional.** Whether performance data processing is enabled. Defaults to true.
35 event\_command |**Optional.** The name of an event command that should be executed every time the host's state changes.
36 flapping\_threshold|**Optional.** The flapping threshold in percent when a host is considered to be flapping.
37 volatile |**Optional.** The volatile setting enables always `HARD` state types if `NOT-OK` state changes occur.
38 authorities |**Optional.** A list of Endpoints on which this host check will be executed in a cluster scenario.
39 domains |**Optional.** A list of Domains for this host object in a cluster scenario.
41 ### <a id="objecttype-hostgroup"></a> HostGroup
47 object HostGroup "my-hosts" {
48 display_name = "My hosts"
54 ----------------|----------------
55 display_name |**Optional.** A short description of the host group.
57 ### <a id="objecttype-service"></a> Service
59 Service objects describe network services and how they should be checked
64 > Rather than creating a `Service` object for a specific host it is usually easier
65 > to just create a `Service` template and use the `apply` keyword to assign the
66 > service to a number of hosts.
70 object Service "uptime" {
71 host_name = "localhost"
73 display_name = "localhost Uptime"
75 check_command = "check_snmp"
79 oid = "DISMAN-EVENT-MIB::sysUpTimeInstance"
85 groups = [ "all-services", "snmp" ]
91 ----------------|----------------
92 host_name |**Required.** The host this service belongs to. There must be a `Host` object with that name.
93 name |**Required.** The service name. Must be unique on a per-host basis (Similar to the service_description attribute in Icinga 1.x).
94 groups |**Optional.** The service groups this service belongs to.
96 In addition to these attributes you can also use any of the attributes which are also valid for `Host` objects.
98 Service objects have composite names, i.e. their names are based on the host_name attribute and the name you specified. This means
99 you can define more than one object with the same (short) name as long as the `host_name` attribute has a different value.
101 ### <a id="objecttype-servicegroup"></a> ServiceGroup
107 object ServiceGroup "snmp" {
108 display_name = "SNMP services"
114 ----------------|----------------
115 display_name |**Optional.** A short description of the service group.
117 ### <a id="objecttype-notification"></a> Notification
119 Notification objects are used to specify how users should be notified in case
120 of service state changes and other events.
124 > Rather than creating a `Notification` object for a specific service it is usually easier
125 > to just create a `Notification` template and use the `apply` keyword to assign the
126 > notification to a number of services.
130 object Notification "localhost-ping-notification" {
131 host_name = "localhost"
132 service_name = "ping4"
134 notification_command = "mail-notification"
136 users = [ "user1", "user2" ]
138 notification_type_filter = [ Problem, Recovery ]
144 --------------------------|----------------
145 host_name | **Required.** The name of the host this notification belongs to.
146 service_name | **Required.** The short name of the service this notification belongs to.
147 vars | **Optional.** A dictionary containing custom attributes that are specific to this notification object.
148 users | **Optional.** A list of user names who should be notified.
149 user_groups | **Optional.** A list of user group names who should be notified.
150 times | **Optional.** A dictionary containing `begin` and `end` attributes for the notification.
151 notification_command | **Required.** The name of the notification command which should be executed when the notification is triggered.
152 notification_interval | **Optional.** The notification interval (in seconds). This interval is used for active notifications. Defaults to 5 minutes.
153 notification_period | **Optional.** The name of a time period which determines when this notification should be triggered. Not set by default.
154 notification_type_filter | **Optional.** A list of state filters when this notification should be triggered. By default everything is matched.
155 notification_state_filter | **Optional.** A list of type filters when this notification should be triggered. By default everything is matched.
157 Available notification state filters:
166 Available notification type filters:
178 ### <a id="objecttype-dependency"></a> Dependency
180 Dependency objects are used to specify dependencies between hosts and services.
184 > Rather than creating a `Dependency` object for a specific service it is usually easier
185 > to just create a `Dependency` template and use the `apply` keyword to assign the
186 > dependency to a number of services.
190 object Dependency "webserver-internet" {
191 child_host_name = "webserver"
192 child_service_name = "ping4"
194 parent_host_name = "internet"
195 parent_service_name = "ping4"
197 state_filter = [ OK, Warning ]
199 disable_checks = true
205 ----------------|----------------
206 parent_host_name |**Required.** The parent host.
207 parent_service_name |**Optional.** The parent service. When not specified the host's check service is used.
208 child_host_name |**Required.** The child host.
209 child_service_name |**Optional.** The child service. When not specified the host's check service is used.
210 disable_checks |**Optional.** Whether to disable checks when this dependency fails. Defaults to false.
211 disable_notifications|**Optional.** Whether to disable notifications when this dependency fails. Defaults to true.
212 period |**Optional.** Time period during which this dependency is enabled.
213 state_filter |**Optional.** A list of type filters when this dependency should be OK. Defaults to [ OK, Warning ] for services and [ Up ] for hosts.
215 Available state filters:
224 Dependency objects have composite names, i.e. their names are based on the `child_host_name` and `child_service_name` attributes and the
225 name you specified. This means you can define more than one object with the same (short) name as long as one of the `child_host_name` and
226 `child_service_name` attributes has a different value.
228 ### <a id="objecttype-user"></a> User
234 object User "icingaadmin" {
235 display_name = "Icinga 2 Admin"
236 groups = [ "icingaadmins" ]
238 enable_notifications = 1
239 notification_period = "24x7"
241 notification_state_filter = [ OK, Warning, Critical, Unknown ]
242 notification_type_filter = [ Problem, Recovery ]
245 name = "Icinga 2 Admin"
246 email = "icinga@localhost"
247 pager = "icingaadmin@localhost.localdomain"
251 notes = "This is the Icinga 2 Admin account."
255 Available notification state filters:
264 Available notification type filters:
279 ----------------|----------------
280 display_name |**Optional.** A short description of the user.
281 vars |**Optional.** A dictionary containing custom attributes that are specific to this user.
282 groups |**Optional.** An array of group names.
283 enable_notifications|**Optional.** Whether notifications are enabled for this user.
284 notification_period|**Optional.** The name of a time period which determines when this notification should be triggered. Not set by default.
285 notification_type_filter|**Optional.** A set of state filters when this notification should be triggered. By default everything is matched.
286 notification_state_filter|**Optional.** A set of type filters when this notification should be triggered. By default everything is matched.
288 ### <a id="objecttype-usergroup"></a> UserGroup
294 object UserGroup "icingaadmins" {
295 display_name = "Icinga 2 Admin Group"
301 ----------------|----------------
302 display_name |**Optional.** A short description of the user group.
304 ### <a id="objecttype-timeperiod"></a> TimePeriod
306 Time periods can be used to specify when services should be checked or to limit
307 when notifications should be sent out.
311 object TimePeriod "24x7" {
312 import "legacy-timeperiod"
314 display_name = "Icinga 2 24x7 TimePeriod"
317 monday = "00:00-24:00"
318 tuesday = "00:00-24:00"
319 wednesday = "00:00-24:00"
320 thursday = "00:00-24:00"
321 friday = "00:00-24:00"
322 saturday = "00:00-24:00"
323 sunday = "00:00-24:00"
330 ----------------|----------------
331 display_name |**Optional.** A short description of the time period.
332 methods |**Required.** The "update" script method takes care of updating the internal representation of the time period. In virtually all cases you should import the "legacy-timeperiod" template to take care of this setting.
333 ranges |**Required.** A dictionary containing information which days and durations apply to this timeperiod.
335 The `/etc/icinga2/conf.d/timeperiods.conf` file is usually used to define
336 timeperiods including this one.
338 ### <a id="objecttype-scheduleddowntime"></a> ScheduledDowntime
340 ScheduledDowntime objects can be used to set up recurring downtimes for services.
344 > Rather than creating a `ScheduledDowntime` object for a specific service it is usually easier
345 > to just create a `ScheduledDowntime` template and use the `apply` keyword to assign the
346 > scheduled downtime to a number of services.
350 object ScheduledDowntime "some-downtime" {
351 host_name = "localhost"
352 service_name = "ping4"
354 author = "icingaadmin"
355 comment = "Some comment"
361 "sunday" = "02:00-03:00"
368 ----------------|----------------
369 host_name |**Required.** The name of the host this notification belongs to.
370 service_name |**Required.** The short name of the service this notification belongs to.
371 author |**Required.** The author of the downtime.
372 comment |**Required.** A comment for the downtime.
373 fixed |**Optional.** Whether this is a fixed downtime. Defaults to true.
374 duration |**Optional.** How long the downtime lasts. Only has an effect for flexible (non-fixed) downtimes.
375 ranges |**Required.** A dictionary containing information which days and durations apply to this timeperiod.
377 ScheduledDowntime objects have composite names, i.e. their names are based
378 on the `host_name` and `service_name` attributes and the
379 name you specified. This means you can define more than one object
380 with the same (short) name as long as one of the `host_name` and
381 `service_name` attributes has a different value.
383 ### <a id="objecttype-filelogger"></a> FileLogger
385 Specifies Icinga 2 logging to a file.
389 object FileLogger "my-debug-file" {
391 path = "/var/log/icinga2/icinga2-debug.log"
397 ----------------|----------------
398 path |**Required.** The log path.
399 severity |**Optional.** The minimum severity for this log. Can be "debug", "information", "warning" or "critical". Defaults to "information".
401 ### <a id="objecttype-sysloglogger"></a> SyslogLogger
403 Specifies Icinga 2 logging to syslog.
407 object SyslogLogger "my-crit-syslog" {
408 severity = "critical"
414 ----------------|----------------
415 severity |**Optional.** The minimum severity for this log. Can be "debug", "information", "warning" or "critical". Defaults to "information".
417 ### <a id="objecttype-checkcommand"></a> CheckCommand
419 A check command definition. Additional default command custom attributes can be
424 object CheckCommand "check_snmp" {
425 import "plugin-check-command"
428 PluginDir + "/check_snmp",
435 address = "127.0.0.1"
443 ----------------|----------------
444 methods |**Required.** The "execute" script method takes care of executing the check. In virtually all cases you should import the "plugin-check-command" template to take care of this setting.
445 command |**Required.** The command. This can either be an array of individual command arguments. Alternatively a string can be specified in which case the shell interpreter (usually /bin/sh) takes care of parsing the command.
446 env |**Optional.** A dictionary of macros which should be exported as environment variables prior to executing the command.
447 vars |**Optional.** A dictionary containing custom attributes that are specific to this command.
448 timeout |**Optional.** The command timeout in seconds. Defaults to 5 minutes.
450 ### <a id="objecttype-notificationcommand"></a> NotificationCommand
452 A notification command definition.
456 object NotificationCommand "mail-service-notification" {
457 import "plugin-notification-command"
460 SysconfDir + "/icinga2/scripts/mail-notification.sh"
464 "NOTIFICATIONTYPE" = "$notification.type$"
465 "SERVICEDESC" = "$service.description$"
466 "HOSTALIAS" = "$host.displayname$",
467 "HOSTADDRESS" = "$host.vars.address$",
468 "SERVICESTATE" = "$service.state$",
469 "LONGDATETIME" = "$icinga.longdatetime$",
470 "SERVICEOUTPUT" = "$service.output$",
471 "NOTIFICATIONAUTHORNAME" = "$notification.author$",
472 "NOTIFICATIONCOMMENT" = "$notification.comment$",
473 "HOSTDISPLAYNAME" = "$host.displayname$",
474 "SERVICEDISPLAYNAME" = "$service.displayname$",
475 "USEREMAIL" = "$user.vars.email$"
482 ----------------|----------------
483 methods |**Required.** The "execute" script method takes care of executing the notification. In virtually all cases you should import the "plugin-notification-command" template to take care of this setting.
484 command |**Required.** The command. This can either be an array of individual command arguments. Alternatively a string can be specified in which case the shell interpreter (usually /bin/sh) takes care of parsing the command.
485 env |**Optional.** A dictionary of macros which should be exported as environment variables prior to executing the command.
486 vars |**Optional.** A dictionary containing custom attributes that are specific to this command.
487 timeout |**Optional.** The command timeout in seconds. Defaults to 5 minutes.
489 ### <a id="objecttype-eventcommand"></a> EventCommand
491 An event command definition.
495 object EventCommand "restart-httpd-event" {
496 import "plugin-event-command"
498 command = "/opt/bin/restart-httpd.sh"
505 ----------------|----------------
506 methods |**Required.** The "execute" script method takes care of executing the event handler. In virtually all cases you should import the "plugin-event-command" template to take care of this setting.
507 command |**Required.** The command. This can either be an array of individual command arguments. Alternatively a string can be specified in which case the shell interpreter (usually /bin/sh) takes care of parsing the command.
508 env |**Optional.** A dictionary of macros which should be exported as environment variables prior to executing the command.
509 vars |**Optional.** A dictionary containing custom attributes that are specific to this command.
510 timeout |**Optional.** The command timeout in seconds. Defaults to 5 minutes.
512 ### <a id="objecttype-perfdatawriter"></a> PerfdataWriter
514 Writes check result performance data to a defined path using macro
521 object PerfdataWriter "pnp" {
522 host_perfdata_path = "/var/spool/icinga2/perfdata/host-perfdata"
524 service_perfdata_path = "/var/spool/icinga2/perfdata/service-perfdata"
526 host_format_template = "DATATYPE::HOSTPERFDATA\tTIMET::$icinga.timet$\tHOSTNAME::$host.name$\tHOSTPERFDATA::$host.perfdata$\tHOSTCHECKCOMMAND::$host.checkcommand$\tHOSTSTATE::$host.state$\tHOSTSTATETYPE::$host.statetype$"
527 service_format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$icinga.timet$\tHOSTNAME::$host.name$\tSERVICEDESC::$service.description$\tSERVICEPERFDATA::$service.perfdata$\tSERVICECHECKCOMMAND::$service.checkcommand$\tHOSTSTATE::$host.state$\tHOSTSTATETYPE::$host.statetype$\tSERVICESTATE::$service.state$\tSERVICESTATETYPE::$service.statetype$"
529 rotation_interval = 15s
535 ------------------------|----------------
536 host_perfdata\_path |**Optional.** Path to the host performance data file. Defaults to LocalStateDir + "/spool/icinga2/perfdata/host-perfdata".
537 service_perfdata\_path |**Optional.** Path to the service performance data file. Defaults to LocalStateDir + "/spool/icinga2/perfdata/service-perfdata".
538 host_temp\_path |**Optional.** Path to the temporary host file. Defaults to LocalStateDir + "/spool/icinga2/tmp/host-perfdata".
539 service_temp\_path |**Optional.** Path to the temporary service file. Defaults to LocalStateDir + "/spool/icinga2/tmp/service-perfdata".
540 host_format\_template |**Optional.** Host Format template for the performance data file. Defaults to a template that's suitable for use with PNP4Nagios.
541 service_format\_template|**Optional.** Service Format template for the performance data file. Defaults to a template that's suitable for use with PNP4Nagios.
542 rotation\_interval |**Optional.** Rotation interval for the files specified in `{host,service}\_perfdata\_path`. Defaults to 30 seconds.
544 When rotating the performance data file the current UNIX timestamp is appended to the path specified
545 in `host_perfdata\_path` and `service_perfdata\_path` to generate a unique filename.
547 ### <a id="objecttype-graphitewriter"></a> GraphiteWriter
549 Writes check result metrics and performance data to a defined
550 Graphite Carbon host.
556 object GraphiteWriter "graphite" {
564 ----------------|----------------
565 host |**Optional.** Graphite Carbon host address. Defaults to '127.0.0.1'.
566 port |**Optional.** Graphite Carbon port. Defaults to 2003.
568 ### <a id="objecttype-idomysqlconnection"></a> IdoMySqlConnection
570 IDO database adapter for MySQL.
574 library "db_ido_mysql"
576 object IdoMysqlConnection "mysql-ido" {
582 table_prefix = "icinga_"
583 instance_name = "icinga2"
584 instance_description = "icinga2 dev instance"
587 downtimehistory_age = 48h
591 categories = DbCatConfig | DbCatState
597 ----------------|----------------
598 host |**Optional.** MySQL database host address. Defaults to "localhost".
599 port |**Optional.** MySQL database port. Defaults to 3306.
600 user |**Optional.** MySQL database user with read/write permission to the icinga database. Defaults to "icinga".
601 password |**Optional.** MySQL database user's password. Defaults to "icinga".
602 database |**Optional.** MySQL database name. Defaults to "icinga".
603 table\_prefix |**Optional.** MySQL database table prefix. Defaults to "icinga\_".
604 instance\_name |**Optional.** Unique identifier for the local Icinga 2 instance. Defaults to "default".
605 instance\_description|**Optional.** Description for the Icinga 2 instance.
606 cleanup |**Optional.** Dictionary with items for historical table cleanup.
607 categories |**Optional.** The types of information that should be written to the database.
612 ----------------|----------------
613 acknowledgements_age |**Optional.** Max age for acknowledgements table rows (entry_time). Defaults to 0 (never).
614 commenthistory_age |**Optional.** Max age for commenthistory table rows (entry_time). Defaults to 0 (never).
615 contactnotifications_age |**Optional.** Max age for contactnotifications table rows (start_time). Defaults to 0 (never).
616 contactnotificationmethods_age |**Optional.** Max age for contactnotificationmethods table rows (start_time). Defaults to 0 (never).
617 downtimehistory_age |**Optional.** Max age for downtimehistory table rows (entry_time). Defaults to 0 (never).
618 eventhandlers_age |**Optional.** Max age for eventhandlers table rows (start_time). Defaults to 0 (never).
619 externalcommands_age |**Optional.** Max age for externalcommands table rows (entry_time). Defaults to 0 (never).
620 flappinghistory_age |**Optional.** Max age for flappinghistory table rows (event_time). Defaults to 0 (never).
621 hostchecks_age |**Optional.** Max age for hostalives table rows (start_time). Defaults to 0 (never).
622 logentries_age |**Optional.** Max age for logentries table rows (logentry_time). Defaults to 0 (never).
623 notifications_age |**Optional.** Max age for notifications table rows (start_time). Defaults to 0 (never).
624 processevents_age |**Optional.** Max age for processevents table rows (event_time). Defaults to 0 (never).
625 statehistory_age |**Optional.** Max age for statehistory table rows (state_time). Defaults to 0 (never).
626 servicechecks_age |**Optional.** Max age for servicechecks table rows (start_time). Defaults to 0 (never).
627 systemcommands_age |**Optional.** Max age for systemcommands table rows (start_time). Defaults to 0 (never).
632 ---------------------|----------------
633 DbCatConfig | Configuration data
634 DbCatState | Current state data
635 DbCatAcknowledgement | Acknowledgements
636 DbCatComment | Comments
637 DbCatDowntime | Downtimes
638 DbCatEventHandler | Event handler data
639 DbCatExternalCommand | External commands
640 DbCatFlapping | Flap detection data
641 DbCatCheck | Check results
642 DbCatLog | Log messages
643 DbCatNotification | Notifications
644 DbCatProgramStatus | Program status data
645 DbCatRetention | Retention data
646 DbCatStateHistory | Historical state data
648 Multiple categories can be combined using the `|` operator. In addition to
649 the category flags listed above the `DbCatEverything` flag may be used as
650 a shortcut for listing all flags.
652 ### <a id="objecttype-idomysqlconnection"></a> IdoPgSqlConnection
654 IDO database adapter for PostgreSQL.
658 library "db_ido_pgsql"
660 object IdoMysqlConnection "pgsql-ido" {
666 table_prefix = "icinga_"
667 instance_name = "icinga2"
668 instance_description = "icinga2 dev instance"
671 downtimehistory_age = 48h
675 categories = DbCatConfig | DbCatState
681 ----------------|----------------
682 host |**Optional.** PostgreSQL database host address. Defaults to "localhost".
683 port |**Optional.** PostgreSQL database port. Defaults to "5432".
684 user |**Optional.** PostgreSQL database user with read/write permission to the icinga database. Defaults to "icinga".
685 password |**Optional.** PostgreSQL database user's password. Defaults to "icinga".
686 database |**Optional.** PostgreSQL database name. Defaults to "icinga".
687 table\_prefix |**Optional.** PostgreSQL database table prefix. Defaults to "icinga\_".
688 instance\_name |**Optional.** Unique identifier for the local Icinga 2 instance. Defaults to "default".
689 instance\_description|**Optional.** Description for the Icinga 2 instance.
690 cleanup |**Optional.** Dictionary with items for historical table cleanup.
691 categories |**Optional.** The types of information that should be written to the database.
696 ----------------|----------------
697 acknowledgements_age |**Optional.** Max age for acknowledgements table rows (entry_time). Defaults to 0 (never).
698 commenthistory_age |**Optional.** Max age for commenthistory table rows (entry_time). Defaults to 0 (never).
699 contactnotifications_age |**Optional.** Max age for contactnotifications table rows (start_time). Defaults to 0 (never).
700 contactnotificationmethods_age |**Optional.** Max age for contactnotificationmethods table rows (start_time). Defaults to 0 (never).
701 downtimehistory_age |**Optional.** Max age for downtimehistory table rows (entry_time). Defaults to 0 (never).
702 eventhandlers_age |**Optional.** Max age for eventhandlers table rows (start_time). Defaults to 0 (never).
703 externalcommands_age |**Optional.** Max age for externalcommands table rows (entry_time). Defaults to 0 (never).
704 flappinghistory_age |**Optional.** Max age for flappinghistory table rows (event_time). Defaults to 0 (never).
705 hostchecks_age |**Optional.** Max age for hostalives table rows (start_time). Defaults to 0 (never).
706 logentries_age |**Optional.** Max age for logentries table rows (logentry_time). Defaults to 0 (never).
707 notifications_age |**Optional.** Max age for notifications table rows (start_time). Defaults to 0 (never).
708 processevents_age |**Optional.** Max age for processevents table rows (event_time). Defaults to 0 (never).
709 statehistory_age |**Optional.** Max age for statehistory table rows (state_time). Defaults to 0 (never).
710 servicechecks_age |**Optional.** Max age for servicechecks table rows (start_time). Defaults to 0 (never).
711 systemcommands_age |**Optional.** Max age for systemcommands table rows (start_time). Defaults to 0 (never).
716 ---------------------|----------------
717 DbCatConfig | Configuration data
718 DbCatState | Current state data
719 DbCatAcknowledgement | Acknowledgements
720 DbCatComment | Comments
721 DbCatDowntime | Downtimes
722 DbCatEventHandler | Event handler data
723 DbCatExternalCommand | External commands
724 DbCatFlapping | Flap detection data
725 DbCatCheck | Check results
726 DbCatLog | Log messages
727 DbCatNotification | Notifications
728 DbCatProgramStatus | Program status data
729 DbCatRetention | Retention data
730 DbCatStateHistory | Historical state data
732 Multiple categories can be combined using the `|` operator. In addition to
733 the category flags listed above the `DbCatEverything` flag may be used as
734 a shortcut for listing all flags.
736 ### <a id="objecttype-livestatuslistener"></a> LiveStatusListener
738 Livestatus API interface available as TCP or UNIX socket. Historical table queries
739 require the `CompatLogger` feature enabled pointing to the log files using the
740 `compat_log_path` configuration attribute.
746 object LivestatusListener "livestatus-tcp" {
748 bind_host = "127.0.0.1"
752 object LivestatusListener "livestatus-unix" {
754 socket_path = "/var/run/icinga2/cmd/livestatus"
760 ----------------|----------------
761 socket\_type |**Optional.** Specifies the socket type. Can be either "tcp" or "unix". Defaults to "unix".
762 bind\_host |**Optional.** Only valid when socket\_type is "tcp". Host address to listen on for connections. Defaults to "127.0.0.1".
763 bind\_port |**Optional.** Only valid when `socket\_type` is "tcp". Port to listen on for connections. Defaults to 6558.
764 socket\_path |**Optional.** Only valid when `socket\_type` is "unix". Specifies the path to the UNIX socket file. Defaults to LocalStateDir + "/run/icinga2/cmd/livestatus".
765 compat\_log\_path |**Optional.** Required for historical table queries. Requires `CompatLogger` feature enabled. Defaults to LocalStateDir + "/log/icinga2/compat"
769 > UNIX sockets are not supported on Windows.
771 ### <a id="objecttype-statusdatawriter"></a> StatusDataWriter
773 Periodically writes status data files which are used by the Classic UI and other third-party tools.
779 object StatusDataWriter "status" {
780 status\_path = "/var/cache/icinga2/status.dat"
781 objects\_path = "/var/cache/icinga2/objects.path"
782 update\_interval = 30s
788 ----------------|----------------
789 status\_path |**Optional.** Path to the status.dat file. Defaults to LocalStateDir + "/cache/icinga2/status.dat".
790 objects\_path |**Optional.** Path to the objects.cache file. Defaults to LocalStateDir + "/cache/icinga2/objects.cache".
791 update\_interval|**Optional.** The interval in which the status files are updated. Defaults to 15 seconds.
793 ### <a id="objecttype-externalcommandlistener"></a> ExternalCommandListener
795 Implements the Icinga 1.x command pipe which can be used to send commands to Icinga.
801 object ExternalCommandListener "external" {
802 command\_path = "/var/run/icinga2/cmd/icinga2.cmd"
808 ----------------|----------------
809 command\_path |**Optional.** Path to the command pipe. Defaults to LocalStateDir + "/run/icinga2/cmd/icinga2.cmd".
811 ### <a id="objecttype-compatlogger"></a> CompatLogger
813 Writes log files in a format that's compatible with Icinga 1.x.
819 object CompatLogger "my-log" {
820 log\_dir = "/var/log/icinga2/compat"
821 rotation\_method = "HOURLY"
827 ----------------|----------------
828 log\_dir |**Optional.** Path to the compat log directory. Defaults to LocalStateDir + "/log/icinga2/compat".
829 rotation\_method|**Optional.** Specifies when to rotate log files. Can be one of "HOURLY", "DAILY", "WEEKLY" or "MONTHLY". Defaults to "HOURLY".
831 ### <a id="objecttype-checkresultreader"></a> CheckResultReader
833 Reads Icinga 1.x check results from a directory. This functionality is provided
834 to help existing Icinga 1.x users and might be useful for certain cluster
841 object CheckResultReader "reader" {
842 spool_dir = "/data/check-results"
848 ----------------|----------------
849 spool\_dir |**Optional.** The directory which contains the check result files. Defaults to LocalStateDir + "/lib/icinga2/spool/checkresults/".
851 ### <a id="objecttype-checkcomponent"></a> CheckerComponent
853 The checker component is responsible for scheduling active checks. There are no configurable options.
859 object CheckerComponent "checker" { }
861 ### <a id="objecttype-notificationcomponent"></a> NotificationComponent
863 The notification component is responsible for sending notifications. There are no configurable options.
867 library "notification"
869 object NotificationComponent "notification" { }
871 ### <a id="objecttype-icingastatuswriter"></a> IcingaStatusWriter
873 The IcingaStatusWriter feature periodically dumps the current status
874 and performance data from Icinga 2 and all registered features into
879 object IcingaStatusWriter "status" {
880 status_path = LocalStateDir + "/cache/icinga2/status.json"
881 update_interval = 15s
887 --------------------------|--------------------------
888 status\_path |**Optional.** Path to cluster status file. Defaults to LocalStateDir + "/cache/icinga2/status.json"
889 update\_interval |**Optional.** The interval in which the status files are updated. Defaults to 15 seconds.
891 ### <a id="objecttype-clusterlistener"></a> ClusterListener
893 ClusterListener objects are used to specify remote cluster
894 node peers and the certificate files used for ssl
901 object ClusterListener "cluster" {
902 ca_path = "/etc/icinga2/ca/ca.crt"
903 cert_path = "/etc/icinga2/ca/icinga-node-1.crt"
904 key_path = "/etc/icinga2/ca/icinga-node-1.key"
908 peers = [ "icinga-node-2" ]
914 --------------------------|--------------------------
915 cert\_path |**Required.** Path to the public key.
916 key\_path |**Required.** Path to the private key.
917 ca\_path |**Required.** Path to the CA certificate file.
918 crl\_path |**Optional.** Path to the CRL file.
919 bind\_host |**Optional.** The IP address the cluster listener should be bound to.
920 bind\_port |**Optional.** The port the cluster listener should be bound to.
921 peers |**Optional.** A list of
923 ### <a id="objecttype-endpoint"></a> Endpoint
925 Endpoint objects are used to specify connection information for remote
932 object Endpoint "icinga-c2" {
933 host = "192.168.5.46"
936 config_files = [ "/etc/icinga2/cluster.d/*" ]
938 config_files_recursive = [
939 "/etc/icinga2/cluster2",
940 { path = "/etc/icinga2/cluster3"; pattern = "*.myconf" }
947 ----------------|----------------
948 host |**Required.** The hostname/IP address of the remote Icinga 2 instance.
949 port |**Required.** The service name/port of the remote Icinga 2 instance.
950 config\_files |**Optional.** A list of configuration files sent to remote peers (wildcards possible).
951 config_files_recursive |**Optional.** A list of configuration files sent to remote peers. Array elements can either be a string (in which case all files in that directory matching the pattern *.conf are included) or a dictionary with elements "path" and "pattern".
952 accept\_config |**Optional.** A list of endpoint names from which this endpoint accepts configuration files.
954 ### <a id="objecttype-domain"></a> Domain
956 A [Service](#objecttype-service) object can be restricted using the `domains` attribute
957 array specifying endpoint privileges.
959 A Domain object specifices the ACLs applied for each [Endpoint](#objecttype-endpoint).
963 object Domain "dmz-1" {
965 node1 = DomainPrivCheckResult
966 node2 = DomainPrivReadWrite
973 ----------------|----------------
974 acl |**Required.** Dictionary with items for Domain ACLs.
979 ----------------------|----------------
980 DomainPrivRead | Endpoint reads local messages and relays them to remote nodes.
981 DomainPrivCheckResult | Endpoint accepts check result messages from remote nodes.
982 DomainPrivCommand | Endpoint accepts command messages from remote nodes.
983 DomainPrevReadOnly | Equivalent to DomainPrivRead.
984 DomainPrivReadWrite | Equivalent to DomainPrivRead | DomainPrivCheckResult | DomainPrivCommand.