[Nagiosplug-devel] [ nagiosplug-Bugs-1852198 ] Check_by_ssh exit code always 0
SourceForge.net
noreply at sourceforge.net
Sat Jan 5 00:38:31 CET 2008
Bugs item #1852198, was opened at 2007-12-17 10:56
Message generated for change (Comment added) made by psychotrahe
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: Open
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: Matthias Eble (psychotrahe)
Date: 2008-01-05 00: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 12: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