Update documentation.

This commit is contained in:
Gunnar Beutner 2013-10-10 11:22:32 +02:00
parent 5c683dce86
commit 9d967f868c
17 changed files with 71 additions and 65 deletions

3
doc/3.07-time-periods.md Normal file
View File

@ -0,0 +1,3 @@
## Time Periods
TODO

View File

@ -0,0 +1,3 @@
## External Commands
TODO

View File

@ -0,0 +1,3 @@
## Event Handlers
TODO

3
doc/3.10-logging.md Normal file
View File

@ -0,0 +1,3 @@
## Logging
TODO

View File

@ -0,0 +1,3 @@
## Performance Data
TODO

3
doc/3.12-status-data.md Normal file
View File

@ -0,0 +1,3 @@
## Status Data
TODO

View File

@ -0,0 +1 @@
## Compat Logging

View File

@ -0,0 +1,3 @@
## Check Result Files
TODO

View File

@ -1,15 +1,5 @@
# Advanced Topics # Advanced Topics
## Time Periods
## External Commands
TODO
## Event Handlers
TODO
## Cluster ## Cluster
TODO TODO

View File

@ -2,10 +2,10 @@
## Configuration Format ## Configuration Format
Icinga 1.x supports two configuration formats: key-value-based settings in Icinga 1.x supports two configuration formats: key-value-based settings in the
`icinga.cfg` and object-based in included files (`cfg_dir`, `cfg_file`). The `icinga.cfg` cofiguration file and object-based in included files (`cfg_dir`,
path to the `icinga.cfg` configuration file must be passed to the Icinga daemon `cfg_file`). The path to the `icinga.cfg` configuration file must be passed to
at startup. the Icinga daemon at startup.
enable_notifications=1 enable_notifications=1
@ -32,15 +32,16 @@ The ITL will be updated on every releases and should not be edited by the user.
> **Note** > **Note**
> >
> Sample configuration is located in `conf.d/` which is included in `icinga2.conf` by default. > Sample configuration files are located in the `conf.d/` directory which is
> included in `icinga2.conf` by default.
### Include Files and Directories ### Include Files and Directories
In Icinga 1.x the `icinga.cfg` file contains `cfg_file` and `cfg_dir` In Icinga 1.x the `icinga.cfg` file contains `cfg_file` and `cfg_dir`
directives. The `cfg_dir` directive recursively includes all files with a `.cfg` directives. The `cfg_dir` directive recursively includes all files with a `.cfg`
suffix in the given directory. All paths must be configured absolute, relative suffix in the given directory. Only absolute paths may be used. The `cfg_file`
paths are not possible. The `cfg_file` and `cfg_dir` directives can include the and `cfg_dir` directives can include the same file twice which leads to
same file twice which leads into configuration errors in Icinga 1.x. configuration errors in Icinga 1.x.
cfg_file=/etc/icinga/objects/commands.cfg cfg_file=/etc/icinga/objects/commands.cfg
cfg_dir=/etc/icinga/objects cfg_dir=/etc/icinga/objects
@ -101,7 +102,7 @@ hosts) like in Icinga 1.x but directly after their type definition.
## Templates ## Templates
In Icinga 1.x templates are identified using `register 0`. Icinga 2 uses the In Icinga 1.x templates are identified using `register 0`. Icinga 2 uses the
"template" identifier. `template` identifier.
template Service "ping4-template" { } template Service "ping4-template" { }
@ -119,8 +120,6 @@ comma-separated list with template names in double quotes.
## Object attributes ## Object attributes
### Attribute values
Icinga 1.x separates attribute and value with whitespaces/tabs. Icinga 2 Icinga 1.x separates attribute and value with whitespaces/tabs. Icinga 2
requires an equal sign (=) between them. requires an equal sign (=) between them.
@ -137,28 +136,22 @@ requires an equal sign (=) between them.
> Please note that the default time value is seconds, if no duration literal > Please note that the default time value is seconds, if no duration literal
> is given. check_interval = 5 behaves the same as check_interval = 5s. > is given. check_interval = 5 behaves the same as check_interval = 5s.
### Attribute strings
All strings require double quotes in Icinga 2. Therefore a double-quote All strings require double quotes in Icinga 2. Therefore a double-quote
must be escaped with a backslash (e.g. in command line). must be escaped with a backslash (e.g. in command line).
If an attribute identifier starts with a number, it must be encapsulated If an attribute identifier starts with a number, it must be encapsulated
with double quotes as well. with double quotes as well.
### Attribute lines
Unlike in Icinga 1.x all attributes within the current object must be Unlike in Icinga 1.x all attributes within the current object must be
terminated with a comma (,). terminated with a comma (,).
## Host Service Relation ## Host Service Relation
In Icinga 1.x a service object is linked to a host by defining the 'host_name' In Icinga 1.x a service object is associated with a host by defining the
attribute in the service definition. Alternate object tricks refer to `host_name` attribute in the service definition. Alternate object tricks refer to
'hostgroup_name' or behavior changing regular expression. It's not possible `hostgroup_name` or behavior changing regular expression. It's not possible
to define a service definition within a host definition, or even link from to define a service definition within a host definition.
a host definition to services.
The preferred way of linking hosts with services in Icinga 2 are services The preferred way of associating hosts with services in Icinga 2 are services
defined inline to the host object (or template) definition. Icinga 2 will defined inline to the host object (or template) definition. Icinga 2 will
implicitely create a new service object on configuration activation. These implicitely create a new service object on configuration activation. These
inline service definitions can reference service templates. inline service definitions can reference service templates.
@ -328,50 +321,43 @@ Icinga 1.x.
Notifications are a new object type in Icinga 2. Imagine the following Notifications are a new object type in Icinga 2. Imagine the following
notification configuration problem in Icinga 1.x: notification configuration problem in Icinga 1.x:
Service A should notify contact X via SMS * Service A should notify contact X via SMS
Service B should notify contact X via Mail * Service B should notify contact X via Mail
Service C should notify contact Y via Mail and SMS * Service C should notify contact Y via Mail and SMS
Contact X and Y should also be used for authorization (e.g. in Classic UI) * Contact X and Y should also be used for authorization (e.g. in Classic UI)
The only way achieving a semi-clean solution is to The only way achieving a semi-clean solution is to
Create contact X-sms, set service_notification_command for sms, assign * Create contact X-sms, set service_notification_command for sms, assign contact to service A
contact to service A * Create contact X-mail, set service_notification_command for mail, assign contact to service B
Create contact X-mail, set service_notification_command for mail, assign * Create contact Y, set service_notification_command for sms and mail, assign contact to service C
contact to service B * Create contact X without notification commands, assign to service A and B
Create contact Y, set service_notification_command for sms and mail, assign
contact to service C
Create contact X without notification commands, assign to service A and B
Basically you are required to create duplicated contacts for either each Basically you are required to create duplicated contacts for either each
notification method or used for authorization only. notification method or used for authorization only.
Icinga 2 attempts to solve that problem in this way Icinga 2 attempts to solve that problem in this way
Create user X, set SMS and Mail attributes, used for authorization * Create user X, set SMS and Mail attributes, used for authorization
Create user Y, set SMS and Mail attributes, used for authorization * Create user Y, set SMS and Mail attributes, used for authorization
Create notification A-SMS, set notification_command for sms, add user X, assign * Create notification A-SMS, set notification_command for sms, add user X, assign notification A-SMS to service A
notification A-SMS to service A * Create notification B-Mail, set notification_command for mail, add user X, assign notification Mail to service B
Create notification B-Mail, set notification_command for mail, add user X, assign * Create notification C-SMS, set notification_command for sms, add user Y, assign notification C-SMS to service C
notification Mail to service B * Create notification C-Mail, set notification_command for mail, add user Y, assign notification C-Mail to service C
Create notification C-SMS, set notification_command for sms, add user Y, assign
notification C-SMS to service C
Create notification C-Mail, set notification_command for mail, add user Y, assign
notification C-Mail to service C
> **Note** > **Note**
> >
> Notification objects are not required to be service agnostic. They may use > Notification objects are not required to be service-agnostic. They may use
> global notification templates and can be added to a service wherever needed. > global notification templates and can be added to a service wherever needed.
Previously in Icinga 1.x it looked like Previously in Icinga 1.x it looked like this:
service -> (contact, contactgroup) -> notification command service -> (contact, contactgroup) -> notification command
In Icinga 2 it will look like In Icinga 2 it will look like this:
Service -> Notification -> NotificationCommand Service -> Notification -> NotificationCommand
-> User, UserGroup -> User, UserGroup
### Escalations ### Escalations

View File

@ -9,12 +9,20 @@ EXTRA_DIST = \
2.4-setting-up-ido.md \ 2.4-setting-up-ido.md \
2.5-setting-up-livestatus.md \ 2.5-setting-up-livestatus.md \
2.6-running-icinga.md \ 2.6-running-icinga.md \
3.1-hosts-and-services.md \ 3.01-hosts-and-services.md \
3.2-commands.md \ 3.02-commands.md \
3.3-macros.md \ 3.03-macros.md \
3.4-notifications.md \ 3.04-notifications.md \
3.5-groups.md \ 3.05-using-templates.md \
3.5-using-templates.md \ 3.06-groups.md \
3.07-time-periods.md \
3.08-external-commands.md \
3.09-event-handlers.md \
3.10-logging.md \
3.11-performance-data.md \
3.12-status-data.md \
3.13-compat-logging.md \
3.14-check-result-files.md \
3-monitoring-basics.md \ 3-monitoring-basics.md \
4.1-configuration-syntax.md \ 4.1-configuration-syntax.md \
4.2-global-variables.md \ 4.2-global-variables.md \