Hi Andy, 

Thanks for the email. I wish this would have worked! Here's what i
did...

-I added the sudo command in my nrpe.cfg file and ran it like you said.

command[loadscript_check_error_log]=/usr/bin/sudo /usr/local/bin/python 
/home/jesterj/report_loadscript_error_log.py

-Restarted the nrpe service.

$ /etc/init.d/nagios-nrpe-server restart
 * Stopping nagios-nrpe nagios-nrpe
[ OK ] 
 * Starting nagios-nrpe nagios-nrpe          

- Reran the check_nrpe command on the server:
/usr/lib/nagios/plugins/check_nrpe -H 10.10.10.45 -c
loadscript_check_error_log

NRPE: Unable to read output

- I then tried adding nagios to the /etc/group (admin group)
 on the client and running it again.

Still failed.

What a tedious problem.

JJ


On Fri, 2008-10-31 at 15:50 -0700, Andy Shellam wrote:
> Have you got sudo configured on your NRPE host?  I get this error on
> new
> servers when I forget to add the Nagios/NRPE user to /etc/sudoers and
> allow them access to run the plugins without needing a password.
> 
> Try running your command as the Nagios/NRPE user on your NRPE host
> like
> so (alter path to sudo as appropriate):
> 
> # /usr/bin/sudo /usr/local/bin/python
> /home/jesterj/report_loadscript_error_log.py
> 
> If this works, make sure that the path to your sudo executable is the
> absolute path in nrpe.cfg.
> 
> Andy.
> 
> jeremiah wrote:
> > I just pulled this error up in the manual and it sasy the following
> > about the error: "NRPE: Unable to read output"
> >
> > =====
> > This error indicates that the command that was run by the NRPE
> daemon
> > did not return any character output.
> > This could be an indication of the following problems:
> >    
> > -An incorrectly defined command line in the command definition.
> Verify
> > that the command definition in your NRPE configuration file is
> correct.
> >    
> > -The plugin that is specified in the command line is malfunctioning.
> Run
> > the command line manually to make sure the plugin returns some kind
> of
> > text output.""
> > =====
> >
> > I ran the command via the command prompt and works fine w/ returning
> > output.
> >
> > Hmmm.
> >
> >
> > On Fri, 2008-10-31 at 15:10 -0700, jeremiah wrote:
> >  
> >> I just chown'd the file for nagios.
> >>
> >> $ sudo chown nagios /home/jesterj/report_loadscript_error_log.py
> >>
> >> $ ls -la *.py
> >> -rwxr-xr-x 1 nagios jesterj 3156 2008-10-31 21:55
> >> report_loadscript_error_log.py
> >>
> >> I'm now getting a different error after i fixed the path issue.
> >>
> >> $ /usr/lib/nagios/plugins/check_nrpe -H 10.10.10.45 -c
> >> loadscript_check_error_log
> >> NRPE: Unable to read output
> >>
> >> Thoughts?
> >>
> >> thanks,
> >> JJ
> >>
> >>
> >>
> >> On Fri, 2008-10-31 at 15:01 -0700, Mathieu Gagné wrote:
> >>    
> >>> Hi,
> >>>
> >>> jeremiah wrote:
> >>>      
> >>>> When I typed python on the command line it drops my into the
> >>>>        
> >> python
> >>    
> >>>> interpreter.
> >>>>
> >>>> Regardless, I went ahead and specified it in the command:
> >>>>
> >>>>
> >>>>        
> >>
> command[loadscript_check_error_log]=/usr/local/bin/python 
> /home/jesterj/report_loadscript_error_log.py
> >>    
> >>>> now when i run the check_nrpe command from the server I get
> "could
> >>>>        
> >>> not
> >>>      
> >>>> run command".
> >>>>
> >>>> $ sudo /usr/lib/nagios/plugins/check_nrpe -H 10.10.10.45 -c
> >>>> loadscript_check_error_log
> >>>>
> >>>> Could not run command
> >>>>
> >>>> Thoughts?
> >>>>        
> >>> Can the user under which the NRPE daemon runs access and execute
> >>> /home/jesterj/report_loadscript_error_log.py ?
> >>>
> >>> --
> >>> 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
> >>
> >>
> >>    
> >
> >
> -------------------------------------------------------------------------
> > 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
> 
> 
> 

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