nrpe on linux - debugging new install

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

nrpe on linux - debugging new install

Post by lyle »

I used the "Installing the Linux Agent" doc (Rev 1.1 - March 2011) to install NRPE on a 32-bit Centos 5.3 client system. No changes from the default install, other than specifying the address of the Nagios Core 3.0.3 server.

I added a couple of plugins to the libexec on the client, added the checks to the nrpe.cfg, then restarted xinetd. Is that the right way to do it? There's no /etc/init.d/nrpe to restart, so I figure restarting xinetd is required to pick up the new nrpe.cfg.

In any case, a check_nrpe from the Nagios server returns the client's nrpe version fine. But a check_nrpe, specifying any of the plugin checks just gives back "NRPE: Unable to read output".

I'm attaching the logfile of the install. What should I check next?

Thanks...Lyle
You do not have the required permissions to view the files attached to this post.
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

Re: nrpe on linux - debugging new install

Post by lyle »

Some more info:

Plugins on the client work fine when run interactively.

I raised the debug level in nrpe.conf to 1, but I don't see any increase in logging information on the client.

So I'm back to my first question: what causes nrpe.conf to be re-read when running under xinetd? I get the same result on the Nagios Core server and in the client logfile when I do a check_nrpe specifying one of my plugins as when I specify a non-existant one.

It's acting like the changes to nrpe.conf (new plugin entries, and debug=1) aren't being seen, even after a "/etc/init.d/xinetd restart"

Thanks....Lyle
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: nrpe on linux - debugging new install

Post by tonyyarusso »

xinetd will actually re-read the config every time you run a check, so that would pick up changes. However, it's possible that you're not running under xinetd, even if the files are present to allow that. Try checking your process list to see if any instances of the nrpe daemon are lurking about.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

Re: nrpe on linux - debugging new install

Post by lyle »

Good idea, but no nrpe process running.

Running a simple check_nrpe test on the server, with the client's xinetd stopped, returns "Connection refused". Restarting the client's xinetd and repeating the test, returns the NRPE version info.

Thanks....Lyle
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: nrpe on linux - debugging new install

Post by tonyyarusso »

Could you provide your log output from xinetd?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

Re: nrpe on linux - debugging new install

Post by lyle »

I sent you a Private Message, Tony, with the logfile info.

Thanks...Lyle
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: nrpe on linux - debugging new install

Post by tonyyarusso »

Does the file /usr/local/nagios/libexec/nagios-plugins/check_cpu_stats.sh exist? That seems like sort of a strange path for it. Additionally, are there any files in /usr/local/nagios/etc/nrpe?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
lyle
Posts: 158
Joined: Sun Nov 21, 2010 3:05 am

Re: nrpe on linux - debugging new install

Post by lyle »

How embarrassing. That was my typo in nrpe.cfg. :oops: I copied the Command Definitions from nrpe.cfg on a Solaris system, where they were located in /opt/csw/libexec/nagios-plugins (from the install of a pre-compiled Solaris package), but I was moving a little too fast when editing those lines on this new client.

Everything works. :D

Never noticed /usr/local/nagios/etc/nrpe/ (which only contains asterisk.cfg and common.cfg), but I see that it's clearly spelled out in nrpe.cfg

I'm still a surprised that "debug=1" doesn't seem to make a difference in the volume of logging to /var/log/messages. Any ideas? Otherwise, this call can be closed.

Thanks, as always for the help.....Lyle
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: nrpe on linux - debugging new install

Post by tonyyarusso »

Yeah, the debug parameter drove me a bit batty a few months ago too. No idea there. Glad we got things sorted.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
Locked