# Nagios Instant Message Notifications?



## dave (Dec 13, 2008)

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 (Dec 13, 2008)

from the faq (for aim): http://www.nagios.org/faqs/viewfaq.php?faq_id=33&expand=false&showdesc=true


----------



## dave (Dec 13, 2008)

r-c-e said:
			
		

> 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@ (Dec 19, 2008)

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 (Dec 21, 2008)

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 (Dec 21, 2008)

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 (Dec 22, 2008)

I've using sendxmpp ( /usr/ports/net-im/sendxmpp ) who looks easier than centericq. Only for XMPP (Jabber/GoogleTalk)


----------

