Re: Check the age of a process

David Jones via This is the general mailing list for monit <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <DM6PR19MB223311F2CC0097DB5D40C64FC6A50@DM6PR19MB2233.namprd19.prod.outlook.com>
check program filter_grep_age with path "/usr/lib64/nagios/plugins/check_proc_age.sh -p filter_grep -w 28800 -c 36000" every 10 cycles
    if status == 2 for 3 cycles then alert
    if status == 1 for 3 cycles then alert

________________________________
From: monit-general <[email protected]> on behalf of SZÉPE Viktor <[email protected]>
Sent: Thursday, August 22, 2019 12:35 PM
To: [email protected] <[email protected]>
Subject: Re: Check the age of a process

Monit has more and more features.
Other things should be implemented as shell scripts.
This is my take on long running cron jobs
https://github.com/szepeviktor/debian-server-tools/blob/master/monitoring/cron-long.sh
installed on all production servers.


Idézem/Quoting David Jones via This is the general mailing list for
monit <[email protected]>:

> What if I wanted to check for something running too long?  I tried
> this and it's alerting for not being present or for having less
> uptime.  Is it possible to negate the alerting logic so it's OK when
> something is not running or it's less that a certain age?
>
> check process filter_grep_age matching filter_grep
>     if uptime > 7 hours then alert
>
> This filter_grep command shouldn't run for more than a few hours or
> a user has forgotten to stop it.


SZÉPE Viktor, webes alkalmazás üzemeltetés / Running your application
https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
~~~
ügyelet/hotline: +36-20-4242498  [email protected]  skype: szepe.viktor
Budapest, III. kerület
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.