I have installed 4.3.1. i am trying to monitor my sles11 machine using check_by_ssh.
i have created nagios user and installed nagios plugins in remote machines.
Return code of 255 is out of bounds : UNKNOWN - check_by_ssh: Remote command '/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /' returned status 255))
my commands.cfg is
define command{
command_name check_disk_by_ssh
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C "/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$" -E
}
i have tried with -l nagios -i ~nagios/.ssh option in command line but no luck
define service{
use local-service
#hostgroup_name servers ; Name of service template to use
host_name <remote host>
service_description Root Partition
check_command check_disk_by_ssh!20%!10%!/
check_interval 1
max_check_attempts 1
notification_interval 0
notifications_enabled 1
}
please help me ................
Return code of 255 is out of bounds : UNKNOWN - check_by_ssh
Re: Return code of 255 is out of bounds : UNKNOWN - check_by
What does the nrpe.cfg on the client show for the check_disk command? It should be:
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Is the check_disk command able to run directly on the client machine:
/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
?
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Is the check_disk command able to run directly on the client machine:
/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Return code of 255 is out of bounds : UNKNOWN - check_by
@venkstesh, You may try running the command with a verbose flag:
Please run this command locally and show us the output:
Also, you need to make sure that you can ssh from the nagios server to the remote server without entering password.
If you can't do it please refer to this tutorial:
https://www.ssh.com/ssh/copy-id
Code: Select all
-v, --verbose
Show details for command-line debugging (Nagios may truncate output)
Code: Select all
cd /usr/local/nagios/libexec/
./check_by_ssh -H IP_address -C "/usr/local/nagios/libexec/check_disk -w 20% -c 10%" -v
Code: Select all
ssh remote_server_ip
https://www.ssh.com/ssh/copy-id
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Return code of 255 is out of bounds : UNKNOWN - check_by
this error generally points to a permission error somewhere.Return code of 255 is out of bounds : UNKNOWN - check_by_ssh: Remote command '/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /' returned status 255))