I am new to Nagios. I understand setting up the service, etc. but I want to monitor some specific python processes that are running. When I set up the check_procs command for it to I give the -C option as '-C python programName'? Thanks
Asked
Active
Viewed 1,377 times
0
-
1You need to give a bit more information. What process exactly do you want to monitor? And, using long options is a more friendly way of giving examples of command-line switches (`-C` is `--command`). In any case, I think you're going to have to define a custom command in `commands.cfg` and then pass params to it like `custom_command!python bla`. In the command definition, you can reference that as `$ARG1$` – Halfgaar Jul 10 '13 at 17:01
-
Like I said I understand how to do all of that (adding custom command, etc. in cfg files). I need to monitor specific python scripts that are constantly running. command[check_consumer]=/usr/local/nagios/libexec/check_procs -C python SCRIPTNAME. I need to know if I can monitor a specific script by giving its name or if I have to only monitor python – thaweatherman Jul 10 '13 at 17:20
-
When I do that command using just 'python' after the -C it reports back OK and that there are 3 processes with that command name, which is correct. How can I check if the specific scripts are running? When I put 'python scriptname.py' it reports back a warning that there are 3 processes with command name python – thaweatherman Jul 10 '13 at 18:00
1 Answers
1
I solved the problem by using the --argument-array='python script'
argument.

slm
- 7,615
- 16
- 56
- 76

thaweatherman
- 157
- 9