check_jabber
Paulus, Jake
jpaulus at sourceinterlink.com
Sat Nov 22 02:04:22 CET 2008
Check_jabber is really just check_tcp in disguise (same way check_udp
is...do file check_jabber to see what I mean.) If your jabber server
sends back a string that doesn't match what is expected (as is happening
here) then you're going to get a warning. Given the output below, you
should be OK using:
./check_tcp -H sheldrick.co.uk -p 5222 -s "<stream:stream to='host'
xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>"
-e "<?xml version='1.0' encoding='UTF-8'?><stream:stream
xmlns:stream=\"http://etherx.jabber.org/streams\"
xmlns=\"jabber:client\"" -w 3 -c 5
I tested this (hope you don't mind) and got this response from your
server:
TCP OK - 0.329 second response time on port 5222 [<?xml version='1.0'
encoding='UTF-8'?><stream:stream
xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"
from="sheldrick.co.uk" id="999b48cc"
xml:lang="en">]|time=0.328587s;3.000000;5.000000;0.000000;10.000000
You may wish to adjust warning and critical thresholds to your liking.
Thanks, -Jake
-----Original Message-----
From: Patrick Morris [mailto:patrick.morris at hp.com]
Sent: Friday, November 21, 2008 7:12 PM
To: Luke Sheldrick
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_jabber
On Fri, 21 Nov 2008, Luke Sheldrick wrote:
> Hi,
>
> Has anyone every got check_jabber to work?
>
> Seems what ever syntax I try, it still WARNs...
>
> ./check_jabber -H sheldrick.co.uk -v
> Using service JABBER
> Port: 5222
> flags: 0x26
> Send string: <stream:stream to='host' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'>
>
> Quit string: </stream:stream>
>
> server_expect_count: 1
> 0: <?xml version='1.0'?><stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
> received 174 bytes from host
> #-raw-recv-------#
> <?xml version='1.0' encoding='UTF-8'?><stream:stream
xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"
from="sheldrick.co.uk" id="db947949" xml:lang="en">
> #-raw-recv-------#
> looking for [<?xml version='1.0'?><stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'] in beginning of [<?xml
version='1.0' encoding='UTF-8'?><stream:stream
xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"
from="sheldrick.co.uk" id="db947949" xml:lang="en">]
> couldn't find it
> JABBER WARNING - Unexpected response from host/socket on port
5222|time=0.044792s;;;0.000000;10.000000
Well, yeah -- based on the message, the string it's trying to match
against isn't what your server sends.
Unless that's configurable, it's never going to work without some
recoding.
------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin 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