Nagios Monitoring ERROR/BUG
-
rmuhammadali
- Posts: 27
- Joined: Sat Dec 13, 2014 4:02 am
Nagios Monitoring ERROR/BUG
Dear All,
I found an error while running nagios. The problem arise when i use check_nrpe!check_swap and the output is "(Return code of 255 is out of bounds)" giving status OK. On the other side when i use check_ssh, the output is "connect to address xxx.xxx.xxx.xxx and port 22: No route to host".
Assuming that the remote host is down in this situation. Following are two examples of my nagios service configuration.
define service{
use generic-service
host_name client2
service_description Swap Usage
check_command check_nrpe!check_swap
}
define service{
use generic-service
host_name client2
service_description SSH Monitoring
check_command check_ssh
}
Please help me, how to manage this isue. Snapshot attached. Regards
RMA
I found an error while running nagios. The problem arise when i use check_nrpe!check_swap and the output is "(Return code of 255 is out of bounds)" giving status OK. On the other side when i use check_ssh, the output is "connect to address xxx.xxx.xxx.xxx and port 22: No route to host".
Assuming that the remote host is down in this situation. Following are two examples of my nagios service configuration.
define service{
use generic-service
host_name client2
service_description Swap Usage
check_command check_nrpe!check_swap
}
define service{
use generic-service
host_name client2
service_description SSH Monitoring
check_command check_ssh
}
Please help me, how to manage this isue. Snapshot attached. Regards
RMA
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios Monitoring ERROR/BUG
Can you post the command definitions for check_nrpe and check_ssh
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
rmuhammadali
- Posts: 27
- Joined: Sat Dec 13, 2014 4:02 am
Re: Nagios Monitoring ERROR/BUG
Dear,
Following are my check_nrpe and check_ssh command definations.
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
define command{
command_name check_ssh
command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
}
Regards
RMA
Following are my check_nrpe and check_ssh command definations.
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
define command{
command_name check_ssh
command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
}
Regards
RMA
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios Monitoring ERROR/BUG
With the host you are trying to test, in your host definition file is this a DNS name or an IP address?rmuhammadali wrote:define command{
command_name check_ssh
command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
}
define service{
use generic-service
host_name client2
service_description SSH Monitoring
check_command check_ssh
}
From the command line of your nagios host can you ping the DNS name or an IP address?
On your remote host you will have the check_swap command defined in the file /usr/local/nagios/etc/nrpe.cfg OR in the file /usr/local/nagios/etc/nrpe/common.cfgrmuhammadali wrote:define service{
use generic-service
host_name client2
service_description Swap Usage
check_command check_nrpe!check_swap
}
Is this the case, does an entry for check_swap exist?
Also, have you configured the only_from entry in/etc/xinetd.d/nrpe ?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
rmuhammadali
- Posts: 27
- Joined: Sat Dec 13, 2014 4:02 am
Re: Nagios Monitoring ERROR/BUG
/etc/xinetd.d/nrpe Configuration
only from = nagiosserverip
/usr/local/nagios/etc/nrpe.cfg Configuration
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 40% -c 20%
Actually i have down the nrpe client machine to check added monitors.
Regards
RMA
only from = nagiosserverip
/usr/local/nagios/etc/nrpe.cfg Configuration
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 40% -c 20%
Actually i have down the nrpe client machine to check added monitors.
Regards
RMA
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Monitoring ERROR/BUG
Can you show the permissions of the check_swap file on the remote system
Code: Select all
ls -l /usr/local/nagios/libexec/check_swap-
rmuhammadali
- Posts: 27
- Joined: Sat Dec 13, 2014 4:02 am
Re: Nagios Monitoring ERROR/BUG
Dear,
As i mentioned earlier that assume the remote machine is down, in that case there is nothing concerns with check_swap permissions on remote host. Anyhow the permissions are
The question is how to manage "(Return code of 255 is out of bounds)" this error when remote host is down.
Regards
RMA
As i mentioned earlier that assume the remote machine is down, in that case there is nothing concerns with check_swap permissions on remote host. Anyhow the permissions are
Code: Select all
ls -al /usr/local/nagios/libexec/check_swap
-rwxr-xr-x. 1 root root 141169 Dec 20 11:48 /usr/local/nagios/libexec/check_swapRegards
RMA
Re: Nagios Monitoring ERROR/BUG
If the host is down, nrpe should time out, not return 255.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
rmuhammadali
- Posts: 27
- Joined: Sat Dec 13, 2014 4:02 am
Re: Nagios Monitoring ERROR/BUG
Dear,
thats the situation, it show
Current Status: OK
Status Information: (Return code of 255 is out of bounds)
Rather then time out or some other status like warning or critical.
Regards
RMA
thats the situation, it show
Current Status: OK
Status Information: (Return code of 255 is out of bounds)
Rather then time out or some other status like warning or critical.
Regards
RMA
-
rmuhammadali
- Posts: 27
- Joined: Sat Dec 13, 2014 4:02 am
Re: Nagios Monitoring ERROR/BUG
Dear,
After keen observation, i found out the following statistics
1) When System is up and running
2) When System is down manually
First Result
Then on the Second check
Regards
RMA
After keen observation, i found out the following statistics
1) When System is up and running
Code: Select all
[root@nagios myconf]# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.7 -c check_swap
SWAP OK - 100% free (999 MB out of 999 MB) |swap=999MB;399;199;0;999
First Result
Code: Select all
[root@nagios myconf]# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.7 -c check_swap
CHECK_NRPE: Socket timeout after 10 seconds.
Code: Select all
[root@nagios myconf]# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.7 -c check_swap
connect to address 192.168.2.7 port 5666: No route to host
connect to host 192.168.2.7 port 5666: No route to hostRMA