This commit is contained in:
Adrien Bourmault 2022-02-07 20:30:56 +01:00 committed by admin666
parent 37146b0d03
commit f48e41bd4b
1 changed files with 23 additions and 0 deletions

23
icinga_template.conf Normal file
View File

@ -0,0 +1,23 @@
template NotificationCommand "jabber-template" {
import "plugin-notification-command"
command = [
"/etc/icinga2/scripts/xmpp-notification.py", # fill in the path to the script
"$xmpp_recipient$",
"$xmpp_message$"
]
vars.xmpp_recipient = "$jabberid$"
env = {
XMPP_USER = "$xmpp_user$"
XMPP_PASSWORD = "$xmpp_password$"
}
}
template NotificationCommand "jabber-host-notification" {
import "jabber-template"
vars.xmpp_message = {{{$notification.type$|$host.display_name$|$host.state$|$host.output$|$notification.author$|$notification.comment$}}}
}
template NotificationCommand "jabber-service-notification" {
import "jabber-template"
vars.xmpp_message = {{{$notification.type$|$host.display_name$/$service.name$|$service.state$|$service.output$|$notification.author$|$notification.comment$}}}
}