Status flags supported by check_procs
Mauro <[email protected]>
| Newsgroups | gmane.network.nagios.plugins.devel |
|---|---|
| Message-ID | <CAJAUd+Eop90TbzD8mjH+pnsrsbJ0Fews-d=XyL0r_h3QJ6Na5g@mail.gmail.com> |
Hello, I would like to monitor a daemon, by checking that there is exactly 1 "parent" running, to avoid the process to be run twice on the same box. The daemon itself forks at certain times, so you can have a parent and multiple children. I have other various ways of doing it, but as first solution I wanted to try using nagios. My idea was to use the following command, by checking the "s" status flag from ps. /usr/lib64/nagios/plugins/check_procs -C schedule_cron -sSs This doesn't work, as check_procs doesn't seem to be checking the "s" flag. With the -vv option to check_procs, I can see that the ps command used is: CMD: /bin/ps -eo '*s* uid pid ppid vsz rss pcpu etime comm args' Instead of the "s" column, "stat" would do the job I need. I wonder if it would be possible to change the default format from s to stat, or to not alter an existing behaviour, provide an option -o or similar for users customisations. I'm running nagios plugins 1.4.15, nagios 3.2.2, installed from rpm on a redhat based distribution. Regards, Mauro ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________________ Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null