diff --git a/.mailmap b/.mailmap index 46447896a..588d09a2c 100644 --- a/.mailmap +++ b/.mailmap @@ -23,6 +23,7 @@ Alexander A. Klimov + diff --git a/AUTHORS b/AUTHORS index 5af34664e..895a281d1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,7 @@ Alexander Fuhr Alexander Schomburg Alexander Stoll Alexander Wirt +Alvar Penning Andrea Avancini Andrea Kao Andreas Maus diff --git a/doc/02-installation.md b/doc/02-installation.md index c31f2ee7a..42d4a7430 100644 --- a/doc/02-installation.md +++ b/doc/02-installation.md @@ -200,7 +200,7 @@ zypper ar https://download.opensuse.org/repositories/server:/monitoring/15.3/ser -### Amazon Linux 2 Repository +### Amazon Linux Repository !!! info @@ -214,12 +214,14 @@ rpm --import https://packages.icinga.com/icinga.key wget https://packages.icinga.com/subscription/amazon/ICINGA-release.repo -O /etc/yum.repos.d/ICINGA-release.repo ``` -The packages for Amazon Linux 2 depend on other packages which are distributed +The packages for **Amazon Linux 2** depend on other packages which are distributed as part of the [EPEL repository](https://fedoraproject.org/wiki/EPEL). ```bash yum install epel-release ``` + +The packages for newer versions of Amazon Linux don't require additional repositories. @@ -307,7 +309,7 @@ zypper install icinga2 -#### Amazon Linux 2 +#### Amazon Linux ```bash yum install icinga2 @@ -418,15 +420,17 @@ zypper install --recommends monitoring-plugins-all -#### Amazon Linux 2 +#### Amazon Linux -The packages for Amazon Linux 2 depend on other packages which are distributed as part of the EPEL repository. +The packages for **Amazon Linux 2** depend on other packages which are distributed as part of the EPEL repository. ```bash amazon-linux-extras install epel yum install nagios-plugins-all ``` + +Unfortunately newer versions of Amazon Linux don't provide those plugins, yet. ## Set up Icinga 2 API @@ -505,7 +509,7 @@ Use your distribution's package manager to install the `icingadb-redis` package -##### Amazon Linux 2 +##### Amazon Linux ```bash yum install icingadb-redis diff --git a/doc/05-service-monitoring.md b/doc/05-service-monitoring.md index 4a8e73bc3..097fb1184 100644 --- a/doc/05-service-monitoring.md +++ b/doc/05-service-monitoring.md @@ -225,12 +225,12 @@ apply Service "db-size-" for (db_name => config in host.vars.databases) { check_command = "mysql_health" if (config.mysql_health_username) { - vars.mysql_healt_username = config.mysql_health_username + vars.mysql_health_username = config.mysql_health_username } else { vars.mysql_health_username = "root" } if (config.mysql_health_password) { - vars.mysql_healt_password = config.mysql_health_password + vars.mysql_health_password = config.mysql_health_password } else { vars.mysql_health_password = "icingar0xx" } diff --git a/doc/09-object-types.md b/doc/09-object-types.md index 09d82c5cc..93974ef76 100644 --- a/doc/09-object-types.md +++ b/doc/09-object-types.md @@ -34,6 +34,7 @@ the [Icinga 2 API](12-icinga2-api.md#icinga2-api-config-objects). templates | Array | Templates imported on object compilation. package | String | [Configuration package name](12-icinga2-api.md#icinga2-api-config-management) this object belongs to. Local configuration is set to `_etc`, runtime created objects use `_api`. source\_location | Dictionary | Location information where the configuration files are stored. + name | String | Object name. Might be used in [apply rules](03-monitoring-basics.md#using-apply). ## Monitoring Objects @@ -731,7 +732,6 @@ Configuration Attributes: event\_command | Object name | **Optional.** The name of an event command that should be executed every time the service's state changes or the service is in a `SOFT` state. volatile | Boolean | **Optional.** Treat all state changes as HARD changes. See [here](08-advanced-topics.md#volatile-services-hosts) for details. Defaults to `false`. zone | Object name | **Optional.** The zone this object is a member of. Please read the [distributed monitoring](06-distributed-monitoring.md#distributed-monitoring) chapter for details. - name | String | **Required.** The service name. Must be unique on a per-host basis. For advanced usage in [apply rules](03-monitoring-basics.md#using-apply) only. command\_endpoint | Object name | **Optional.** The endpoint where commands are executed on. notes | String | **Optional.** Notes for the service. notes\_url | String | **Optional.** URL for notes for the service (for example, in notification commands). @@ -1046,8 +1046,8 @@ Configuration Attributes: Name | Type | Description --------------------------|-----------------------|---------------------------------- - host\_name | Object name | **Required.** The name of the host this comment belongs to. - service\_name | Object name | **Optional.** The short name of the service this comment belongs to. If omitted, this comment object is treated as host comment. + host\_name | Object name | **Required.** The name of the host this downtime belongs to. + service\_name | Object name | **Optional.** The short name of the service this downtime belongs to. If omitted, this downtime object is treated as host downtime. author | String | **Required.** The author's name. comment | String | **Required.** The comment text. start\_time | Timestamp | **Required.** The start time as UNIX timestamp. diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index ca06837c8..a8d9c7b7f 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -215,7 +215,7 @@ Optional custom variables passed as [command parameters](03-monitoring-basics.md | ifw\_api\_cert | null (Icinga PKI) | TLS client certificate path. | | ifw\_api\_key | null (Icinga PKI) | TLS client private key path. | | ifw\_api\_ca | null (Icinga PKI) | Peer TLS CA certificate path. | -| ifw\_api\_crl | null (Icinga PKI) | Path to TLS CRL to check peer against. | +| ifw\_api\_crl | null (none) | Path to TLS CRL to check peer against. | | ifw\_api\_username | null (none) | Basic auth username. | | ifw\_api\_password | null (none) | Basic auth password. | diff --git a/doc/12-icinga2-api.md b/doc/12-icinga2-api.md index 85c9aad86..81c9426fd 100644 --- a/doc/12-icinga2-api.md +++ b/doc/12-icinga2-api.md @@ -1850,7 +1850,7 @@ Example for all object events: --------------|---------------|-------------------------- type | String | Event type `DowntimeAdded`. timestamp | Timestamp | Unix timestamp when the event happened. - downtime | Dictionary | Serialized [Comment](09-object-types.md#objecttype-downtime) object. + downtime | Dictionary | Serialized [Downtime](09-object-types.md#objecttype-downtime) object. #### Event Stream Type: DowntimeRemoved @@ -1858,7 +1858,7 @@ Example for all object events: --------------|---------------|-------------------------- type | String | Event type `DowntimeRemoved`. timestamp | Timestamp | Unix timestamp when the event happened. - downtime | Dictionary | Serialized [Comment](09-object-types.md#objecttype-downtime) object. + downtime | Dictionary | Serialized [Downtime](09-object-types.md#objecttype-downtime) object. #### Event Stream Type: DowntimeStarted @@ -1867,7 +1867,7 @@ Example for all object events: --------------|---------------|-------------------------- type | String | Event type `DowntimeStarted`. timestamp | Timestamp | Unix timestamp when the event happened. - downtime | Dictionary | Serialized [Comment](09-object-types.md#objecttype-downtime) object. + downtime | Dictionary | Serialized [Downtime](09-object-types.md#objecttype-downtime) object. #### Event Stream Type: DowntimeTriggered @@ -1876,7 +1876,7 @@ Example for all object events: --------------|---------------|-------------------------- type | String | Event type `DowntimeTriggered`. timestamp | Timestamp | Unix timestamp when the event happened. - downtime | Dictionary | Serialized [Comment](09-object-types.md#objecttype-downtime) object. + downtime | Dictionary | Serialized [Downtime](09-object-types.md#objecttype-downtime) object. ### Event Stream Filter diff --git a/doc/14-features.md b/doc/14-features.md index 4a4ff32b7..19cb54b01 100644 --- a/doc/14-features.md +++ b/doc/14-features.md @@ -843,7 +843,7 @@ yum install icinga2-ido-mysql zypper install icinga2-ido-mysql ``` -###### Amazon Linux 2 +###### Amazon Linux ```bash yum install icinga2-ido-mysql @@ -942,7 +942,7 @@ yum install icinga2-ido-pgsql zypper install icinga2-ido-pgsql ``` -###### Amazon Linux 2 +###### Amazon Linux ```bash yum install icinga2-ido-pgsql diff --git a/doc/15-troubleshooting.md b/doc/15-troubleshooting.md index 33f7b81a7..4cc733854 100644 --- a/doc/15-troubleshooting.md +++ b/doc/15-troubleshooting.md @@ -950,95 +950,6 @@ curl -k -s -u root:icinga -H 'Accept: application/json' -X POST 'https://localho ``` -### Analyze Notification Result - -> **Note** -> -> This feature is available since v2.11 and requires all endpoints -> being updated. - -Notifications inside a HA enabled zone are balanced between the endpoints, -just like checks. - -Sometimes notifications may fail, and with looking into the (debug) logs -for both masters, you cannot correlate this correctly. - -The `last_notification_result` runtime attribute is stored and synced for Notification -objects and can be queried via REST API. - -Example for retrieving the notification object and result from all `disk` services using a -[regex match](18-library-reference.md#global-functions-regex) on the name: - -``` -$ curl -k -s -u root:icinga -H 'Accept: application/json' -H 'X-HTTP-Method-Override: GET' -X POST 'https://localhost:5665/v1/objects/notifications' \ --d '{ "filter": "regex(pattern, service.name)", "filter_vars": { "pattern": "^disk" }, "attrs": [ "__name", "last_notification_result" ], "pretty": true }' -{ - "results": [ - - { - "attrs": { - "last_notification_result": { - "active": true, - "command": [ - "/etc/icinga2/scripts/mail-service-notification.sh", - "-4", - "", - "-6", - "", - "-b", - "", - "-c", - "", - "-d", - "2019-08-02 10:54:16 +0200", - "-e", - "disk", - "-l", - "icinga2-agent1.localdomain", - "-n", - "icinga2-agent1.localdomain", - "-o", - "DISK OK - free space: / 38108 MB (90.84% inode=100%);", - "-r", - "user@localdomain", - "-s", - "OK", - "-t", - "RECOVERY", - "-u", - "disk" - ], - "execution_end": 1564736056.186217, - "execution_endpoint": "icinga2-master1.localdomain", - "execution_start": 1564736056.132323, - "exit_status": 0.0, - "output": "", - "type": "NotificationResult" - } - }, - "joins": {}, - "meta": {}, - "name": "icinga2-agent1.localdomain!disk!mail-service-notification", - "type": "Notification" - } - -... - - ] -} -``` - -Example with the debug console: - -``` -$ ICINGA2_API_PASSWORD=icinga icinga2 console --connect 'https://root@localhost:5665/' --eval 'get_object(Notification, "icinga2-agent1.localdomain!disk!mail-service-notification").last_notification_result.execution_endpoint' | jq - -"icinga2-agent1.localdomain" -``` - -Whenever a notification command failed to execute, you can fetch the output as well. - - ## Feature Troubleshooting ### Feature is not working