monit-general
[Top][All Lists]
Advanced

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

Re: Adding one-time checks to monit?


From: Martin Pala
Subject: Re: Adding one-time checks to monit?
Date: Sun, 24 Jun 2007 20:12:42 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070217 Iceape/1.1.1 (Debian-1.1.1-2)

see the 'every' statement, which allows to skip given number of cycles

Martin

Sergio Trejo wrote:
Hello all,

As I'm getting used to the monit syntax, I am wondering if there is a way to author a monit configuration file such that moments after monit itself is first started (such as by inetd or on Mac OS X launchd), it will perform a check on the status of a resource (such as to see if the apache daemon is running) and then after that first-time immediate check, monit will only check the status of the resource every x number of cycles?

Take the monit configuration snippet below. I set my high frequency check to once every 60 seconds. I then only want to ping my Apache httpd daemons to see if they are doing fine every 10 minutes. However, when monit itself is first run, I want it to not wait 10 minutes and in fact I want it to check the Apache daemons right away, then if everything is Ok it will regularly check every 10 minutes.

Is this possible with the syntax magic of monit?

Thanks,

Serg

    set daemon 60       # highest frequency monitoring is once every 60s


    check process apache with pidfile
    "/opt/local/apache2/logs/httpd.pid" every 10 cycles
        if failed port 80 and protocol http then restart
        if 2 restarts within 3 cycles then timeout


------------------------------------------------------------------------

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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