I need to monitor a log file with monit if the file does not change monit will alert

I need help. I was looking in to Monit documentation and I need help. I could not find my answer there. I need to monitor a log file of a service, if that log file stops to increase in size or even better something in the log file stops coming in (the log file gets around 20 new messages in a second. It has rotation) then monit will alert me via e-mail. This is really needed!

Thank you!


Solution 1:

Have you considered a timestamp change? If the file is older then N minutes, then things are broken?

 check file stored.per with path /msg-foo/config/stored.per
   if timestamp > 1 hour then alert