> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:nagios-users-
> [EMAIL PROTECTED] On Behalf Of De Wetenschapper
> Sent: Friday, May 11, 2007 10:19 AM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] Strange Return code Error
> 
> <mailto:nagios-users@lists.sourceforge.net> Hi Guys,
> 
> I just installed & configured nagios on a RHEL4 U4 64bit
2.6.9-34.ELsmp
> [EMAIL PROTECTED] dist]# rpm -qa | grep nagios
> nagios-2.9-1.el4.rf
> nagios-plugins-1.4.8-2.el4.rf
> nagios-plugins-nrpe-2.5.2-1.el4.rf
> nagios-nrpe-2.5.2-1.el4.rf
> 
> And I get a "Return code of 127 for check of service 'n-users' on host
> 'fisdb01' was out of bounds" Message on all services on all hosts.
> I saw on http://www.nagios.org/faqs/viewfaq.php?faq_id=17 that this
was
> most likely a problem with the path to the executable.
> but if that was so I wouldn't be able to do this:
> [EMAIL PROTECTED] services]# /usr/lib64/nagios/plugins/check_nrpe -H
localhost
> -c check_users
> USERS OK - 3 users currently logged in |users=3;5;10;0
> which proves it executes and in the right place. Right?

Not at all. It just means that root can run a program successfully when
called directly. The question you should be asking is does the command{}
definition for this plugin use that full path? The default configs
typically use the $USER1$ macro for the path which must be properly set
in resource.cfg. Is $USER1$ pointing to the correct path? Is
resource.cfg being loaded by nagios?

Also, as pointed out previously, the plugins are never run as the root
user, always the nagios user. While it's not likely in this case, the
nagios user certainly isn't guaranteed the same access privileges as the
root user. You should always perform plugin tests as the nagios user.

--
Marc

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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