check_ssh OK on command line but not Core UI
Posted: Fri Jun 26, 2015 10:22 am
Interesting problem, I cannot seem to resolve.
I have a Debian 7 VM running in Virtualbox which runs Nagios Core, it is also the 'local host' nrpe.
I have a second Debian 7 VM running in VMWare Player 7.1.2 which is a remote host
I have a Debian 8 VM again running in VMWare player 7.1.2 as a remote host
The windows host machine (win 7 pro) is a 'windows server'.
All is well with the exception of ssh and ftp,
One problem at a time.
From the Nagios core machine command line I can run "/usr/local/nagios/libexec/check_ssh <IP Address> and I get back
"SSH OK - OpenSSH_6.0p1 Debian-4+deb7u2 (protocol 2.0) | time=0.008823s;;;0.000000;10.000000"
All seems well, this works on all of the Debian VMs including the Nagios Core machine.
However, the Core UI says that the status of the SSH Service is . . .
Current Status:
UNKNOWN
(for 0d 3h 7m 16s)
Status Information: check_ssh: Invalid hostname/address - $
Usage:
check_ssh [-4
Performance Data: -6] [-t <timeout>] [-r <remote version>] [-p <port>] <host>
Current Attempt: 3/3 (HARD state)
Last Check Time: 06-26-2015 16:06:30
Check Type: ACTIVE
The commands.cfg definition for SSH is:
# 'check_ssh' command definition
define command{
command_name check_ssh
command_line $USER1$/check_ssh -H $HOSTADDRESS$
}
And my assumption that with the exception of ftp all of the other services are working means that the HOSTADDRESS is configured correctly.
CPU Load OK 06-26-2015 16:10:52 0d 3h 16m 59s 1/3 OK - load average: 0.00, 0.01, 0.05
Current Users OK 06-26-2015 16:10:52 0d 3h 16m 59s 1/3 USERS OK - 2 users currently logged in
FTP Monitoring CRITICAL 06-26-2015 16:16:53 1d 5h 10m 4s 3/3 NRPE: Command 'check_ftp' not defined
SSH Monitoring UNKNOWN 06-26-2015 16:16:30 0d 3h 10m 59s 3/3 check_ssh: Invalid hostname/address - $
Any help most welcome.
I have a Debian 7 VM running in Virtualbox which runs Nagios Core, it is also the 'local host' nrpe.
I have a second Debian 7 VM running in VMWare Player 7.1.2 which is a remote host
I have a Debian 8 VM again running in VMWare player 7.1.2 as a remote host
The windows host machine (win 7 pro) is a 'windows server'.
All is well with the exception of ssh and ftp,
One problem at a time.
From the Nagios core machine command line I can run "/usr/local/nagios/libexec/check_ssh <IP Address> and I get back
"SSH OK - OpenSSH_6.0p1 Debian-4+deb7u2 (protocol 2.0) | time=0.008823s;;;0.000000;10.000000"
All seems well, this works on all of the Debian VMs including the Nagios Core machine.
However, the Core UI says that the status of the SSH Service is . . .
Current Status:
UNKNOWN
(for 0d 3h 7m 16s)
Status Information: check_ssh: Invalid hostname/address - $
Usage:
check_ssh [-4
Performance Data: -6] [-t <timeout>] [-r <remote version>] [-p <port>] <host>
Current Attempt: 3/3 (HARD state)
Last Check Time: 06-26-2015 16:06:30
Check Type: ACTIVE
The commands.cfg definition for SSH is:
# 'check_ssh' command definition
define command{
command_name check_ssh
command_line $USER1$/check_ssh -H $HOSTADDRESS$
}
And my assumption that with the exception of ftp all of the other services are working means that the HOSTADDRESS is configured correctly.
CPU Load OK 06-26-2015 16:10:52 0d 3h 16m 59s 1/3 OK - load average: 0.00, 0.01, 0.05
Current Users OK 06-26-2015 16:10:52 0d 3h 16m 59s 1/3 USERS OK - 2 users currently logged in
FTP Monitoring CRITICAL 06-26-2015 16:16:53 1d 5h 10m 4s 3/3 NRPE: Command 'check_ftp' not defined
SSH Monitoring UNKNOWN 06-26-2015 16:16:30 0d 3h 10m 59s 3/3 check_ssh: Invalid hostname/address - $
Any help most welcome.