Skip to content

Commit bd7d7ef

Browse files
author
Michael Friedrich
committed
Docs: Add a note on required configuration updates for new notification scripts in v2.7.0
1 parent 32205c9 commit bd7d7ef

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Notes
66

7-
* New mail notification scripts
7+
* New mail notification scripts. Please note that this requires a configuration update to NotificationCommand objects, Notification apply rules for specific settings and of course the notification scripts. More can be found [here](https://github.com/Icinga/icinga2/pull/5475).
88
* check_nscp_api plugin for NSClient++ REST API checks
99
* Work queues for features including logs & metrics
1010
* More metrics for the "icinga" check

doc/03-monitoring-basics.md

+47
Original file line numberDiff line numberDiff line change
@@ -1581,6 +1581,53 @@ defaults can always be overwritten locally.
15811581
> This example requires the `mail` binary installed on the Icinga 2
15821582
> master.
15831583
1584+
#### Notification Commands in 2.7 <a id="notification-command-2-7"></a>
1585+
1586+
Icinga 2 v2.7.0 introduced new notification scripts which support both
1587+
environment variables and command line parameters.
1588+
1589+
Therefore the `NotificationCommand` objects inside the [commands.conf](04-configuring-icinga-2.md#commands-conf)
1590+
and `Notification` apply rules inside the [notifications.conf](04-configuring-icinga-2.md#notifications-conf)
1591+
configuration files have been updated. Your configuration needs to be
1592+
updated next to the notification scripts themselves.
1593+
1594+
> **Note**
1595+
>
1596+
> Several parameters have been changed. Please review the notification
1597+
> script parameters and configuration objects before updating your production
1598+
> environment.
1599+
1600+
The safest way is to incorporate the configuration updates from
1601+
v2.7.0 inside the [commands.conf](04-configuring-icinga-2.md#commands-conf) and [notifications.conf](04-configuring-icinga-2.md#notifications-conf)
1602+
configuration files.
1603+
1604+
A quick-fix is shown below:
1605+
1606+
@@ -5,7 +5,8 @@ object NotificationCommand "mail-host-notification" {
1607+
1608+
env = {
1609+
NOTIFICATIONTYPE = "$notification.type$"
1610+
- HOSTALIAS = "$host.display_name$"
1611+
+ HOSTNAME = "$host.name$"
1612+
+ HOSTDISPLAYNAME = "$host.display_name$"
1613+
HOSTADDRESS = "$address$"
1614+
HOSTSTATE = "$host.state$"
1615+
LONGDATETIME = "$icinga.long_date_time$"
1616+
@@ -22,8 +23,9 @@ object NotificationCommand "mail-service-notification" {
1617+
1618+
env = {
1619+
NOTIFICATIONTYPE = "$notification.type$"
1620+
- SERVICEDESC = "$service.name$"
1621+
- HOSTALIAS = "$host.display_name$"
1622+
+ SERVICENAME = "$service.name$"
1623+
+ HOSTNAME = "$host.name$"
1624+
+ HOSTDISPLAYNAME = "$host.display_name$"
1625+
HOSTADDRESS = "$address$"
1626+
SERVICESTATE = "$service.state$"
1627+
LONGDATETIME = "$icinga.long_date_time$"
1628+
```
1629+
1630+
15841631
#### mail-host-notification <a id="mail-host-notification"></a>
15851632
15861633
The `mail-host-notification` NotificationCommand object uses the

0 commit comments

Comments
 (0)