View Full Version : Nagios Instant Message Notifications?
dave
December 13th, 2008, 21:56
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
December 14th, 2008, 00:11
from the faq (for aim): http://www.nagios.org/faqs/viewfaq.php?faq_id=33&expand=false&showdesc=true
dave
December 14th, 2008, 00:59
from the faq (for aim): http://www.nagios.org/faqs/viewfaq.php?faq_id=33&expand=false&showdesc=true
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.
lme@
December 19th, 2008, 16:29
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.
lbl
December 21st, 2008, 10:43
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
lbl
December 21st, 2008, 11:23
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
Ole
December 22nd, 2008, 09:29
I've using sendxmpp ( /usr/ports/net-im/sendxmpp ) who looks easier than centericq. Only for XMPP (Jabber/GoogleTalk)
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.