Checkmk
to checkmk.com

1. Introduction

alt

In order to adapt the monitoring to the working rhythms of humans, and so, for example, to avoid senseless notifications, Checkmk has the capability of making various settings dependent on both 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, a 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. What these rules all have in common is that the application of time periods is optional, and that the time periods restrict the rules’ chronological operation range:

Notification period for …​

A restriction to the times in which a notification will be generated for a host or service. No notification will be triggered outside the defined times and the chain of notification rules is not used at all.

Notification rules

Likewise, in each notification rule you can define a specific time period as a condition. For example, the notification method (email or SMS) can be made dependent on the time of day.

Check period for …​

With this the execution of checks can be restricted by time. The checks will not be executed outside the defined time period, and the status retains the same condition it had at the last check execution. However, use this carefully: A service can still remain flagged as OK, even though it may actually have been CRIT for hours.

Service period for …​

With the aid of a service period you can calculate the percentage of the time a service is available over a specified time period.

Event Console

The validity of rules in the Event Console can be dependent on a time period. For example, you can declare particular log messages to be unproblematic at certain times.

Alert handler

The execution of alert handler rules can likewise be controlled using time periods.

Thresholds

You can link the validity of the threshold values of certain checks to a time period. A server’s threshold values for CPU utilization could be configured differently depending on day or night, for example.

Tip: You can easily find the concrete rules mentioned above with the search Setup > General > Rule search.

2. Configuring time periods

2.1. Weekdays

You enter the administration of time periods with Setup > General > Time periods. The displayed list contains the always existing time period Always, which can neither be altered nor deleted.

Click Add time period to create a new time period.

As usual in Checkmk, also the definition of a time period requires at least an internal ID and a name to display (Alias). Only the latter can be altered later, and this is the name which will be shown in lists, etc.:

alt

You can either configure every single day of the week or set the same value for all seven days via Same times for all weekdays. For each weekday, you can enter several time ranges in which the time period will be active. Use the 24-hour format for entries.

Important: To include a complete day up until midnight, enter 00:00 — 24:00, even though the time 24:00 doesn’t actually exist.

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, 2021-12-25. On these days only the times of day entered there are effective:

alt

In this way you can, for example, compile an individual calendar of public holidays. For example, an individual calendar of public holidays can be compiled. You enter the period 00:00 - 24:00 for each of the holidays created.

2.3. Excluding time periods from other time periods

A holiday calendar such as this can be excluded from another time period. The most common example is excluding the holidays from a time period for normal office hours. Simply check your ‘holidays calendar’ box in the Exclude field:

alt

2.4. Importing a calendar

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 the work of having to enter dates laboriously by hand. For example, holidays for all German states can be found under Ferienwiki website. No doubt there will be a similar source for your country as well.

Import such a file on the Time periods page with the icon ical Import iCalendar button, and in the next page specify the range of future years for which the regular holidays should be entered into the time period:

alt

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.

On this page