Mathieu,

I did what you said and still have the same error. 

*I put the script into /etc/nagios and change owner permissions to
nagios

%/etc/nagios$ sudo chown nagios:nagios report_loadscript_error_log.py 

*verified permissions

%/etc/nagios$ ls -la report_loadscript_error_log.py 

-rwxr-xr-x 1 nagios nagios 3156 2008-11-03 18:25
report_loadscript_error_log.py

*changed the path in the command.
command[loadscript_check_error_log]=/usr/bin/sudo /usr/local/bin/python 
/etc/nagios/report_loadscript_error_log.py

*restarted
sudo /etc/init.d/nagios-nrpe-server restart

*ran the check_nrpe command from the server

%/usr/lib/nagios/plugins/check_nrpe -H 10.10.10.45 -c
loadscript_check_error_log

NRPE: Unable to read output

Thoughts?

JJ


On Fri, 2008-10-31 at 15:17 -0800, Mathieu Gagné wrote:
> Hi,
> 
> jeremiah wrote:
> >
> > I check the log file and this is all i'm seeing pertaining to this
> > command on the server.
> >
> > Oct 31 22:33:23 serv1 nagios2: SERVICE ALERT: serv2;LOADSCRIPT CHECK
> > ERRORS;WARNING;HARD;3;NRPE: Unable to read output
> > Oct 31 22:33:23 serv1 nagios2: SERVICE NOTIFICATION:
> > root;serv2;LOADSCRIPT CHECK ERRORS;WARNING;notify-by-email;NRPE:
> Unable
> > to read output
> >
> 
> I successfully reproduced your issue by trying to execute a plugin
> located inside /root through NRPE, location which is obviously chmod
> to 700:
> 
> nagios3:~# stat --format="%a %U:%G" /root
> 700 root:root
> nagios3:~# stat --format="%a %U:%G" /root/check_users
> 755 root:root
> 
> command[check_root]=/root/check_users -w 5 -c 10
> 
> /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_root
> NRPE: Unable to read output
> 
> You have to move your plugin outside your home directory like I
> explained previously otherwise NRPE won't be able to access/execute it
> due to chmod restriction.
> 
> --
> Mathieu
> 
> 
> 


Disclaimer: The information contained in this transmission, including any 
attachments, may contain confidential information of Panasonic Avionics
Corporation.  This transmission is intended only for the use of the 
addressee(s) listed above.  Unauthorized review, dissemination or other use 
of the information contained in this transmission is strictly prohibited. 
If you have received this transmission in error or have reason to believe 
you are not authorized to receive it, please notify the sender by return 
email and promptly delete the transmission.



-------------------------------------------------------------------------
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@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

Reply via email to