Last updated: November 16. 2016
In order to align the monitoring with human working rhythms and thus, for example, avoid senseless notifications, Check_MK has the facility to make various settings dependent on the time of day or day of the week.
So that the configuration is simple and clear, this is achieved in two stages. First, define the time periods. For example, one period could be called ‘Working hours’, and contain Monday to Friday and 8:00 to 17:00 (8 am to 5 pm). Thus every time period is either active or inactive at any particular point in time.
These time periods can then subsequently be used in the configuration. They are used in the following rules - among others. These rules all have in common that the application of time periods is optional, and that the time periods restrict the rules’ chronological operation range:
2. Configuring time periods
Time periods are managed with the Time periods WATO module. The implicit, ever-present Always period is not shown in the list and therefore can neither be altered nor deleted.
As usual in WATO, the time period definitions have an internal ID and a display name (Alias). Only the latter can be altered later, and this is the name which will be shown in selection lists, etc. For every weekday you can enter three time ranges for which the time period will be aktiv. Use the 24-hour format for entries.
Important: to include a complete day up until midnight, enter 00:00 - 24:00, even though, of course, the time 24:00 doesn't actually exist. If you wish to exclude a time, simply enter the times before and after - e.g., 00:00 - 8:00 and 17:00 - 24:00. Days on which the time period should never be active can simply be left empty.
2.2. Individual calendar days
With the aid of Add Exception you can enter single calendar days in the ‘International Date Format’ (YYYY-MM-DD) - for example, 2017-12-25. On these days only the values entered in the Exceptions menu (see below) are effective:
2.3. Excluding time periods from other time periods
A holiday calendar such as this can be excluded from another time period. The commonest example is excluding the holidays from a time period for normal office hours. Simply check your 'holidays calendar' box in the Exclude field:
2.4. Importing a calendar from the internet
For vacation and holiday calendars importing calendar data in the iCal-format is conveniently available. Such files are easily found on the internet and spare you from having to enter dates laboriously by hand. For example, holidays for all German states can be found under www.ifeiertage.de. Maybe there is a similar source for your country, too.
Import such data with the button, and in the mask specify the range of future years for which the regular holidays should be entered into the time periods:
A pre-filled time period definition will then be opened, in which you only need to enter the ID and name - once completed you can then exclude this time period from other time periods, as described above.