timeperiod and exclude property
Cyril Vieville
Cyril.Vieville at ebuilder.se
Mon May 25 17:06:33 CEST 2009
Hi,
I got a problem on Nagios timeperiods. I wanted to use the exclude property to exclude holidays from the check period but it doesn´t work. I can only make it work if I comment the exclude lines. My timeperiods file below :
define timeperiod{
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
# 'swedenholidays' timeperiod definition
define timeperiod{
name swedenholidays
timeperiod_name swedenholidays
alias Sweden Holidays
january 1 00:00-24:00 ; New Year
january 6 00:00-24:00 ; Epiphany
2009-04-10 00:00-24:00 ; Good Friday 2009
2009-04-13 00:00-24:00 ; Easter Monday 2009
2010-04-02 00:00-24:00 ; Good Friday 2010
2010-04-05 00:00-24:00 ; Easter Monday 2010
2011-04-22 00:00-24:00 ; Good Friday 2011
2011-04-25 00:00-24:00 ; Easter Monday 2011
may 1 00:00-24:00 ; Labour Day
2009-05-21 00:00-24:00 ; Ascension Day 2009
2010-05-13 00:00-24:00 ; Ascension Day 2010
2011-02-06 00:00-24:00 ; Ascension Day 2011
june 6 00:00-24:00 ; Swedish National Holiday
2009-06-19 00:00-24:00 ; Midsummer Eve 2009
2010-06-25 00:00-24:00 ; Midsummer Eve 2010
2011-06-24 00:00-24:00 ; Midsummer Eve 2011
december 24 00:00-24:00 ; Christmas Eve
december 25 00:00-24:00 ; Christmas
december 26 00:00-24:00 ; St Stephens Day
december 31 00:00-24:00 ; New Years Eve
}
# 'swedenworkhours' timeperiod definition
define timeperiod{
timeperiod_name swedenworkhours
alias Sweden TimeZone Work Hours
monday 09:00-18:00
tuesday 09:00-18:00
wednesday 09:00-18:00
thursday 09:00-18:00
friday 09:00-18:00
exclude swedenholidays
}
# 'srilankaholidays' timeperiod definition
define timeperiod{
name srilankaholidays
timeperiod_name srilankaholidays
alias Sri Lanka Holidays
2009-01-10 00:00-24:00 ; Duruthu Full Moon Poya Day
2009-01-14 00:00-24:00 ; Tamil Thai Pongal Day
2009-02-09 00:00-24:00 ; Navam Full Moon Poya Day
2009-02-23 00:00-24:00 ; Mahasivarathri Day
2009-03-10 00:00-24:00 ; Medin Full Moon Poya Day / Milad-un-Nabi
2009-04-09 00:00-24:00 ; Bak Full Moon Poya Day
2009-04-10 00:00-24:00 ; Good Friday
2009-04-13 00:00-24:00 ; Tamil New Year Eve
2009-04-14 00:00-24:00 ; Tamil New Year
2009-05-08 00:00-24:00 ; Vesak Full Moon Poya Day
2009-05-09 00:00-24:00 ; Day Following Vesak Full Moon Poya Day
2009-06-07 00:00-24:00 ; Poson Full Moon Poya Day
2009-07-06 00:00-24:00 ; Esala Full Moon Poya Day
2009-08-05 00:00-24:00 ; Nikini Full Moon Poya Day
2009-09-04 00:00-24:00 ; Binara Full Moon Poya Day
2009-09-21 00:00-24:00 ; Id-Ul-Fitr
2009-10-03 00:00-24:00 ; Vap Full Moon Poya Day
2009-10-17 00:00-24:00 ; Deepavali Festival Day
2009-11-02 00:00-24:00 ; Il Full Moon Poya Day
2009-11-28 00:00-24:00 ; Id-Ul-Alha
2009-12-01 00:00-24:00 ; Unduvap Full Moon Poya Day
2009-12-31 00:00-24:00 ; Duruthu Full Moon Poya Day
2010-01-14 00:00-24:00 ; Tamil Thai Pongal Day
2010-01-30 00:00-24:00 ; Duruthu Full Moon Poya Day
2010-02-12 00:00-24:00 ; Mahasivarathri Day
2010-02-26 00:00-24:00 ; Milad-un-Nabi
2010-02-28 00:00-24:00 ; Navam Full Moon Poya Day
2010-03-30 00:00-24:00 ; Medin Full Moon Poya Day
2010-04-02 00:00-24:00 ; Good Friday
2010-04-13 00:00-24:00 ; Tamil New Year Eve
2010-04-14 00:00-24:00 ; Tamil New Year
2010-04-28 00:00-24:00 ; Bak Full Moon Poya Day
2010-05-27 00:00-24:00 ; Vesak Full Moon Poya Day
2010-05-28 00:00-24:00 ; Day Following Vesak Full Moon Poya Day
2010-06-26 00:00-24:00 ; Poson Full Moon Poya Day
2010-07-26 00:00-24:00 ; Esala Full Moon Poya Day
2010-08-24 00:00-24:00 ; Nikini Full Moon Poya Day
2010-09-09 00:00-24:00 ; Id-Ul-Fitr
2010-09-23 00:00-24:00 ; Binara Full Moon Poya Day
2010-10-23 00:00-24:00 ; Vap Full Moon Poya Day
2010-11-05 00:00-24:00 ; Deepavali Festival Day
2010-11-16 00:00-24:00 ; Id-Ul-Alha
2010-11-21 00:00-24:00 ; Il Full Moon Poya Day
2010-12-21 00:00-24:00 ; Unduvap Full Moon Poya Day
2011-04-22 00:00-24:00 ; Good Friday 2011
february 4 00:00-24:00 ; Independance Day
may 1 00:00-24:00 ; May Day
december 25 00:00-24:00 ; Christmas
}
# 'srilankaworkhours' timeperiod definition
define timeperiod{
timeperiod_name srilankaworkhours
alias Sri Lanka TimeZone Work Hours
monday 04:30-17:30
tuesday 04:30-17:30
wednesday 04:30-17:30
thursday 04:30-17:30
friday 04:30-17:30
exclude srilankaholidays
}
# 'commonholidays' timeperiod definition
define timeperiod{
name commonholidays
timeperiod_name commonholidays
alias Sweden and Sri Lanka Common Holidays
2009-04-10 00:00-24:00 ; Good Friday 2009
2010-04-02 00:00-24:00 ; Good Friday 2010
2011-04-22 00:00-24:00 ; Good Friday 2011
2009-12-31 00:00-24:00 ; New Years Eve / Duruthu Full Moon Poya Day
may 1 00:00-24:00 ; Labour Day / May Day
december 25 00:00-24:00 ; Christmas
}
define timeperiod{
timeperiod_name outworkhours
alias Out Of Office Hours
use commonholidays
sunday 00:00-24:00
monday 00:00-04:29,18:01-24:00
tuesday 00:00-04:29,18:01-24:00
wednesday 00:00-04:29,18:01-24:00
thursday 00:00-04:29,18:01-24:00
friday 00:00-04:29,18:01-24:00
saturday 00:00-24:00
}
If someone has an idea to solve this problem ... I tried a lot of things ...
Thank you for your help
Cyril Viéville
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090525/98cada05/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list