Feature request: check process with option to check file timestamp
Issue #183
new
We have a normal daemon process that generates appropriate pid file. Occasionally its main loop hangs but process stays put in running state. We can only detect the problem by watching log file it produces. So when timestamp is older than 5 minutes and daemon is alive, we are sure that the main process loop hang.
Our monit config file has two check entries: 1. check process with pidfile 2. check file with path if timestamp > 5 minute then alert
It would be really nice to have one process check only for reporting reasons and such. We plan to use mmonit.
You can use "then restart" action with
check file
too if you specify restart program. Check the opening post of this ticket: https://bitbucket.org/tildeslash/monit/issue/151/monit-thinks-program-is-running-when