Non obvious 127 plugin error

Craig Stewart Craig.Stewart at corp.xplornet.com
Wed Jun 1 20:50:18 CEST 2011


Giorgio,

Here's the final command:

[1306952706.565337] [2048.1] [pid=3753]   Done.  Final output:
'/usr/lib/nagios/plugins/check_dig -H 72.45.111.250 -l www.xplornet.com
-a 142.166.86.46 -w 0.5 -c 1 -t 5'

I assume that's what you meant?

I'm also seeing this in the debug log:

[1306952721.202757] [016.1] [pid=3753] HOST: TS-WIN-DNS-1, SERVICE:
DNS-Check, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE:
Yes, EXITED OK: Yes, RETURN CODE: 127, OUTPUT: (null)



Craig Stewart
Systems Integration Analyst
Craig.Stewart at corp.xplornet.com
Xplornet - Broadband, Everywhere

On 06/01/2011 02:20 PM, Giorgio Zarrelli wrote:
> Please,
> 
> Switch on debug and paste here the "final command"
> 
> Ciao,
> 
> Giorgio
> 
> Il giorno 01/giu/2011, alle ore 16:47, Craig Stewart
> <Craig.Stewart at corp.xplornet.com> ha scritto:
> 
>> Good day folks,
>>
>> I've spent the better part of a week using Google and combing forums for
>> an answer to this question without much luck.  First the specs:
>>
>> Nagios version 3.2.3
>> Nagios and associated plugins installed on CentOS 5.6 and Fedora 15
>> servers via package management (i.e. yum)
>>
>> I have a couple plugins that simply won't execute.  One of which is the
>> check_dig command.  I'll use this for an example.
>>
>>> From the commands.cfg file for Nagios:
>>
>> define command{
>>    command_name    check_dns
>>    command_line    /usr/lib/nagios/plugins/check_dig -H $HOSTADDRESS$ -l
>> $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -t $ARG5$
>>    }
>>
>>> From the Nagios log file:
>>
>> [1306863226] Warning: Return code of 127 for check of service
>> 'DNS-Check' on host 'TS-TOR-DNS-1' was out of bounds. Make sure the
>> plugin you're trying to run actually exists.
>>
>>
>> Okay, first to see if it exists:
>>
>> [root at nms ~]# locate check_dig
>> /usr/lib/nagios/plugins/check_dig
>> [root at nms ~]#
>>
>> Ownership and permissions check:
>>
>> [root at nms ~]# ls -l /usr/lib/nagios/plugins/check_dig
>> -rwxr-xr-x. 1 nagios nagios 43292 Mar 23 15:42
>> /usr/lib/nagios/plugins/check_dig
>> [root at nms ~]#
>>
>> Try running it as root:
>> [root at nms ~]# /usr/lib/nagios/plugins/check_dig *BLANKED* -l *BLANKED*
>> -a *BLANKED* -c 5 -w 0.25
>> DNS OK - 0.005 seconds response time (*BLANKED*. 900 IN A
>> *BLANKED*)|time=0.004967s;0.250000;5.000000;0.000000
>>
>> So it works as root.  Now to try as Nagios user:
>> [root at nms ~]# su - nagios
>> -bash-4.2$ /usr/lib/nagios/plugins/check_dig *BLANKED* -l *BLANKED* -a
>> *BLANKED* -c 5 -w 0.25
>> DNS OK - 0.005 seconds response time (*BLANKED*. 900 IN A
>> *BLANKED*)|time=0.004967s;0.250000;5.000000;0.000000
>>
>> It works as the Nagios user as well.
>>
>> So, I'm sure you can see my confusion.  The plugin exists and is
>> executable for a user on the system, but even when called directly as
>> opposed to using the $USER1$ macro, the Nagios process can't run it.
>>
>> Any thoughts anyone?
>>
>> Cheers!
>>
>> Craig
>>
>> --
>> Craig Stewart
>> Systems Integration Analyst
>> Craig.Stewart at corp.xplornet.com
>> Xplornet - Broadband, Everywhere
>>
>>
> ------------------------------------------------------------------------------
>> Simplify data backup and recovery for your virtual environment with
> vRanger.
>> Installation's a snap, and flexible recovery options mean your data is
> safe,
>> secure and there when you need it. Data protection magic?
>> Nope - It's vRanger. Get your free trial download today.
>> http://p.sf.net/sfu/quest-sfdev2dev
>> _______________________________________________
>> 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
> 
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> 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
> 
> --
> This message has been scanned by MailScanner
> 

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
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