[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alert on file not changed

From: Lutz Mader
Subject: Re: alert on file not changed
Date: Wed, 12 Jul 2017 21:31:55 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Hello Nick,

> I'm trying to detect that a program has stopped writing to its logfile but
> have been unable to come up with a working monit config to do so, has
> someone already done this and willing to share?

If you use Monit >= 5.22.0, you can define a check like this.

check file myapp_log with path /var/log/myapp.log
        if timestamp is older than 1 hour then exec "/usr/bin/monit restart 

The test will restart "myapp" service if the timestamp was not modified
within last hour.

With regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]