Nagios Notifications per XMPP

Nein nein, ich war alles nur nicht untätig. Hier hat sich soviel getan, mal sehen was ich wann davon hier aufschreibe.

Grad freu ich mich wie nen Spielkind.

Mein Nagios3 kann xmpp Notfifications 🙂

Und es ist total simpel.

in der /etc/nagios3/commands.cfg werden die Notifications definiert


# 'host-notify-by-jabber' command definition
define command{
command_name host-notify-by-jabber
command_line echo "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /scriptbase/jabbersend.rb -t jabber@meinserver.de
}

# 'notify-by-jabber' command definition
define command{
command_name notify-by-jabber
command_line echo "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /scriptbase/jabbersend.rb -t jabber@meinserver.de
}

und in der /etc/nagios3/conf.d/contacts_nagios2.cfg wird der oder werden die Contacts angepasst


define contact{
contact_name root
alias Root
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-jabber
host_notification_commands host-notify-by-jabber
}

Warum ich sowas mache? .o0(stellt sich die Frage wirklich..?!?)0o.
Zum Beispiel weil Fallback / Plan B / Diversifikation immer gut ist.
Und xmpp ist 2 Sekunden schneller als Email 😉
__________________________________
gpg –detach-sign -a ischtar

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.