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

Thomas Guyot-Sionnest dermoth at aei.ca
Tue Jan 30 04:47:23 CET 2007


On 21/01/07 03:56 PM, Jan Wagner wrote:
> On Thursday 12 October 2006 16:40, Alexey Bestchekov wrote:
>> ex:
>> root at udaff ~>/usr/lib/nagios/plugins/check_jabber -H localhost -p 5223 -w 1
>> -c 2 JABBER WARNING - 0,007 second response time on port
>> 5223|time=0,007033s;0.0;0.0;0.0;0.0
> 
> Hey Guys,
> 
> I can confirm this bug, since I'm also hit by it.
> 
> nagios2:~# /usr/lib/nagios/plugins/check_tcp -H foobar -p 5223
> TCP OK - 0,003 second response time on port 5223|
> time=0,003496s;0,000000;0,000000;0,000000;10,000000
> nagios2:~# /usr/lib/nagios/plugins/check_jabber -H foobar -p 5223
> JABBER WARNING - 0,021 second response time on port 5223|
> time=0,020542s;0.0;0.0;0.0;0.0
> 
> Maybe anybody on upstream can confirm it (any hopefully fix it :-)?

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>

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?

Thanks,

Thomas






More information about the Pkg-nagios-devel mailing list