Problem with check_by_ssh
Posted: Mon May 17, 2010 10:10 am
The check_by_ssh plugin is having problems due to the /etc/issue banner. On the command line here is what is happening:
user@mysystem $ ./check_by_ssh -H mysystem -C "/bin/ls /tmp"
Remote command execution failed: Warning:
In the Nagios viewer it shows a key failure (which is not the case here)
However, I can ssh to the system on the command line:
user@mysystem $ ssh -q mysystem
Last login: Mon May 11 00:01:00 2009 from 192.168.0.12
(newuser)othersystem:/home/newuser#
If I run this command which suppresses the banner and creates a fake tty:
[user@mysystem dir]$ ssh -q -t othersystem -C "/bin/ls /tmp"
The above command works.
The problem is that the check_by_ssh command does not let me put the -t or -q flags in it to make this command possible. In fact the -t command is short for "timeout" in check_by_ssh.
Is there some kind of workaround I can use with the check_by_ssh command? I'd prefer to use check_by_ssh with its options so it saves me the headache of creating my own plugin.
user@mysystem $ ./check_by_ssh -H mysystem -C "/bin/ls /tmp"
Remote command execution failed: Warning:
In the Nagios viewer it shows a key failure (which is not the case here)
However, I can ssh to the system on the command line:
user@mysystem $ ssh -q mysystem
Last login: Mon May 11 00:01:00 2009 from 192.168.0.12
(newuser)othersystem:/home/newuser#
If I run this command which suppresses the banner and creates a fake tty:
[user@mysystem dir]$ ssh -q -t othersystem -C "/bin/ls /tmp"
The above command works.
The problem is that the check_by_ssh command does not let me put the -t or -q flags in it to make this command possible. In fact the -t command is short for "timeout" in check_by_ssh.
Is there some kind of workaround I can use with the check_by_ssh command? I'd prefer to use check_by_ssh with its options so it saves me the headache of creating my own plugin.