[Nagiosplug-devel] Potential bug in nagios plugin check_by_ssh 1.39

Holger Weiss holger at CIS.FU-Berlin.DE
Fri Jun 15 21:44:06 CEST 2007


* Sebastian Wolfgarten <sebastian at wolfgarten.com> [2007-06-07 16:51]:
> nagios at db01:~$ /usr/lib/nagios/plugins/check_by_ssh -l nagcheck -H 10.0.0.30 -C id
> uid=10001(nagcheck) gid=100(users) groups=100(users)
> 
> As you can see, the plugin successfully shows the output of the "id"
> command. However when I try to cat a file I do not get any output at all:

check_by_ssh doesn't write more than one line as Nagios 2.x doesn't
support multiple lines of plugin output.  By default, the first line
read from the remote command is used as the plugin output.  I guess this
line is empty in your file.  If you want a different line, you can use
"check_by_ssh -Sn" (where "n" is a positive integer) to spit out the
n+1'th line read from the remote command's stdout output[*].

Holger

[*] Note that it works this way both with revision 1.39 of check_by_ssh
    and with the current version, despite the help output of revision
    1.39 incorrectly talking about stderr.  (This has been fixed by now,
    and the "-E" flag has been added for supressing output to stderr.)

-- 
PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE




More information about the Devel mailing list