Page 1 of 1
nrpe on linux - debugging new install
Posted: Wed Jun 01, 2011 6:35 pm
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
Re: nrpe on linux - debugging new install
Posted: Thu Jun 02, 2011 9:24 am
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
Re: nrpe on linux - debugging new install
Posted: Thu Jun 02, 2011 9:36 am
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.
Re: nrpe on linux - debugging new install
Posted: Thu Jun 02, 2011 10:44 am
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
Re: nrpe on linux - debugging new install
Posted: Thu Jun 02, 2011 10:49 am
by tonyyarusso
Could you provide your log output from xinetd?
Re: nrpe on linux - debugging new install
Posted: Thu Jun 02, 2011 12:14 pm
by lyle
I sent you a Private Message, Tony, with the logfile info.
Thanks...Lyle
Re: nrpe on linux - debugging new install
Posted: Thu Jun 02, 2011 12:51 pm
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?
Re: nrpe on linux - debugging new install
Posted: Thu Jun 02, 2011 1:24 pm
by lyle
How embarrassing. That was my typo in nrpe.cfg.

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.
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
Re: nrpe on linux - debugging new install
Posted: Thu Jun 02, 2011 1:34 pm
by tonyyarusso
Yeah, the debug parameter drove me a bit batty a few months ago too. No idea there. Glad we got things sorted.