]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
pixelpark - dev-monitoring: add mail notification commands for hosts and services
authorThomas Dalichow <thomas.dalichow@publicispixelpark.de>
Thu, 16 Mar 2017 13:28:22 +0000 (14:28 +0100)
committerThomas Dalichow <thomas.dalichow@publicispixelpark.de>
Thu, 16 Mar 2017 13:28:32 +0000 (14:28 +0100)
customer/pixelpark/dev-monitoring.pixelpark.com.yaml

index 4549588ea36ff5b12d0e3f9501a0ea84addba7bd..726281875e081a9445550dc8d01e5d6c68c2f4c6 100644 (file)
@@ -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: