[Pkg-nagios-devel] Bug#717229: Bug#717229: nagios-plugins-basic: check_ssh returns warning state incorrectly

Kiko Piris menorqui at pirispons.net
Thu Jul 18 11:15:31 UTC 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.

-- 
Kiko



More information about the Pkg-nagios-devel mailing list