Matin, Not quite sure what you mean. As far as I know I don't have a password variable in my command definition.
Craig -- Craig Stewart Systems Integration Analyst [email protected] Tel: (506) 328-1245 Cell: (506) 425-0111 Xplornet - Broadband, Everywhere On 06/01/2011 02:11 PM, Martin Hugo wrote: > Hi Craig, > > Not sure if it will help you but when I had a check reporting a similar > plug-in error that ran just fine from the terminal I removed the > password variable from the comd def and hard-coded the pwd in there > instead. Worked for me. > > Martin T. Hugo > Network Administrator > Hilliard City Schools > 614-921-7102 (Ph) > 614-771-7243 (Fax) > > -----Original Message----- > From: Craig Stewart [mailto:[email protected] > <mailto:[email protected]>] > Sent: Wednesday, June 01, 2011 10:48 AM > To: [email protected] > Subject: [Nagios-users] Non obvious 127 plugin error > > 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@nms ~]# locate check_dig > /usr/lib/nagios/plugins/check_dig > [root@nms ~]# > > Ownership and permissions check: > > [root@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@nms ~]# > > Try running it as root: > [root@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@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 > [email protected] > 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 > [email protected] > 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 > [email protected] > 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 [email protected] 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
