Please, Switch on debug and paste here the "final command"
Ciao, Giorgio Il giorno 01/giu/2011, alle ore 16:47, Craig Stewart <[email protected]> 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@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
