NRPE: Unable to read output

kyle.odonnell at gmail.com kyle.odonnell at gmail.com
Tue Aug 12 18:25:45 CEST 2008


executing check_nrpe via sudo will not accomplish what you want.  You
will need to either modify the nrpe.cfg to execute commands via sudo,
or write a wrapper for check_smartmon.  I am not familiar with that
plugin, but you may also be able to edit it and prepend /path/to/sudo
before it execs smartctl.



On 8/12/08, Jake Solid <richardsolid at gmail.com> wrote:
> I'm trying to use check_nrpe with check_smartmon but I'm getting NRPE:
> Unable to read output at the Nagios Server. *All other check plugins like
> check_load and check_procs work fine.
> *
> *I'm running the following command from my nagios server to the remote host:
> *
> *./check_nrpe -H remotehost.domain.com -c check_smartmon*
>
> *and the out put is the following:*
> *NRPE: Unable to read output*
>
> *This is what the remote host logs display:*
> *Aug 12 11:16:13 *remotehost* xinetd[7151]: START: nrpe pid=7986 from=
> 198.162.1.1 <- Nagios Server IP Address
> Aug 12 11:16:13 *remotehost* nrpe[7986]: INFO: SSL/TLS initialized. All
> network traffic will be encrypted.
> Aug 12 11:16:13 *remotehost* xinetd[7151]: EXIT: nrpe status=0 pid=7986
> duration=0(sec)*
>
>
> *When I use the check_smartmon directly in the remote machine as the user
> nagios and using sudo it works fine:*
> [nagios at remotehost plugins]$  sudo /usr/lib64/nagios/plugins/check_smartmon
> ata -d /dev/sda
> OK: device is functional and stable (temperature: 33)
>
> *If I change the only_from line on  /etc/xinetd.d/nrpe file to 127.0.0.1 and
> I run the following from the remote host I get prompted by a password:*
> *[nagios at remotehost plugins]$ sudo /usr/lib64/nagios/plugins/check_nrpe -h
> remotehost.domain.com.latpro.com -c check_smartmon
> Password:
> *
> *The permissions on the device are the following:*
> *[nagios at remotehost plugins]$ ls -lah /dev/sda
> brw-rw---- 1 root disk 8, 0 Jan  8  2008 /dev/sda*
>
> *The disk group also has nagios:*
> disk:x:6:root,nagios
>
>
> *And again the other plugins work fine when they are invoked from the Nagios
> server. Like the following:*
> [nagios at nagios-server plugins]$ ./check_nrpe -H remotehost.domain.com -c
> check_load
> OK - load average: 2.14, 2.44, 2.72|load1=2.140;15.000;30.000;0;
> load5=2.440;10.000;25.000;0; load15=2.720;5.000;20.000;0;
>
> *I added the following line on my remotehost to the /etc/sudoers:*
> nagios    ALL=(ALL) NOPASSWD:
> /usr/sbin/smartctl,/usr/lib64/nagios/plugins/check_nrpe,/usr/lib64/nagios/plugins/check_smartmon
>
> I also try running the NRPE as adeamon and not with xinetd and I had the
> same issue.
>
> Any inputs?
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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