From 99aa33b85f7e2dfe4a1240309dc4121c062bed6e Mon Sep 17 00:00:00 2001 From: Mathias Aerts Date: Mon, 26 Jun 2023 09:17:26 +0200 Subject: [PATCH 1/9] Fix typo --- doc/05-service-monitoring.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" } From 2e03a2e5288361e13e54b7b257f2568d1eb13cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Aleksandrovi=C4=8D=20Klimov?= Date: Fri, 25 Aug 2023 12:26:32 +0200 Subject: [PATCH 2/9] Doc: ITL: correct $ifw_api_crl$ default In contrast to cert/key/CA, no CRL means no CRL. (The behavior of the API is the same.) --- doc/10-icinga-template-library.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. | From 04dbf4aa1375344055de7491a176abf279411d93 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Wed, 11 Oct 2023 10:34:51 +0200 Subject: [PATCH 3/9] Fix downtime host/service name attribute descriptions --- doc/09-object-types.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/09-object-types.md b/doc/09-object-types.md index 09d82c5cc..c7043cfb6 100644 --- a/doc/09-object-types.md +++ b/doc/09-object-types.md @@ -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. From bb717cf177fe6afbd8ee28c1cfd2e56347bc299c Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Fri, 13 Oct 2023 16:08:59 +0200 Subject: [PATCH 4/9] Fix link text for Downtime* Event Stream Types The link text for all Downtime* Event Stream Types contains "Comment" instead of "Downtime" even when pointing to the correct object. --- doc/12-icinga2-api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From 0dd66f9886e4ada170a60ae9b0a0fb2998a73720 Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Tue, 24 Oct 2023 10:58:39 +0200 Subject: [PATCH 5/9] Document host Common Runtime Attribute --- doc/09-object-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/09-object-types.md b/doc/09-object-types.md index c7043cfb6..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). From 9a084721623a48a49a6dfe074a11c15c3f5c7d33 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 7 Nov 2023 11:14:55 +0100 Subject: [PATCH 6/9] Docs: change "Amazon Linux 2" to "Amazon Linux" where applicable We also support Amazon Linux 2023 now. --- doc/02-installation.md | 16 ++++++++++------ doc/14-features.md | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) 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/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 From 61900b73e16778fd8419019297f0a94444cb26c1 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 12 Dec 2023 11:04:51 +0100 Subject: [PATCH 7/9] Doc: Troubleshooting: remove obsolete section "Analyze Notification Result" This feature has been reverted and won't be re-introduced anytime soon. --- doc/15-troubleshooting.md | 89 --------------------------------------- 1 file changed, 89 deletions(-) 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 From 5835e2e03bb062a438ff54201195c2f599d1919f Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Mon, 14 Aug 2023 09:45:00 +0200 Subject: [PATCH 8/9] Update .mailmap --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 46447896a..588d09a2c 100644 --- a/.mailmap +++ b/.mailmap @@ -23,6 +23,7 @@ Alexander A. Klimov + From 12c706a8ac9c1da9f4198a0bd10edce1f92619a1 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 4 Dec 2023 15:24:05 +0100 Subject: [PATCH 9/9] Update AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) 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