On Thu, Apr 04, 2002 at 01:17:54PM +0200, Kevin Ivory wrote:
> We are getting too many false alarms, especially from services
> with excluded times. The clock on the mon-server is definitely
> okay. Below I have two configuration examples for services
> where we still get alarms at 5:00am resp. 6:00am (the checked
> services are restarted at those times). Have we got the
> configuration wrong? (How to correctly debug?)
> 
>     service squid
>      description xxx proxy
>         depend xxx-proxy:ping
>         interval 2m
>         monitor tcp.monitor -p 3128
>         period wd {Sun-Sat}
> #       exclude_period hr {4:55am-5:10am}
>         exclude_period hr {4am-6am}
>             alertafter 2
>             alertevery 12h
>             alert mail.alert monwatch
>             upalert mail.alert -u monwatch
> 
>     service xxxping
>      description xxx ping
>         depend xyz-xxx:ping
>         interval 10m
>         monitor fping.monitor -r 3 -t 6000 server ;;
>         period wd {Sun-Sat}
>         exclude_period hr {5am-7am}
>             alertafter 2
>             alertevery 12h
>             alert mail.alert monwatch
>             upalert mail.alert -u monwatch
> 
> Best regards
> Kevin
> -- 
>   _              |  Kevin Ivory          |  Tel: +49-551-37000041
>  |_     |\ |     |  Service Network GmbH |  Fax: +49-551-3700009
>  ._|ER  | \|ET   |  Bahnhofsallee 1b     |  mailto:[EMAIL PROTECTED]
> Service Network  |  37081 Goettingen     |    http://www.SerNet.de/

I've had to patch mon to make it process exclude_period configuration
properly. Here is the diff:

1461c1461
<               elsif ($var eq "exclude_period" && inPeriod (time, $args) == -1)
---
>               elsif ($var eq "exclude_period" )
1463,1464c1463,1467
<                   close (CFG);
<                   return "cf error: malformed exclude_period '$args' (the specified 
time period is not valid as per Time::Period::inPeriod), line $line_num";
---
>                       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";
>                       }


-- 
Konstantin 'Kastus' Shchuka
Unix System Administrator
ePocrates Inc.
tel 650.232.4886
fax 650.592.6995

Reply via email to