Maybe another way to think about this is that you want to be notified
if the process has been running for more than 24hours (+5m) ? right?
The venerable check_proc can do this:
/usr/lib/nagios/plugins/check_procs --metric=ELAPSED -c :86400 -C /usr/bin/nginx
Or the sensu-community check-procs.rb can do this:
check-procs.rb --esec_over 86400 --cmd_pat nginx --crit_over 1 ?
This would allow for other manual restarts. But wouldn't actually
catch it if someone manually restarted it at midnight, and the cron
job failed at 01:00.
If you really want to monitor the *cron job*, I kinda like this:
On Thu, Mar 5, 2015 at 5:54 PM, Anthony Kong <firstname.lastname@example.org> wrote:
I think the key part of my suggestion is that you can use the PID file to
infer the start time. You will need to figure out implementation details to
suit your need.