Update documentation.

Refs #5789
This commit is contained in:
Gunnar Beutner 2014-03-19 12:44:53 +01:00
parent 3383951791
commit 700cc43770
13 changed files with 68 additions and 67 deletions

View File

@ -113,7 +113,7 @@ If you require default macro definitions, you can add a macro dictionary as show
`CheckCommand` object.
object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
command = [ IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh" ],
export_macros = [
"NOTIFICATIONTYPE",

View File

@ -273,7 +273,7 @@ Example:
...
{
check_interval = (MyCheckInterval / 2.5)
check_interval = MyCheckInterval / 2.5
}
More details in the chapter [Constant Expressions](#constant-expressions).

View File

@ -25,11 +25,11 @@ The user `icingaadmin` in the example below will get notified only on `WARNING`
object User "icingaadmin" {
display_name = "Icinga 2 Admin",
enable_notifications = 1,
notification_state_filter = (StateFilterOK |
StateFilterWarning |
StateFilterCritical),
notification_type_filter = (NotificationFilterProblem |
NotificationFilterRecovery),
notification_state_filter = StateFilterOK |
StateFilterWarning |
StateFilterCritical,
notification_type_filter = NotificationFilterProblem |
NotificationFilterRecovery,
macros = {
"email" = "icinga@localhost",
"pager" = "+49123456789"
@ -59,7 +59,7 @@ There are various macros available at runtime execution of the `NotificationComm
The example below may or may not fit your needs.
object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
command = [ IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh" ],
export_macros = [
"NOTIFICATIONTYPE",
@ -91,18 +91,18 @@ to the defined notifications. That way you'll save duplicated attributes in each
notification_command = "mail-service-notification",
notification_state_filter = (StateFilterWarning |
StateFilterCritical |
StateFilterUnknown),
notification_type_filter = (NotificationFilterProblem |
NotificationFilterAcknowledgement |
NotificationFilterRecovery |
NotificationFilterCustom |
NotificationFilterFlappingStart |
NotificationFilterFlappingEnd |
NotificationFilterDowntimeStart |
NotificationFilterDowntimeEnd |
NotificationFilterDowntimeRemoved),
notification_state_filter = StateFilterWarning |
StateFilterCritical |
StateFilterUnknown,
notification_type_filter = NotificationFilterProblem |
NotificationFilterAcknowledgement |
NotificationFilterRecovery |
NotificationFilterCustom |
NotificationFilterFlappingStart |
NotificationFilterFlappingEnd |
NotificationFilterDowntimeStart |
NotificationFilterDowntimeEnd |
NotificationFilterDowntimeRemoved,
notification_period = "24x7"
}
@ -274,18 +274,18 @@ Available state and type filters for notifications are:
template Notification "generic-notification" {
notification_state_filter = (StateFilterWarning |
StateFilterCritical |
StateFilterUnknown),
notification_type_filter = (NotificationFilterProblem |
NotificationFilterAcknowledgement |
NotificationFilterRecovery |
NotificationFilterCustom |
NotificationFilterFlappingStart |
NotificationFilterFlappingEnd |
NotificationFilterDowntimeStart |
NotificationFilterDowntimeEnd |
NotificationFilterDowntimeRemoved),
notification_state_filter = StateFilterWarning |
StateFilterCritical |
StateFilterUnknown,
notification_type_filter = NotificationFilterProblem |
NotificationFilterAcknowledgement |
NotificationFilterRecovery |
NotificationFilterCustom |
NotificationFilterFlappingStart |
NotificationFilterFlappingEnd |
NotificationFilterDowntimeStart |
NotificationFilterDowntimeEnd |
NotificationFilterDowntimeRemoved,
}
> **Note**

View File

@ -324,7 +324,7 @@ Valid operators include ~, !, +, -, *, /, ==, !=, in and !in. The default prece
overridden by grouping expressions using parentheses:
{
check_interval (30 + 60) / 2
check_interval = (30 + 60) / 2
}
Global constants may be used in constant expressions.

View File

@ -214,7 +214,7 @@ Example:
parent_host = "internet",
parent_service = "ping4",
state_filter = (StateFilterOK),
state_filter = StateFilterOK,
disable_checks = true
}
@ -230,7 +230,7 @@ Attributes:
disable_checks |**Optional.** Whether to disable checks when this dependency fails. Defaults to false.
disable_notifications|**Optional.** Whether to disable notifications when this dependency fails. Defaults to true.
period |**Optional.** Time period during which this dependency is enabled.
state_filter |**Optional.** A set of type filters when this dependency should be OK. Defaults to (StateFilterOK | StateFilterWarning).
state_filter |**Optional.** A set of type filters when this dependency should be OK. Defaults to StateFilterOK | StateFilterWarning.
Available state filters:
@ -252,12 +252,12 @@ Example:
enable_notifications = 1,
notification_period = "24x7",
notification_state_filter = (StateFilterOK |
StateFilterWarning |
StateFilterCritical |
StateFilterUnknown),
notification_type_filter = (NotificationFilterProblem |
NotificationFilterRecovery),
notification_state_filter = StateFilterOK |
StateFilterWarning |
StateFilterCritical |
StateFilterUnknown,
notification_type_filter = NotificationFilterProblem |
NotificationFilterRecovery,
macros = {
"name" = "Icinga 2 Admin",
"email" = "icinga@localhost",
@ -458,7 +458,7 @@ A notification command definition.
Example:
object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
command = [ IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh" ],
export_macros = [
"NOTIFICATIONTYPE",
@ -588,7 +588,7 @@ Example:
logentries_age = 31d,
},
categories = (DbCatConfig | DbCatState)
categories = DbCatConfig | DbCatState
}
Attributes:
@ -672,7 +672,7 @@ Example:
logentries_age = 31d,
},
categories = (DbCatConfig | DbCatState)
categories = DbCatConfig | DbCatState
}
Attributes:
@ -877,7 +877,7 @@ a defined JSON file.
Example:
object IcingaStatusWriter "status" {
status_path = (IcingaLocalStateDir + "/cache/icinga2/status.json"),
status_path = IcingaLocalStateDir + "/cache/icinga2/status.json",
update_interval = 15s
}
@ -962,8 +962,8 @@ Example:
object Domain "dmz-1" {
acl = {
node1 = (DomainPrivCheckResult),
node2 = (DomainPrivReadWrite)
node1 = DomainPrivCheckResult,
node2 = DomainPrivReadWrite
}
}
@ -980,5 +980,5 @@ Domain ACLs:
DomainPrivRead | Endpoint reads local messages and relays them to remote nodes.
DomainPrivCheckResult | Endpoint accepts check result messages from remote nodes.
DomainPrivCommand | Endpoint accepts command messages from remote nodes.
DomainPrevReadOnly | Endpoint reads local messages and relays them to remote nodes.
DomainPrivReadWrite | Combination of (DomainPrivRead | DomainPrivCheckResult | DomainPrivCommand)
DomainPrevReadOnly | Equivalent to DomainPrivRead.
DomainPrivReadWrite | Equivalent to DomainPrivRead | DomainPrivCheckResult | DomainPrivCommand.

View File

@ -129,7 +129,7 @@ In order to load configuration files which were received from a remote Icinga 2
instance you will have to add the following include directive to your
`icinga2.conf` configuration file:
include (IcingaLocalStateDir + "/lib/icinga2/cluster/config/*/*")
include IcingaLocalStateDir + "/lib/icinga2/cluster/config/*/*"
### <a id="initial-cluster-sync"></a> Initial Cluster Sync

View File

@ -25,7 +25,7 @@ from the `icinga-node-dmz-1` endpoint.
object Domain "dmz-db" {
acl = {
icinga-node-dmz-1 = (DomainPrivReadOnly),
icinga-node-dmz-2 = (DomainPrivReadWrite)
icinga-node-dmz-1 = DomainPrivReadOnly,
icinga-node-dmz-2 = DomainPrivReadWrite
}
}

View File

@ -463,8 +463,8 @@ All state and type filter use long names or'd with a pipe together
notification_options w,u,c,r,f,s
notification_state_filter = (StateFilterWarning | StateFilterUnknown | StateFilterCritical),
notification_type_filter = (NotificationProblem | NotificationRecovery | NotificationFlappingStart | NotificationFlappingEnd | NotificationDowntimeStart | NotificationDowntimeEnd | NotificationDowntimeRemoved)
notification_state_filter = StateFilterWarning | StateFilterUnknown | StateFilterCritical,
notification_type_filter = NotificationProblem | NotificationRecovery | NotificationFlappingStart | NotificationFlappingEnd | NotificationDowntimeStart | NotificationDowntimeEnd | NotificationDowntimeRemoved
> **Note**
>

View File

@ -7,10 +7,10 @@ template User "generic-user" {
enable_notifications = true,
notification_period = "24x7",
notification_state_filter = (StateFilterWarning |
notification_state_filter = StateFilterWarning |
StateFilterCritical |
StateFilterUnknown),
notification_type_filter = (NotificationFilterProblem |
StateFilterUnknown,
notification_type_filter = NotificationFilterProblem |
NotificationFilterAcknowledgement |
NotificationFilterRecovery |
NotificationFilterCustom |
@ -18,5 +18,5 @@ template User "generic-user" {
NotificationFilterFlappingEnd |
NotificationFilterDowntimeStart |
NotificationFilterDowntimeEnd |
NotificationFilterDowntimeRemoved)
NotificationFilterDowntimeRemoved
}

View File

@ -5,11 +5,11 @@
template Notification "mail-notification" {
notification_command = "mail-service-notification",
notification_state_filter = (StateFilterOK |
notification_state_filter = StateFilterOK |
StateFilterWarning |
StateFilterCritical |
StateFilterUnknown),
notification_type_filter = (NotificationFilterProblem |
StateFilterUnknown,
notification_type_filter = NotificationFilterProblem |
NotificationFilterAcknowledgement |
NotificationFilterRecovery |
NotificationFilterCustom |
@ -17,13 +17,13 @@ template Notification "mail-notification" {
NotificationFilterFlappingEnd |
NotificationFilterDowntimeStart |
NotificationFilterDowntimeEnd |
NotificationFilterDowntimeRemoved),
NotificationFilterDowntimeRemoved,
notification_period = "24x7"
}
object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
command = [ IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh" ],
export_macros = [
"NOTIFICATIONTYPE",

View File

@ -6,6 +6,6 @@
object FileLogger "debug-file" {
severity = "debug",
path = (IcingaLocalStateDir + "/log/icinga2/debug.log")
path = IcingaLocalStateDir + "/log/icinga2/debug.log"
}

View File

@ -4,6 +4,6 @@
object FileLogger "main-log" {
severity = "information",
path = (IcingaLocalStateDir + "/log/icinga2/icinga2.log")
path = IcingaLocalStateDir + "/log/icinga2/icinga2.log"
}

View File

@ -66,8 +66,9 @@ void Host::EvaluateApplyRules(const std::vector<ApplyRule>& rules)
continue;
}
if (result.IsEmpty())
continue;
std::ostringstream msgbuf2;
msgbuf2 << "Applying service template '" << rule.GetTemplate() << "' to host '" << host->GetName() << "' for rule " << rule.GetDebugInfo();
Log(LogDebug, "icinga", msgbuf2.str());
std::ostringstream namebuf;
namebuf << host->GetName() << "!apply!" << rule.GetTemplate();