From 036719720acf23b2a42f33fe87bc56311235cd3a Mon Sep 17 00:00:00 2001 From: Thomas Dalichow Date: Thu, 16 Mar 2017 14:28:22 +0100 Subject: [PATCH] pixelpark - dev-monitoring: add mail notification commands for hosts and services --- .../dev-monitoring.pixelpark.com.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/customer/pixelpark/dev-monitoring.pixelpark.com.yaml b/customer/pixelpark/dev-monitoring.pixelpark.com.yaml index 4549588e..72628187 100644 --- a/customer/pixelpark/dev-monitoring.pixelpark.com.yaml +++ b/customer/pixelpark/dev-monitoring.pixelpark.com.yaml @@ -183,6 +183,40 @@ site::profile::icinga2::object::notification: user_groups: 'host.vars.notification.mail.groups' users: 'host.vars.notification.mail.users' +site::profile::icinga2::object::notificationcommand: + 'mail-host-notification': + target: '/etc/icinga2/conf.d/notification-commands.conf' + command: 'SysconfDir + /icinga2/scripts/mail-host-notification.sh' + env: + 'NOTIFICATIONTYPE': '$notification.type$' + 'HOSTALIAS': '$host.display_name$' + 'HOSTADDRESS': '$address$' + 'HOSTSTATE': '$host.state$' + 'LONGDATETIME': '$icinga.long_date_time$' + 'HOSTOUTPUT': '$host.output$' + 'NOTIFICATIONAUTHORNAME': '$notification.author$' + 'NOTIFICATIONCOMMENT': '$notification.comment$' + 'HOSTDISPLAYNAME': '$host.display_name$' + 'USEREMAIL': '$user.email$' + 'mail-service-notification': + target: '/etc/icinga2/conf.d/notification-commands.conf' + command: 'SysconfDir + /icinga2/scripts/mail-service-notification.sh' + env: + 'NOTIFICATIONTYPE': '$notification.type$' + 'SERVICEDESC': '$service.name$' + 'HOSTALIAS': '$host.display_name$' + 'HOSTADDRESS': '$address$' + 'SERVICESTATE': '$service.state$' + 'LONGDATETIME': '$icinga.long_date_time$' + 'SERVICEOUTPUT': '$service.output$' + 'NOTIFICATIONAUTHORNAME': '$notification.author$' + 'NOTIFICATIONCOMMENT': '$notification.comment$' + 'HOSTDISPLAYNAME': '$host.display_name$' + 'SERVICEDISPLAYNAME': '$service.display_name$' + 'USEREMAIL': '$user.email$' + + + ## test-host site::profile::icinga2::object::host: -- 2.39.5