Page 1 of 1
Monitor linux process age
Posted: Mon May 06, 2013 12:35 pm
by BanditBBS
As the title of this post suggests, I want to monitor a specific process, and if it is running, make sure it hasn't been running over a certain amount of time. If it is running and has been for too long I want a critical message. Then I'll kick off an event handler to kill the process. Does anyone know of a check that can do what I want?
Re: Monitor linux process age
Posted: Mon May 06, 2013 12:57 pm
by abrist
There are a number of similar plugins on the exchange:
http://exchange.nagios.org/index.php?op ... ess%20time
If you are looking to roll your own, stackoverflow had a bunch of different options to check for process time in the following post:
http://stackoverflow.com/questions/6134 ... ux-process
Re: Monitor linux process age
Posted: Mon May 06, 2013 12:58 pm
by BanditBBS
Re: Monitor linux process age
Posted: Mon May 06, 2013 1:08 pm
by abrist
Happy hunting!
Re: Monitor linux process age
Posted: Mon May 06, 2013 1:09 pm
by BanditBBS
Thanks abrist. Looks like I was posting my reply as you were posting yours.
Using check_proc_age.sh check instead. Now to modify it to use it as the event handler as well

Thanks for the links anyway!
Re: Monitor linux process age
Posted: Mon May 06, 2013 1:11 pm
by slansing
Great! Let us know how this works out for you, it may be something we could document and add along side the basic service check documentation!

Re: Monitor linux process age
Posted: Mon May 06, 2013 1:11 pm
by abrist
No problem. These forum race conditions: not enough F5 mashing I guess
I will lock 'er up.
EDIT: To many smilies in this thread. This is a place of business guys!