Code: Select all
./check_ncpa.py -H kchenowe-ubuntu.dhcp.mathworks.com -t mytoken -M cpu/percent
OK: Percent was 3.0%,1.0%|'percent_0'=3.0% 'percent_1'=1.0%Code: Select all
./check_ncpa.py -H kchenowe-ubuntu.dhcp.mathworks.com -t mytoken -M agent/plugin/random.pl -a "-a kendall -w 2 -c 7"Code: Select all
./random.pl -a kendall -w 2 -c 7
RANDOM OK - whatever r=1.57083422717736 a=kendall value | random=1.57083422717736;2;7sum check_ncpa.py
19991 5
This is the error in the ncpa_listener.log
Code: Select all
2014-07-21 21:03:46,321 3196 INFO 172.29.233.30 - - [21/Jul/2014 21:03:46] "GET /api/agent/plugin/random.pl?token=mytoken&check=1&arguments=-a+kendall+-w+2+-c+7 HTTP/1.0" 301 -
2014-07-21 21:03:46,335 3196 ERROR [Errno 2] No such file or directory
Traceback (most recent call last):
File "/build/ncpa/agent/listener/server.py", line 210, in plugin_api
File "/build/ncpa/agent/listener/pluginapi.py", line 222, in execute_plugin
File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
OSError: [Errno 2] No such file or directory
2014-07-21 21:03:46,339 3196 INFO 172.29.233.30 - - [21/Jul/2014 21:03:46] "GET /api/agent/plugin/random.pl/?token=mytoken&check=1&arguments=-a+kendall+-w+2+-c+7 HTTP/1.0" 302 -
2014-07-21 21:03:46,348 3196 INFO 172.29.233.30 - - [21/Jul/2014 21:03:46] "GET /error/Error%20running%20plugin. HTTP/1.0" 200 -This is the output in the log for the cpu percent check.
Code: Select all
2014-07-21 21:04:41,408 3196 INFO 172.29.233.30 - - [21/Jul/2014 21:04:41] "GET /api/cpu/percent?token=mytoken&check=1 HTTP/1.0" 200 -The ncpa.cfg plugin path is correct. The tokens match.
Code: Select all
[plugin directives]
plugin_path = plugins/Code: Select all
/usr/local/ncpa/plugins# ls
check_ncpa.py check_ncpa.py.new random random.pl utils.pm utils.shThanks!