[Pkg-nagios-devel] Bug#717229: Bug#717229: Bug#717229: nagios-plugins-basic: check_ssh returns warning state incorrectly
Alexander Wirt
formorer at debian.org
Thu Jul 18 11:36:35 UTC 2013
Kiko Piris schrieb am Thursday, den 18. July 2013:
> On 18/07/2013 at 13:03 +0200, Jan Wagner wrote:
>
> > Could you please check if the following is working for you:
> > command_line /usr/lib/nagios/plugins/check_ssh '$ARG1$' '$HOSTADDRESS$'
>
> No, it doesn’t.
>
> In /etc/nagios3/conf.d/jabato.cfg, I have this:
>
> | define service {
> | hostgroup_name ssh-servers
> | service_description SSH
> | check_command check_ssh
> | use generic-service
> | notification_interval 0 ; set > 0 if you want to be renotified
> | }
>
> So, as $ARG1$ is empty: this results in nagios executing this command:
>
> $ /usr/lib/nagios/plugins/check_ssh '' 10.1.1.202
>
> The “original” /etc/nagios-plugins/config/ssh.cfg results in nagios
> executing this other command:
>
> $ /usr/lib/nagios/plugins/check_ssh 10.1.1.202 ''
>
>
> Both commands output the same, check_ssh usage string:
>
> | Usage:
> | check_ssh [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>
>
>
> check_ssh doesn’t like that extra empty argument (neither if it’s first
> place nor if it’s second).
>
> And that check_ssh output makes nagios believe the service status is warning.
No, the output never gets interpreted. Just the return code. Illegal
arguments lead to a return code of 3 on my testsystem:
# /usr/lib/nagios/plugins/check_ssh sdfsd
Usage:
check_ssh [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>
# echo $? :(
3
which should get intereted as "UNKNOWN" [1]
[1] http://nagios.sourceforge.net/docs/3_0/pluginapi.html
--
Alexander Wirt, formorer at formorer.de
CC99 2DDD D39E 75B0 B0AA B25C D35B BC99 BC7D 020A
More information about the Pkg-nagios-devel
mailing list