Bug#392610: [Nagiosplug-devel] [Pkg-nagios-devel] Bug#392610: nagios-plugins-basic: check_jabber always return warning

Jan Wagner waja at cyconet.org
Tue Jan 30 10:00:39 CET 2007


Hi Thomas,

thanks for your help.

On Tuesday 30 January 2007 06:12, Thomas Guyot-Sionnest wrote:
> > The jabber check sends data and waits for a response. To get the same
> > with check_tcp you would need the following additional parameters (I
> > copied that from C code so I'm not sure if the escapes are all good):
> >
> > --send="<stream:stream to=\'host\' xmlns=\'jabber:client\'
> > xmlns:stream=\'http://etherx.jabber.org/streams\'>\n"
> >
> > --expect="<?xml version=\'1.0\'?><stream:stream
> > xmlns:stream=\'http://etherx.jabber.org/streams\'"
> > 
> > --quit="</stream:stream>\n";
> >
> > --ssl
> >
> > --jail
> >
> >
> > The confusion here comes from --jail which does not only remove the
> > output but also doesn't tell the reason of the warning. Without --jail
> > you would get:
> >
> > TCP WARNING - Unexpected response from host/socket: <INSERT_OUTPUT_HERE>

# LANG=C ./check_tcp -H jabber.org -p 5223 --send="<stream:stream 
to=\'jabber.org\' xmlns=\'jabber:client\' 
xmlns:stream=\'http://etherx.jabber.org/streams\'>\n" --expect="<?xml 
version=\'1.0\'?><stream:stream 
xmlns:stream=\'http://etherx.jabber.org/streams\'" --quit="</stream:stream>\n" --ssl -j
TCP WARNING - Unexpected response from host/socket on port 5223|
time=0.703722s;0.000000;0.000000;0.000000;10.000000

# LANG=C ./check_tcp -H jabber.org -p 5223 --send="<stream:stream 
to=\'jabber.org\' xmlns=\'jabber:client\' 
xmlns:stream=\'http://etherx.jabber.org/streams\'>\n" --expect="<?xml 
version=\'1.0\'?><stream:stream 
xmlns:stream=\'http://etherx.jabber.org/streams\'" --quit="</stream:stream>\n" --ssl --jail
./check_TCP: option `--jail' requires an argument

Hmm .. is there any trouble with "--jail" there?

> > I'll see if there's an easy fix for that.
> >
> > I also see one more possible problem. Should it be CRITICAL instead of
> > WARNING when the output doesn't match? And do you have an external
> > jabber host to check against so I can make sure the send/expect rules
> > are right?
>
> The attached patch (Also in CVS) will fix the reporting problem. If
> there's any problem with the jabber check itself (i.e. warning status)
> I'll need a server to test with. I guess that a bad server response
> should mean a CRITICAL failure rather than a WARNING, right?

Try jabber.org as host to check your fixes, this one should be public 
available.

Thanks and with kind regards, Jan.
-- 
Never write mail to <waja at spamfalle.info>, you have been warned!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w--- O M V- PS PE
Y++ PGP++ t-- 5 X R tv- b+ DI- D++ G++ e++ h-- r+++ y+++
------END GEEK CODE BLOCK------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20070130/8e79c3c6/attachment.pgp


More information about the Pkg-nagios-devel mailing list