check_ncpa.py parsing -a argument
Posted: Thu Dec 05, 2013 9:38 am
I'm using Nagios XI 2012R2.5 on a Centos VM provided by Nagios and have created a NRDS config which passively runs a command on the client server.
The following command works from the command on the client directly.
This is the contents of the nrds.cfg file.
Here is the output when I manually run the command.
When this command is run with the check_ncpa.py plugin, my -a argument is ignored. I presume I'm doing something stupid, can you please help? Thanks!
-Kendall Chenoweth
The following command works from the command on the client directly.
Code: Select all
nagios@kchenowe-ubuntu:/usr/local/ncpa/plugins$ ./random.pl -w 5 -c 7 -a LOOK_AT_THIS
RANDOM CRITICAL - whatever r=8.78410694495873 a=LOOK_AT_THIS value | random=8.78410694495873;5;7Code: Select all
CONFIG_VERSION="3.4"
CONFIG_OS="Linux"
CONFIG_NAME="sample_config"
URL="http://172.28.154.55/nrdp/"
TOKEN="mytoken"
PLUGIN_DIR="/usr/local/ncpa/plugins"
SEND_NRDP="/usr/local/nrdp/clients/send_nrdp.sh"
TMPDIR="/usr/local/nrdp/clients/tmp"
COMMAND_PREFIX=""
LOG_FILE=""
UPDATE_CONFIG="1"
UPDATE_PLUGINS="1"
command[ncpa-random]=/usr/local/ncpa/plugins/check_ncpa.py -H `hostname -A` -t 'mytoken' -P 5693 -M 'agent/plugin/random.pl' -w 5 -c 7 -a LOOK_AT_THISCode: Select all
nagios@kchenowe-ubuntu:/usr/local/ncpa/plugins$ /usr/local/ncpa/plugins/check_ncpa.py -H `hostname -A` -t 'mytoken' -P 5693 -M 'agent/plugin/random.pl' -w 5 -c 7 -a LOOK_AT_THIS
RANDOM OK - whatever r=4.82139144166471 a= value | random=4.82139144166471;;-Kendall Chenoweth