[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit] Re: monitor timestamp file
From: |
Nick Upson |
Subject: |
[monit] Re: monitor timestamp file |
Date: |
Fri, 12 Oct 2007 15:23:57 +0100 |
never mind, I did it
On 12/10/2007, Nick Upson <address@hidden> wrote:
> Below is what I would like to do, could you please confirm it's
> possible and if I'm heading in the right direction
>
>
>
> # when the timestamp file is > 30 old send msg
> # when file is > 6 hours old, send msg & stop bs1
> # when file returns to < 6 hours old send msg & start bs1
>
> check file last_good_ntp1 with path /opt/unb/run/last_good_ntp1
> if timestamp > 30 minutes then
> exec "/bin/bash -c '/bin/echo ntp: no sync >> /tmp/monit"
> if timestamp > 6 hours then
> exec "/bin/bash -c '/bin/echo ntp: stop transmit >> /tmp/monit"
> exec "/bin/bash -c monit stop bs1"
> else if recovered
> exec "/bin/bash -c '/bin/echo ntp: start transmit >> /tmp/monit"
> exec "/bin/bash -c monit start bs1"
>