monit-general
[Top][All Lists]
Advanced

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

Re: [monit] monitor timestamp file


From: alex
Subject: Re: [monit] monitor timestamp file
Date: Tue, 16 Oct 2007 10:35:20 +0300

   Yes, really. But it is one place with this keyword.
   I think there is three variants:
 1. 'PASSED' and 'RECOVERED' are synonyms
 2. 'RECOVERED' is undocumented keyword
 3. 'IF RECOVERED' is misptrint

   By the way, 'PASSED' not included in 'monit' reserved keywords also.
   Alex


from http://www.tildeslash.com/monit/doc/manual.php#how_to_monitor

check file httpd.bin
    with path /usr/local/apache/bin/httpd
    # Run /watch/dog in the case that the binary was changed
    # and alert in the case that the checksum value recovered
    # later
    if failed checksum then exec "/watch/dog"
       else if recovered then alert

   Hello Nick,
   I don't ready evaluated whole construction (but i think its work) but
i not found 'ELSE IF RECOVERED' monit's keywords, only 'ELSE IF PASSED'.

   Alex

> 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"

-----------------
Новые условия и возможности для участия в Лотерее Грин кард.
Воспользуйтесь нашим предложением - лучшим по ценам, качеству
и надежности исполнения. Поэтому нас не любят конкуренты.
http://greencard.nvs.by/





reply via email to

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