object NotificationCommand "xm-host-notification" { command = [ SysconfDir + "/icinga2/scripts/xm-host-notification.sh" ] env = { ADDRESS = "$address$" HOSTDISPLAYNAME = "$host.display_name$" HOSTNAME = "$host.name$" HOSTOUTPUT = "$host.output$" HOSTSTATE = "$host.state$" HOSTSTATETYPE = "$host.state_type$" LASTHOSTSTATECHANGE = "$host.last_state_change$" NOTIFICATIONAUTHOR = "$notification.author$" NOTIFICATIONCOMMENT = "$notification.comment$" NOTIFICATIONTYPE = "$notification.type$" SHORTDATETIME = "$icinga.short_date_time$" XM_INTEGRATION_URL = } } object NotificationCommand "xm-service-notification" { command = [ SysconfDir + "/icinga2/scripts/xm-service-notification.sh" ] env = { ADDRESS = "$address$" HOSTNAME = "$host.name$" LASTSERVICESTATECHANGE = "$service.last_state_change$" NOTIFICATIONAUTHOR = "$notification.author$" NOTIFICATIONCOMMENT = "$notification.comment$" NOTIFICATIONTYPE = "$notification.type$" SERVICEDISPLAYNAME = "$service.display_name$" SERVICENAME = "$service.name$" SERVICEOUTPUT = "$service.output$" SERVICESTATE = "$service.state$" SERVICESTATETYPE = "$service.state_type$" SHORTDATETIME = "$icinga.short_date_time$" XM_INTEGRATION_URL = } } template Notification "xm-host-notification" { command = "xm-host-notification" states = [ Up, Down ] types = [ Problem, Acknowledgement, Recovery, Custom, FlappingStart, FlappingEnd, DowntimeStart, DowntimeEnd, DowntimeRemoved ] period = "24x7" } template Notification "xm-service-notification" { command = "xm-service-notification" states = [ OK, Warning, Critical, Unknown ] types = [ Problem, Acknowledgement, Recovery, Custom, FlappingStart, FlappingEnd, DowntimeStart, DowntimeEnd, DowntimeRemoved ] period = "24x7" } apply Notification "xm-notification" to Host { import "xm-host-notification" user_groups = host.vars.notification.xm.groups users = host.vars.notification.xm.users assign where host.vars.notification.xm } apply Notification "xm-notification" to Service { import "xm-service-notification" user_groups = host.vars.notification.xm.groups users = host.vars.notification.xm.users assign where host.vars.notification.xm }