Page 1 of 1

NRPE Configuration

Posted: Wed May 09, 2012 7:33 am
by iwtusa
So I'm configuring Nagios to monitor remote servers. I have set up a Nagios monitoring device using Ubuntu 12.04 and it will be monitoring a server with Xubuntu 10.04.

I installed Nagios on the monitoring server and it is monitoring local host. It can also ping the Xubuntu box. My company has a wide variety of applications running on the box that we need to monitor. I pasted the commands that the previous engineer had written into /etc/nagios/nrpe.cfg on the Xubuntu box. But Nagios is saying that (No output returned from plugin).

How do I configure the custom commands on the Xubuntu box?

I've noticed that there are multiple file locations:

For instance there is /usr/local/nagios/plugins
/etc/nagios/
/etc/nagios-plugins

How do all of these relate to each other?

Any help would be greatly appreciated.

Re: NRPE Configuration

Posted: Wed May 09, 2012 4:46 pm
by lmiltchev
Are your commands defined properly in "/etc/nagios/nrpe.cfg"? On my Ubuntu box, nagios plugins are located in "/usr/lib/nagios/plugins", not in "/usr/local/nagios/plugins". It's probably the same with Xubuntu.
Did you eliminate any firewall issues?
What do you get when you run the following command on the client machine?

Code: Select all

netstat -lpn | grep 5666
What about the output of the following command, run from the plugins directory on the nagios server?

Code: Select all

./check_nrpe -H <client_IP>

Re: NRPE Configuration

Posted: Thu May 10, 2012 12:25 pm
by iwtusa
Remote Client


netstat -lpn |grep 5666
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN -

Server Machine

capc@cvg00-mon-02:~$ ./check_nrpe -H 192.168.1.205
-bash: ./check_nrpe: No such file or directory
capc@cvg00-mon-02:~$ /usr/local/nagios/plugins/check_nrpe -H 192.168.1.205
-bash: /usr/local/nagios/plugins/check_nrpe: No such file or directory
capc@cvg00-mon-02:~$ /usr/local/nagios/plugins/check_nrpe -H [email protected]
-bash: /usr/local/nagios/plugins/check_nrpe: No such file or directory
capc@cvg00-mon-02:~$

Re: NRPE Configuration

Posted: Thu May 10, 2012 12:32 pm
by iwtusa
Server nagios.cfg file:


# Debian also defaults to using the check commands defined by the debian
# nagios-plugins package
cfg_dir=/etc/nagios-plugins/config

Re: NRPE Configuration

Posted: Thu May 10, 2012 4:51 pm
by lmiltchev
Try running:

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H 192.168.1.205
If you get:

Code: Select all

-bash: ./check_nrpe: No such file or directory
run:

Code: Select all

locate check_nrpe