public
Description: Nagios Ruby Script to Send Notifications via Jabber
Homepage:
Clone URL: git://github.com/rvalente/notify_via_jabber.git
rvalente (author)
Mon Apr 06 07:26:12 -0700 2009
commit  1424df2198bd0b523cb4ae6c3a194cf5e4a8dbef
tree    bc427aca57c604a76fa64f74eb7c5925520d6e9b
parent  00c31d54a770cfb3c1575620139bb8c979670d51
name age message
file README.markdown Mon Apr 06 07:26:12 -0700 2009 asdf [rvalente]
file notify_via_jabber.rb Mon Apr 06 07:18:57 -0700 2009 added server variable [rvalente]
README.markdown

Introduction

This is a ruby script that can be used with Nagios to send notifications via Jabber. I am planning on supporting a persistent connection to Jabber to allow for communication back to the script to get the last notification, etc.

Installation

This script requires the following gems - xmpp4r

Place this script in

$PREFIX/libexec/notify_via_nagios.rb

Then you will want to add a couple lines of configuration to nagios, for example...

define command {
    command_name    notify-service-by-jabber
    command_line    /usr/local/nagios/libexec/notify_via_jabber.rb $CONTACTADDRESS1$ "$HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$" "Additional Info: $SERVICEOUTPUT$"
}

define command {
    command_name    notify-host-by-jabber
    command_line    /usr/local/nagios/libexec/notify_via_jabber.rb $CONTACTADDRESS1$ "$NOTIFICATIONTYPE$: $HOSTNAME$ is $HOSTSTATE$" "$HOSTOUTPUT$"
}