|
From: | Martin Pala |
Subject: | Re: [monit] monitor timestamp file |
Date: | Mon, 15 Oct 2007 22:55:56 +0200 |
Both options (passed and recovered) are possible and work the same Martin On Oct 15, 2007, at 4:28 PM, Nick Upson wrote:
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 On 15/10/2007, alex <address@hidden> wrote: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'.AlexBelow 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 thenexec "/bin/bash -c '/bin/echo ntp: stop transmit >> /tmp/ monit"exec "/bin/bash -c monit stop bs1" else if recoveredexec "/bin/bash -c '/bin/echo ntp: start transmit >> /tmp/ monit"exec "/bin/bash -c monit start bs1"-----------------30 ноября – 1 декабря 2007 в Минске - 3-я международная бизнес-конференция 'Топ-менеджмент: вызовы и пределы конкуренции'. Не пропустите. Количество мест ограничено.-- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general-- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |