24 lines
954 B
Plaintext
24 lines
954 B
Plaintext
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$}}}
|
|
}
|