check_procs on a particular python script
Robert Swerdlow
rswerdlow at emergentdiscovery.com
Tue Aug 3 23:22:04 CEST 2010
I'm trying to get Nagios to monitor whether a particular background
job is running on a particular server. I want to ensure that one and
only one instance is running.
I am using check_procs, but I can't seem to get the command name and
args right. How should I do this?
Details:
I'm using Nagios Version 3.0.5.
The command in ps appears as:
0 R myuser 26507 1 48 75 0 - 91419 - 16:05 pts/0
00:14:48 python -u -O /home/myuser/scripts/
make_async_xmlrequest_libraries.py
In my commands.cfg file I tried:
define command{
command_name check_my_job
command_line $USER1$/check_procs -c 1:1 -C "python" -a "/home/
myuser/scripts/make_async_xmlrequest_libraries.py"
}
and
define command{
command_name check_my_job
command_line $USER1$/check_procs -c 1:1 -C "python" -a "-u -
O /home/myuser/scripts/make_async_xmlrequest_libraries.py"
}
and
define command{
command_name check_my_job
command_line $USER1$/check_procs -c 1:1 -C "python -u -O /
home/myuser/scripts/make_async_xmlrequest_libraries.py"
}
and
define command{
command_name check_my_job
command_line $USER1$/check_procs -c 1:1 -C
"make_async_xmlrequest_libraries.py"
}
but Nagios always reports that there are zero processes (I can see in
the UI that it is doing the new check each time, but it does not find
the process).
Thanks!
Bob
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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
More information about the Users
mailing list