[email protected] wrote: > > > I'm having problem with NRPE parameters while testing a new Nagios > installation. > > Header Node is running RHEL AS4 U6, and Nagios v3.2.0 > > Client is running RHEL AS4 U4, and NRPE v2.12 (compiled with command > arguments, and with dont_blame_nrpe=1) > > Standard hardcoded nrpe disk checks work fine, for example; > > Service definition on Header Node - > > check_nrpe!check_home > > Relates to the following in nrpe.cfg on the Client - > > command[check_home]=/usr/local/nagios/libexec/check_disk -w > 20% -c 10% -p /home > > and returns - > > DISK OK - free space: /home 1878 MB (98% inode=99%);| > /home=34MB;1612;1813;0;2015 > > Using variables, I can get the correct results from the command line; > > Service definition on Header Node - > > check_nrpe!check_adisk!20%!10%!/opt > > Relates to the following in nrpe.cfg on the Client - > > command[check_adisk]=/usr/local/nagios/libexec/check_disk -w > $ARG1$ -c $ARG2$ -p $ARG3$ > > and I can enter this on the Header Node - > > #../../libexec/check_nrpe -H <client> -c check_adisk -a 20 10 > /opt > DISK OK - free space: /opt 432 MB (45% inode=97%);| > /opt=524MB;987;997;0;1007 > > However, this does not work within Nagios GUI, all the parameters > passed are blank. I see this in syslog on the Client - > > Added > command[check_adisk]=/usr/local/nagios/libexec/check_disk-w $ARG1$ -c > $ARG2$ -p $ARG3$ > Handling the connection... > Host is asking for command \'check_adisk\' to be run... > >>>>>Running command: /usr/local/nagios/libexec/check_disk -w > -c -p > Command completed with return code 3 and output: Unknown > argument Usage: check_disk -w limit -c limit [-W limit] [-K limit] {-p > path | -x device} [-C] [-E] [-e] [-g group ] [-k] [-l] [-M] [-m] [-R > path ] [-r path ] [-t timeout] [-u unit] [-v] [-X type] > Return Code: 3, Output: Unknown argument Usage: check_disk -w > limit -c limit [-W limit] [-K limit] {-p path | -x device} [-C] [-E] > [-e] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ] [-t > timeout] [-u unit] [-v] [-X type] > > I'm conscious that I'm probably doing something very trivial wrong, > but can't get my head around why this should work on the command line, > and not via the GUI. > > Any help much appreciated. > > Regards > Nigel > > Nigel Leach > Grid Engineer | Front Office Risk Systems | BNP Paribas > ______________________________________________ > I'd recommend to enable the nagios debug log and see how nagios is extrapolating the command for execution .
Once you do that and see how it is sent you can make sure to fix the command/service to provide the required results. the debug file definitions are at the bottom of the nagios.cfg file. Assaf ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ 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
