jabber notification

Giles Coochey gcoochey-MwjkAAnuF3lpIM7fuyJkTg at public.gmane.org
Mon Nov 26 17:14:35 CET 2007


Below
________________________________________
From: nagiosplug-help-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f at public.gmane.org
[mailto:nagiosplug-help-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f at public.gmane.org] On Behalf Of
Giles Coochey
Sent: 19 November 2007 13:02
To: nagiosplug
Subject: [Nagiosplug-help] jabber notification

Hi All,

I have seen the notify_by_jabber perl script.

Because of the number of notifications that I get through some passive
volatile service checks I was wondering whether anyone has seen one that
was compiled in C rather than perl, as Nagios seems to take quite a
while running the notification script when I get a flood of events - I'm
thinking that a C program might be faster.

Are there any jabber alternatives to the perl script?

If there isn't one then I'll look at using sec.pl to handle these
passive checks (they're SNMP traps, after all) and only produce a single
alert (so far they've been routing topology change notifications from
multiple routers & switches in our infrastructure).

Best Regards,

Giles


########################################################################
##

I've tried replacing the notify_via_jabber.pl perl script with centerim.
It essentially allows to run centerim in the background (as the Nagios)
user, and allows me to, as the Nagios user, send jabber alerts via the
command line.

A small issue is that as soon as I modify my commands.cfg to have a
notification I find it does not work, and cannot seem to talk to the
centerim process (centerim is running as the Nagios user).

This is what works from the command line:

echo "Host '$HOSTALIAS$' is $HOSTSTATE$ - Info: $HOSTOUTPUT$ - Time:
$LONGDATETIME$" | /usr/local/bin/centerim -s msg -p jab -t
username-eu7EghD4TOFEiooADzr8i9i2O/JbrIOy at public.gmane.org

This is what doesn't work from the commands.cfg file:

# 'notify-by-jabber' command definition
define command{
        command_name    notify-by-jabber
        command_line    /bin/echo "Service: $SERVICEDESC$ - Host:
$HOSTNAME$ - Address: $HOSTADDRESS$ - State: $SERVICESTATE$ - Info:
$SERVICEOUTPUT$ - Date: $LONGDATETIME$" | /usr/local/bin/centerim -s msg
-p jab -t username-eu7EghD4TOFEiooADzr8i9i2O/JbrIOy at public.gmane.org
        }

>From the Nagios log, I see it calling notify-by-jabber but I get no such
alert (I was using $CONTACTPAGER$ as the -t parameter, but tried
hardcoding it in the command and it still doesn't work).

Any ideas as to what might cause this?

On an aside, I have implemented sec.pl, but still have Nagios spending
too much time processing notifications, so really need to replace the
slow notify_by_jabber perl script. Centerim looks ideal, but for some
reason isn't working.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f at public.gmane.org
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list