[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 06:12:47 CET 2007


On 29/01/07 10:47 PM, Thomas Guyot-Sionnest wrote:
> On 21/01/07 03:56 PM, Jan Wagner wrote:
>> 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?

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?

Regards,

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_tcp.expect_reporting.patch
Type: text/x-patch
Size: 3081 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070130/083f9544/attachment.bin>


More information about the Devel mailing list