Unable to get check_procs to run via check_ncpa.py
Posted: Tue Apr 29, 2014 2:12 pm
Trying to get check_procs plugin to monitor a remote system that is running ncpa_listener, but can't seem to get the command to fire correctly. From the ncpa_listener.log DEBUG, it seems to pre-pend a u' to the command line and I can't figure out why it is doing that. Can anyone see the error of my ways?
example of ncpa_listener.log error
2014-04-29 13:51:51,184 16251 DEBUG Running process with command line: [u'"/usr/local/nagios/libexec/check_procs"']
define service{
use linux-service
host devut514
check_command check_procs!$HOSTNAME$
service_description check_linux_procs
}
define command{
command_name check_procs
command_line $USER1$/check_ncpa.py -H $ARG1$ -t SecretStuff -M agent/plugin/check_procs
}
ncpa_listener.log
2014-04-29 13:51:51,184 16251 DEBUG Running process with command line: [u'"/usr/local/nagios/libexec/check_procs"']
2014-04-29 13:51:51,194 16251 ERROR [Errno 2] No such file or directory
Traceback (most recent call last):
File "/tmp/ncpa/agent/listener/server.py", line 210, in plugin_api
File "/tmp/ncpa/agent/listener/pluginapi.py", line 209, in execute_plugin
File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
if p2cwrite is not None:
File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
# This method is called (indirectly) by __del__, so it cannot
OSError: [Errno 2] No such file or directory
2014-04-29 13:51:51,198 16251 INFO 10.204.240.28 - - [29/Apr/2014 13:51:51] "GET /api/agent/plugin/check_procs/?token=SecretStuff&check=1 HTTP/1.0" 302 -
2014-04-29 13:51:51,211 16251 INFO 10.204.240.28 - - [29/Apr/2014 13:51:51] "GET /error/Error%20running%20plugin. HTTP/1.0" 200 –
Running check_procs on the remote system
[nagios@devut514 ~]$ /usr/local/nagios/libexec/check_procs
PROCS OK: 130 processes | procs=130;;;0;
example of ncpa_listener.log error
2014-04-29 13:51:51,184 16251 DEBUG Running process with command line: [u'"/usr/local/nagios/libexec/check_procs"']
define service{
use linux-service
host devut514
check_command check_procs!$HOSTNAME$
service_description check_linux_procs
}
define command{
command_name check_procs
command_line $USER1$/check_ncpa.py -H $ARG1$ -t SecretStuff -M agent/plugin/check_procs
}
ncpa_listener.log
2014-04-29 13:51:51,184 16251 DEBUG Running process with command line: [u'"/usr/local/nagios/libexec/check_procs"']
2014-04-29 13:51:51,194 16251 ERROR [Errno 2] No such file or directory
Traceback (most recent call last):
File "/tmp/ncpa/agent/listener/server.py", line 210, in plugin_api
File "/tmp/ncpa/agent/listener/pluginapi.py", line 209, in execute_plugin
File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
if p2cwrite is not None:
File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
# This method is called (indirectly) by __del__, so it cannot
OSError: [Errno 2] No such file or directory
2014-04-29 13:51:51,198 16251 INFO 10.204.240.28 - - [29/Apr/2014 13:51:51] "GET /api/agent/plugin/check_procs/?token=SecretStuff&check=1 HTTP/1.0" 302 -
2014-04-29 13:51:51,211 16251 INFO 10.204.240.28 - - [29/Apr/2014 13:51:51] "GET /error/Error%20running%20plugin. HTTP/1.0" 200 –
Running check_procs on the remote system
[nagios@devut514 ~]$ /usr/local/nagios/libexec/check_procs
PROCS OK: 130 processes | procs=130;;;0;