On 03/23/2010 04:58 PM, Anders Synstad wrote:
Here is a snippet of our MON config

define(_ALWAYS_,`$1 wd {Mon-Sun}')dnl
define(_WORKING_HOURS_,`$1 wd {Mon-Fri} hr {9am-4pm}')dnl
define(_OOH_,$1 `wd {Mon-Fri} hr {4pm-9am},wd {Sat-Sun}')dnl

I wish to change the working day to 0715 to 0545 but I'm at a loss...

week begins 0715 monday morning and ends 0545 saturday morning:

wd {Mon-Sat} hr {8am-4am}, wd {Tue-Sat} hr {5am} min {0-45}, wd
{Mon-Fri} hr {7am} min {15-59}

Sorry, I made a typo

I want our working day to be Monday - Friday 0715 - 1745 each day. Then
out of hours would be 1745 - 0715 each day and all day Sat and Sun

We use the 'working day' definition to alarm about everything, then Out
of Hours to alarm about only critical systems

Hope this explains it better.

MON is brilliant by the way thanks for your help.


The syntax is based in the Time::Period perl module syntax. And is the
same as used in period definitions in the mon configuration.

The syntax is pretty well documentet at the perl module home:
http://search.cpan.org/~pryan/Period-1.20/Period.pm


Think maybe something along the lines of this should work, but I would double check them if I were you. Basicly the trick is to break it down into smaller periods and define them:

WORKING_HOURS:
wd {mon-fri} hr {7} min {15-59},        # monday - friday: 07:15 - 07:59
wd {mon-fri} hr {8-16},                 # monday - friday: 08:00 - 16:59
wd {mon-fri} hr {17} min {0-45}         # monday - friday: 17:00 - 17:45

define(_WORKING_HOURS_,`$1 wd {mon-fri} hr {7} min {15-59}, wd {mon-fri} hr {8-16}, wd {mon-fri} hr {17} min {0-45}')dnl

OOH:
wd {sat-sun},                           # saturday - sunday: all day
wd {mon-fri} hr {17} min {45-59},       # monday - friday: 17:45-17:59
wd {mon-fri} hr {18-6},                 # monday - friday: 18:00-06:59
wd {mon-fri} hr {7} min {0-15}          # monday - friday: 07:00-07:15

define(_OOH_,$1 `wd {sat-sun}, wd {mon-fri} hr {17} min {45-59}, wd {mon-fri} hr {18-6}, wd {mon-fri} hr {7} min {0-15}')dnl

There is a 59sec overlap at 17:45 now, but you can work that out :)




Regards,
Anders Synstad
Basefarm AS

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

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

Reply via email to