Page 1 of 3
Issue while executing the NRPE plugin
Posted: Wed Jul 16, 2014 6:25 am
by kgopiramesh
Hi Experts,
we are having the issue with NRPE plugin, we have configured two different services using NRPE memory utilization and hard disk status.
It is executing perfectly but when the problem is detected, we have configured the retry interval as 1min for 5 times and when it runs for the first retry, we are receiving the error that we have received 0 bytes from daemon.
we have even changed the polling interval set to 1 min, but still we are left out with the same error. we have set don_blame_nrpe directive to 1 in nrpe.cfg file.
Please let me know if I am missing any configuration.
Does the nagios server time should match the remote server time in order to work NRPE plugin perfectly?
Re: Issue while executing the NRPE plugin
Posted: Wed Jul 16, 2014 1:07 pm
by tmcdonald
How have you installed NRPE?
Did you restart the process after changing the config?
Are there any processes in place that limit connections to the NRPE machine? (maybe to prevent DoS attacks)
Re: Issue while executing the NRPE plugin
Posted: Thu Jul 17, 2014 2:42 am
by kgopiramesh
I have installed NRPE as per the document got from Nagios support and I have restarted the xinetd service after changing the config. Please let me know if there is any other process needs to be restarted.
we have enabled the unlimited connection options in the /etc/xinetd.d/nrpe file. Please find the nrpe file contents
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1, 10.16.12.14
per_source = UNLIMITED
instances = UNLIMITED
}
we have restarted the xinetd service after editing this, still we are having the same issue. we have removed the recheck intervals now but still we are receiving the output some times and not receiving some times.
Re: Issue while executing the NRPE plugin
Posted: Thu Jul 17, 2014 11:08 am
by technick
For troubleshooting reasons, I recommend doing this...
1. Disable xinetd nrpe plugin and start the nrpe daemon so its persistent. This will eliminate any possibility its an issue with xinetd.
2. Check your logs... if something is wrong on the client machine, nrpe will normally yelp into /var/log/messages
3. Run check_nrpe from the monitoring machine at the CLI for checking your results...
Re: Issue while executing the NRPE plugin
Posted: Thu Jul 17, 2014 1:08 pm
by kgopiramesh
Hi Technick,
I am not clear on your below statement. Please explain more in detail
Disable xinetd nrpe plugin and start the nrpe daemon so its persistent. This will eliminate any possibility its an issue with xinetd.
Re: Issue while executing the NRPE plugin
Posted: Thu Jul 17, 2014 1:39 pm
by technick
I am assuming you are running on a Red Hat box or a derivative.
Edit /etc/xinetd.d/nrpe
Change disable = true
Restart xinetd (service xinetd restart)
Run NRPE in stand alone daemon mode.
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
You should be able to see it running in your processes (ps auxwww | grep nrpe)
Now its running in stand-alone daemon mode, completely eliminating xinetd from the equation.
Re: Issue while executing the NRPE plugin
Posted: Fri Jul 18, 2014 6:14 am
by kgopiramesh
Hi Technick,
Thank you so much for the detailed explanation, but when I ran the below steps the out put is continuously CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages. even from CLI
Then I changed the service again to configure under xinetd now atleast we are receiving the output from CLI
we are using NRPE version 2.8, os version Red Hat Enterprise Linux Server release 5.8 (Tikanga). Please find the below for the logs from the server.
Jul 18 10:53:22 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=9589 duration=0(sec)
Jul 18 10:56:34 nagios,com xinetd[5870]: START: nrpe pid=11343 from=172.25.25.5
Jul 18 10:56:34 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=11343 duration=0(sec)
Jul 18 10:58:22 nagios,com xinetd[5870]: START: nrpe pid=12325 from=172.25.25.5
Jul 18 10:58:22 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=12325 duration=0(sec)
Jul 18 11:00:35 nagios,com kernel: Redirect from 172.25.25.7 on bond0.395 about 172.25.25.61 ignored.
Jul 18 11:00:35 nagios,com kernel: Advised path = 172.25.25.39 -> 172.31.33.97
Jul 18 11:01:34 nagios,com xinetd[5870]: START: nrpe pid=14030 from=172.25.25.5
Jul 18 11:01:34 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=14030 duration=0(sec)
Jul 18 11:03:22 nagios,com xinetd[5870]: START: nrpe pid=15012 from=172.25.25.5
Jul 18 11:03:22 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=15012 duration=0(sec)
Jul 18 11:06:34 nagios,com xinetd[5870]: START: nrpe pid=17016 from=172.25.25.5
Jul 18 11:06:34 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=17016 duration=0(sec)
Jul 18 11:08:22 nagios,com xinetd[5870]: START: nrpe pid=17999 from=172.25.25.6
Jul 18 11:08:22 nagios,com xinetd[17999]: FAIL: nrpe address from=172.25.25.6
Jul 18 11:08:22 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=17999 duration=0(sec)
Jul 18 11:11:34 nagios,com xinetd[5870]: START: nrpe pid=19684 from=172.25.25.5
Jul 18 11:11:34 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=19684 duration=0(sec)
Jul 18 11:12:43 nagios,com xinetd[5870]: START: nrpe pid=20345 from=172.25.25.5
Jul 18 11:12:43 nagios,com xinetd[5870]: EXIT: nrpe status=0 pid=20345 duration=0(sec)
we are not passing any arguments to the script, would that be fine or is it mandate that we need to supply the arguments.
We want to disable the recheck attempts, I have done in nagios ccm but if we don't specify, it is taking at least 3 times. Please let me know how I can do the same.
Re: Issue while executing the NRPE plugin
Posted: Fri Jul 18, 2014 11:56 am
by abrist
First, nrpe 2.0.8 is very old. Like 8 years old. I suggest upgrading to 2.1.4.
The log you posted looks good. Can you run a successful check
from the nagios server to the remote host from the cli?
Code: Select all
./check_nrpe -H <remote host ip> -p 5666
Re: Issue while executing the NRPE plugin
Posted: Mon Jul 21, 2014 4:47 am
by kgopiramesh
Hi Abrist,
Please find the below for the output for the command.
./check_nrpe -H nagios.com -n -p 5666
NRPE v2.8
I have tried to upgrade the agent to 2.13 which is on the nagios server, but left with the below error when I ran ./configure
checking for SSL headers... configure: error: Cannot find ssl headers.
Please let us know how we can overcome this error.
Red Hat Enterprise Linux Server release 5.8 (Tikanga) - server version.
Re: Issue while executing the NRPE plugin
Posted: Mon Jul 21, 2014 4:43 pm
by abrist
kgopiramesh wrote:./check_nrpe -H nagios.com -n -p 5666
NRPE v2.8
Well, the check works against a host known to have nrpe configured correctly.
kgopiramesh wrote:I have tried to upgrade the agent to 2.13 which is on the nagios server, but left with the below error when I ran ./configure
checking for SSL headers... configure: error: Cannot find ssl headers.
This error is due to missing the development headers for openssl. You need to install the headers. To do so on rhel/centos, run:
And then rerun the ./configure script.