--On Wednesday, October 02, 2002 11:37 AM +0200 Erik Inge Bolsų 
<[EMAIL PROTECTED]> wrote:

> Any way we could "schedule downtime" in mon, so that on-call people aren't
> woken up by meeping mobile phones over known outages? Hm, apart from doing
> disable_host and enable_host from homegrown perl scripts in crond/atd,
> that is... that could work.
>

Thats what exclude_period is for.  Unfortunately there is a known minor bug 
in mon 0.99.2 that prevents exclude_periods from working.  The fix is to 
make the following change:


Search for exclude_period until you find:
elsif ($var eq "exclude_period" && inPeriod (time, $args) == -1)
{
    close (CFG);
    return "cf error: malformed exclude_period '$args' (the specified time 
period is not valid as per Time::Period::inPeriod), line $line_num";
}


Change that to:
elsif ($var eq "exclude_period")
{
    if (inPeriod (time, $args) == -1)
    {
        close (CFG);
        return "cf error: malformed exclude_period '$args' (the specified 
time period is not valid as per Time::Period::inPeriod), line $line_num";
    }
}


(I removed some of the indentation for clarity.)

Then in your mon.cfg in the relevant service you add:
exclude_period <your period spec here>

i.e.
        exclude_period wd{1} hr{4} min{0-20}


-David Nolan
 Network Software Developer
 Computing Services
 Carnegie Mellon University

_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to