[Nagiosplug-devel] [ nagiosplug-Bugs-1852198 ] Check_by_ssh exit code always 0

SourceForge.net noreply at sourceforge.net
Wed Jun 11 04:20:40 CEST 2008


Bugs item #1852198, was opened at 2007-12-17 01:56
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1852198&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: ADW (alain_dewit)
Assigned to: Nobody/Anonymous (nobody)
Summary: Check_by_ssh exit code always 0

Initial Comment:
The "check_by_ssh" plugin report always an exit status/code of 0 when it should return a value of "2".
Should be the same for the other exit code values.

Plugin compiled from nagios-plugins-1.4.7.tar.gz on a RedHat Fedora Core Intel system.

Best regards


----------------------------------------------------------------------

>Comment By: SourceForge Robot (sf-robot)
Date: 2008-06-10 19:20

Message:
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2008-05-27 14:31

Message:
Logged In: YES 
user_id=664364
Originator: NO

Hi!

I agree with Matthias - this works as designed. I've added a comment to
the -f option to state that the return code has to be 0.

A possibility is to remove the -f option, but that can be left for another
discussion.

I've marked the call to pending so it will auto-close after 7 days if
there are no updates.

Ton

----------------------------------------------------------------------

Comment By: Matthias Eble (psychotrahe)
Date: 2008-01-04 15:38

Message:
Logged In: YES 
user_id=1694341
Originator: NO

Hello alain,

I've looked into this issue and can reproduce the described behaviour..
But: check_by_ssh's -f
argument simply adds -f to the ssh call. With -f, ssh immediately returns,
even if the remote command is still running. Actually there is no exit code
at this point.

However, check_by_ssh waits for the command output, IMO because it reads
from the output file descriptor which is left open until the remote command
execution is done.

But this is a side effect.

Note that
/usr/bin/ssh -f 127.0.0.1 'exit 2' ;echo $?
also returns 0. I'd thus say check_by_ssh -f works as desi(gn|r)ed

I cannot imagine what -f should be good for though. But we should at least
place
a note in --help.

Any other comments?

Matthias


----------------------------------------------------------------------

Comment By: ADW (alain_dewit)
Date: 2007-12-17 03:11

Message:
Logged In: YES 
user_id=1961631
Originator: YES

I forgot to say that the problem only occur when using the "-f" (fork)
option.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1852198&group_id=29880




More information about the Devel mailing list