Page 5 of 6
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 1:37 pm
by brianweeks22
FROM NAGIOS SERVER
[root@rodan2 nagios]# /usr/lib/nagios/plugins/check_nrpe -H <IP ADDRESS> -n
CHECK_NRPE: Error receiving data from daemon.
[root@rodan2 nagios]#
FROM CLIENT:
[root@XenHost8 nagios]# service nrpe status
nrpe (pid 19126) is running...
[root@XenHost8 nagios]# service xinetd status
xinetd: unrecognized service
[root@XenHost8 nagios]#
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 1:47 pm
by abrist
Alright ssl is most definitely working. (you can remove the "-n" from your nrpe checks)
Edit the nrpe.cfg file on the remote host and look for the line: allowed_hosts=127.0.0.1 You will need to add the ip address of your Nagios server to this line (it is comma-separated).
Code: Select all
nano /usr/local/nagios/etc/nrpe.cfg
(Your nrpe.cfg file may be located somewhere else. If you do not have one, you should find the sample-config in the nrpe source directory.)
Change:
To:
Code: Select all
allowed_hosts=127.0.0.1,<nagios server ip>
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 2:04 pm
by brianweeks22
I already had that completed..
(0.0.0.0=nagios server)
allowed_hosts=127.0.0.1,0.0.0.0
do i need to put spaces after the comma?
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 3:02 pm
by abrist
No, it just needs to have unix line endings. Have you built the nagios-plugins on the remote system yet? I ask because we can use the "check_nrpe" plugin to troubleshoot further on the remote host by running it locally to see if it can connect to itself. If the architecture is the same, you could just copy over the "check_nrpe" binary from the nagios server to plugins directory on the remote host and then run the following on the remote host:
Code: Select all
/path/to/plugins/check_nrpe -H 127.0.0.1
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 3:08 pm
by brianweeks22
[root@XenHost8 plugins]# /usr/lib/nagios/plugins/check_load -H 127.0.0.1
/usr/lib/nagios/plugins/check_load: invalid option -- 'H'
Usage:
check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 3:11 pm
by abrist
Check load will run locally. We want to connect to the nrpe daemon on the remote host from the remote host. You will have to use check_nrpe to do this.
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 3:16 pm
by brianweeks22
[root@xenhost7 libexec]# find / -name check_nrpe
returned nothing
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 3:25 pm
by abrist
Yeah, you will either need to build the nagios-plugins package on the remote host, or copy the check_nrpe binary from the nagios server to the remote host's plugin directory (only if the archs are the same).
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 3:36 pm
by brianweeks22
attached is from a working server.. under the plugins, there is no check_nrpe
i also attached a screenshot of the services running on that server..
/usr/lib/nagios/plugins is where I located the plugins..
under /usr/local/nagios/libexec i also attached a screenshot of that as well..
Re: Nagios on XenServer 5.5
Posted: Tue Mar 12, 2013 3:40 pm
by abrist
I understand that your other servers do not have the check_nrpe plugin as it is the checking binary and usually only on the nagios server. I just wanted to try to connect locally (from check_nrpe to the nrpe server on the same box) to further drill down the issue.