From 829036b6764923caf84c05c63c0e77ed4559a315 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 15 Aug 2012 16:12:12 +0200 Subject: [PATCH] Converted the missing sections to Docbook format. --- doc/icinga2-config.xml | 468 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 468 insertions(+) diff --git a/doc/icinga2-config.xml b/doc/icinga2-config.xml index 56a3dd057..d39fa57ba 100644 --- a/doc/icinga2-config.xml +++ b/doc/icinga2-config.xml @@ -366,6 +366,474 @@ object Host "localhost" { } } + +
+ Property: cert + + This is used to specify the SSL client certificate Icinga 2 will + use when connecting to other Icinga 2 instances. This property is + optional when you're setting up a non-networked Icinga 2 + instance. +
+ +
+ Property: ca + + This is the public CA certificate that is used to verify + connections from other Icinga 2 instances. This property is optional + when you're setting up a non-networked Icinga 2 instance. +
+ +
+ Property: node + + The externally visible IP address that is used by other Icinga 2 + instances to connect to this instance. This property is optional when + you're setting up a non-networked Icinga 2 instance. + + Note: Icinga does not bind to + this IP address. +
+ +
+ Property: service + + The port this Icinga 2 instance should listen on. This property + is optional when you're setting up a non-networked Icinga 2 + instance. +
+ +
+ Property: pidpath + + Optional. The path to the PID file. Defaults to "icinga.pid" in + the current working directory. +
+ +
+ Property: logpath + + Optional. The path to the logfile. This is a shortcut for + creating a Logger object of type „file“ with the specified log + path. +
+ +
+ Property: statepath + + Optional. The path of the state file. This is the file Icinga 2 + uses to persist objects between program runs. Defaults to + "icinga.state" in the current working directory. +
+ +
+ Property: macros + + Optional. Global macros that are used for service checks and + notifications. +
+ + +
+ Type: Logger + + Specifies where Icinga 2 should be logging. Objects of this type + must have the "local" specifier: + + local object Logger "my-debug-log" { + type = "file", + path = "/var/log/icinga2.log", + severity = "debug" +} + +
+ Property: type + + The type of the log. Can be "console", "syslog" or + "file". +
+ +
+ Property: path + + The log path. Ignored if the log type is not "file". +
+ +
+ Property: severity + + The minimum severity for this log. Can be "debug", + "information", "warning" or "critical". Defaults to + "information". +
+
+ +
+ Type: Component + + Icinga 2 uses a number of components to implement its feature-set. + The "Component" configuration object is used to load these components + and specify additional parameters for them. "component" objects must + have the "local" specifier: + + local object Component "discovery" { + broker = 1 +} +
+ +
+ Type: Endpoint + + Endpoint objects are used by the "discovery" component to specify + connection information for remote Icinga 2 instances: + + local object Endpoint „icinga-c2“ { + node = "192.168.5.46", + service = 7777, +} + +
+ Property: node + + The hostname/IP address of the remote Icinga 2 instance. +
+ +
+ Property: service + + The port of the remote Icinga 2 instance. +
+
+ +
+ Type: Service + + Service objects describe network services and how they should be + checked by Icinga 2: + + object Service "localhost-uptime" { + host_name = "localhost", + + alias = "localhost Uptime", + + methods = { + check = "native::NagiosCheck" + }, + + check_command = "$plugindir$/check_snmp -H $address$ -C $community$ -o $oid$", + + macros = { + plugindir = "/usr/lib/nagios/plugins", + address = "127.0.0.1", + community = "public" ,A hos + oid = "DISMAN-EVENT-MIB::sysUpTimeInstance" + } + + check_interval = 60, + retry_interval = 15, + + dependencies = { "localhost-ping" }, + + servicegroups = { "all-services", "snmp" }, + + checkers = { "*" }, +} + +
+ Property: host_name + + The host this service belongs to. There must be a "Host" object + with that name. +
+ +
+ Property: alias + + Optional. A short description of the service. +
+ +
+ Property: methods - check + + The check type of the service. For now only Nagios-compatible + plugins are supported ("native::NagiosCheck"). +
+ +
+ Property: check_command + + Optional when not using check_type == "nagios". The check + command. This command may use macros. +
+ +
+ Property: check_interval + + Optional. The check interval (in seconds). +
+ +
+ Property: retry_interval + + Optional. The retry interval (in seconds). This is used when the + service is in a soft state. +
+ +
+ Property: servicegroups + + Optional. The service groups this service belongs to. +
+ +
+ Property: checkers + + Optional. A list of remote endpoints that may check this + service. Wildcards can be used here. +
+
+ +
+ Type: ServiceGroup + + A group of services: + + object ServiceGroup "snmp" { + alias = "SNMP services", + + notes_url = "http://www.example.org/", + action_url = "http://www.example.org/", +} + +
+ Property: alias + + Optional. A short description of the service group. +
+ +
+ Property: notes_url + + Optional. Notes URL. Used by the CGIs. +
+ +
+ Property: action_url + + Optional. Action URL. Used by the CGIs. +
+
+ +
+ Type: Host + + A host. Unlike in Icinga 1.x hosts are not checkable objects in + Icinga 2: + + object Host "localhost" { + alias = "The best host there is", + + hostgroups = { "all-hosts" }, + + hostchecks = { "ping" }, + dependencies = { "router-ping" } + + services = { + "ping", + "my-http" { + service = "http", + + macros = { + vhost = "test1.example.org", + port = 81 + } + } + } + + check_interval = 60, + retry_interval = 15, + + servicegroups = { "all-services" }, + + checkers = { "*" }, +} + +
+ Property: alias + + Optional. A short description of the host. +
+ +
+ Property: hostgroups + + Optional. A list of host groups this host belongs to. +
+ +
+ Property: hostchecks + + Optional. A list of services that are used to determine whether + the host is up or down. +
+ +
+ Property: dependencies + + Optional. A list of services that are used to determine whether + the host is unreachable. +
+ +
+ Property: services + + Inline definition of services. Each property in this dictionary + specifies a service. If the value of a property is a string it is + interpreted as the name of a service template and is used as a parent + object for the new service. If it is a dictionary its service property + is used to determine the parent object and all other service-related + properties are additively copied into the new service object. + + The new service's name is „hostname-service“ - where „service“ + is the dictionary key in the services dictionary. + + The priority for service properties is (from highest to + lowest): + + + + Properties specified in the dictionary of the inline service + definition + + + + Host properties + + + + Properties inherited from the new service's parent + object + + +
+ +
+ Property: check_interval + + Optional. Copied into inline service definitions. The host + itself does not have any checks. +
+ +
+ Property: retry_interval + + Optional. Copied into inline service definitions. The host + itself does not have any checks. +
+ +
+ Property: servicegroups + + Optional. Copied into inline service definitions. The host + itself does not have any checks. +
+ +
+ Property: checkers + + Optional. Copied into inline service definitions. The host + itself does not have any checks. +
+
+ +
+ Type: HostGroup + + A group of hosts: + + object HostGroup "my-hosts" { + alias = "My hosts", + + notes_url = "http://www.example.org/", + action_url = "http://www.example.org/", +} + +
+ Property: alias + + Optional. A short description of the host group. +
+ +
+ Property: notes_url + + Optional. Notes URL. Used by the CGIs. +
+ +
+ Property: action_url + + Optional. Action URL. Used by the CGIs. +
+
+ + +
+ Icinga 2 Configuration Examples + + + +
+ Non-networked minimal example + + + + local object IcingaApplication "icinga" { + +} + +local object Component "checker" { + +} + +local object Component "delegation" { + +} + +abstract object Service "nagios-service" { + methods { + check = „native::NagiosCheck“ + }, + + macros = { + plugindir = "/usr/lib/nagios/plugins" + } +} + +abstract object Service "ping" inherits "nagios-service" { + check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%", + + macros += { + wrta = 50, + wpl = 5, + crta = 100, + cpl = 10 + } +} + +object Host "localhost" { + services = { "ping" }, + + macros = { + address = "127.0.0.1" + }, + + check_interval = 10 +} + + Note: You may also want to load + the "compat" component if you want Icinga 2 to write status.dat and + objects.cache files.