Hi List,
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.
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 $
Regards,
Sebastiaan
David Nolan wrote:
--On Monday, September 05, 2005 9:42 PM +0200 Sebastiaan Veldhuisen
<[EMAIL PROTECTED]> wrote:
Dear List,
I'm trying to understand how the exclude_period parameter works. I
googled a lot, but didn't find any clear answers:
My first question is: what is the scope of exclude_period? Can I add it
to a hostgroup, watch or a service (or all of them)? What I want, is to
exclude all my hostgroups from being monitored in a certain time period.
Can this be done with one exclude_period parameter or do i need to
define
it for every, hostgroup, watch, service etc.?
The only content of a watch definition is multiple service
definitions. exclude_period's go in service definitions.
I've contemplated adding watch level settings for a few things, like
exclude periods and descriptions, but thats not the current model.
It sounds like you really want a global level exclude period, that
could be added fairly easily without changing any fundamental models
in the code...
My second question is: i need to have an exclude period for every first
Monday of the month, between 17.00 and 23.00. I've already succesfully
applied some fancy period definitions, but i need some help from a perl
Date::Time guru to define this time period. I wonder if this is possible
inside the perl module. Suggestions are welcome!
The first monday of a month will have a numeric date of 1-7, so you
can specificy that time period with
wd {Mon} md {1-7} hr {17-22}
(Yes, 22, not 23, since 'hr {22}' means 'the entire hour of 22:00 to
22:59'
-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