puzzling no output from nrpe run of check_load

Alex Griffin agriffin at nagios.com
Wed Apr 25 18:09:39 CEST 2012


Does the nagios user have read access to /proc/loadavg?

Alex Griffin
---
Tech Team
agriffin at nagios.com

Peter N. Steinmetz wrote:
> Hi, hoping someone may be able to help with this odd problem running check_load on a remote nrpe server.
>
> I am running a nagios3 server on ubuntu 10.04 server (nagios3 3.2.0-4ubuntu2.2) and a nrpe server on ubuntu 10.10 (nagios-nrpe-server 2.12-4ubuntu1.10.10.1, nagios-plugins  1.4.14-5ubuntu3)
>
> Have these both basically up and running, and the server is able to run a check_disk command on the npre server and receives results.
>
> For a check_load command, however, the status information is '(No output returned from plugin)'.
>
> I have looked extensively on the web for this, and it appears there are a number of reasons this may happen.
>
> On the server, if I run
> sudo su - nagios -c "/usr/lib/nagios/plugins/check_nrpe -H 10.41.129.36 -c check_load"
> there is nothing returned.
>
> If I change the user from nagios to peter, then I get the expected response.
>
> On the nrpe server, the same thing is happening. If I run
> sudo su - nagios -c "/usr/lib/nagios/plugins/check_load  -w 15,10,5 -c 30,25,20"
> there is nothing returned. If I change the user to peter it returns the expected output.
>
> I've tried making the plugins all owned by nagios:nagios, that doesn't help. I've tried adding a line for nagios to sudoers file and then adding the sudo command prefix, that doesn't fix it when invoking the command on the nagios server. I've also tried adding the nagios user to the admin group and that doesn't help.
>
> I've enabled the debugging on the nrpe server, and for the command from the nagios server, I see the connection and request in syslog when the user is peter, but no such request when the user is nagios. Neither of the local commands generate any syslog output.
>
> It is difficult to understand why this command, check_load, on the nrpe server is returning output for users 'peter' and 'root' but not for user 'nagios' when 'nagios' owns the executable.
>
> When I check executing the check_disk command locally on the nrpe server with
> sudo su - nagios -c "/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda1"
> it works and returns a report.
>
> Curiously, if I change the nagios user to have a login shell, such as /bin/bash, on the nrpe server, then the check_load command is returning output, though still doesn't work from the nagios server. In neither case, however, does the nagios user have a password.
>
> Both the check_load and check_disk plugins are owned by nagios:nagios and have -rwxr-xr-x permissions, so what is the difference?
>
> Any suggestions appreciated.
>
> cheers,
> Peter

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list