--On Monday, October 10, 2005 23:47:43 +0200 Sebastiaan Veldhuisen <[EMAIL PROTECTED]> wrote:

Sorry that it took so long to reply. I'm still very interested in using
the exclude_period. In my opinion it would be nice to have a global level
exclude period, because there are a lot more sysadmins that have a
predefined time period for  patching/ maintenance and they don't want to
be alerted by mon in this period.


I just committed a new version of Mon to CVS with *UNTESTED* support for a global exlude_period. Download the latest from the sourceforge CVS repository and put 'exclude_period = wd {Mon} md {8-14} hr {17-23}' into your config file, next to the other global settings. (You'll also need the current version of Mon::Client, since there were some protocol changes between your version (0.99.2) and the 1.1 series.



In the mean while I'm testing the exclusion_period  on each service
definition, but somehow alerts still go off. Here is an example of my
mon.cf:

    service ncp
        description eDirectory monitoring
        interval 30s
        monitor nds.monitor
        period wd {Mon-Fri} hr {9-16}
                alert mail.alert [EMAIL PROTECTED]
                upalert mail.alert [EMAIL PROTECTED]
                alert mobile.alert [EMAIL PROTECTED]
                upalert mobile.alert [EMAIL PROTECTED]
                alertevery 1h
                alertafter 2
        period wd {Mon-Fri} hr {17-8}, wd {Sat-Sun}
        exclude_period wd {Mon} md {8-14} hr {17-23}
                alert mail.alert [EMAIL PROTECTED]
                upalert mail.alert [EMAIL PROTECTED]
                alert mobile.alert [EMAIL PROTECTED]
                upalert mobile.alert [EMAIL PROTECTED]
                alertevery 1h
                alertafter 2

I downed this service @ 23.00 local time , today, Monday 10th of October
(Mon uses the sysclock via perl Time::Period right?). According to the
logic above, mon should exclude this service for monitoring, right?
However, alerts are sent when I downed this service at the given time. If
the syntax above isn't correct please let me know. I'm using $Id: mon
1.27 Sat, 08 Sep 2001 09:42:05 -0400 trockij $ $ProjectVersion:
mon-0-99-2.6 $



You're trying to put the exclude_period definition inside a period. Put it above the first period definition and it should work. (And in current Mon code this would generate a config file syntax error.)

-David


David Nolan                    <*>                    [EMAIL PROTECTED]
curses: May you be forced to grep the termcap of an unclean yacc while
     a herd of rogue emacs fsck your troff and vgrind your pathalias!

_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to