Nagios Instant Message Notifications?

Hope this is the right place to post this...

Does anyone out there have Nagios set up to send notitications via instant messaging? (MSN Messenger/G-Talk/Yahoo IM/ICQ/etc.)

If so, I would really like to hear about how you got that set up.

:stud
 
r-c-e said:

Thanks for the response.

Do you have this up and running?

The reason I ask is...

As you notice on the link you sent me - that was posted over 6 years ago. I have tried many of these scripts from the nagios site recently and , the libraries are broken, or the scripts are no longer compatible with the libraries, or the scripts/libraries are no longer compatible with the protocols.
 
Without looking at the link:

Afaik you can use centerim to remotely send IM-Messages, so perhaps you can write a nagios action which sends IMs via centerim.
 
I just tested this out, works like a charm.

just install centerim from ports, then while it runs you can inject messages in the que like this:

echo "Nagios notify" | centerim -s msg -p msn -t msnaccout@messenger.net

You might want to add a user sticky bit on the bin since you have to exec it as the same user thats running the centerim.

chmod u+s /usr/local/bin/centerim

More information can be found in section 9. at the docs.

/usr/local/share/doc/centerim/README

/lbl
 
Well after playing around with it a bit to make it work perfekt i discovered that its mutch easier to hand build the message than making nagios execing the centerim command.

i woud recommend this instead.

/usr/bin/printf "OUT\nMSG\n`date +%s`\n`date +%s`\n\n$NOTIFICATIONTYPE$ alert\nHost $HOSTNAME$ is $HOSTSTATE$\n" >> /var/spool/nagios/.centerim/m$CONTACTADDRESS1$/offline

/lbl
 
Back
Top