NRPE Configuration

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
iwtusa
Posts: 4
Joined: Mon Apr 16, 2012 7:31 am

NRPE Configuration

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE Configuration

Post 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>
Be sure to check out our Knowledgebase for helpful articles and solutions!
iwtusa
Posts: 4
Joined: Mon Apr 16, 2012 7:31 am

Re: NRPE Configuration

Post 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:~$
iwtusa
Posts: 4
Joined: Mon Apr 16, 2012 7:31 am

Re: NRPE Configuration

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE Configuration

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked