Time Periods
Overview Copied
This document explains the concept of Time Periods, what a Time Period is, how to configure a Time Period, what Opsview Monitor items use Time Periods, and how to change these values. Time Periods in the context of notifications are not covered within this document. This section explains how to add, configure and utilize Time Periods within Opsview Monitor.
Determine if a host is being actively monitored Copied
Time Periods are used within Opsview Monitor for one of two purposes; determining when a Host or Service Check is being actively monitored, and determining when notifications should be sent. For example, if a Host only needs to be monitored during office hours, then an administrator can create a Time Period called ‘Working Hours’ that is 9am-5pm, Monday to Friday, and then ‘apply’ this Time Period to the Host via a field called the ‘Check Period’, i.e. ‘What *period *of time should I actively *check *this Host’. Service Checks can be configured to have a fixed Time Period or to inherit the check period from the Host. This will apply to all Service Checks whether the Service Checks are applied individually via the ‘Service Checks’ tab or in bulk via the addition of a Host template.
Modify Service Check during a certain time period Copied
Another usage of Time Periods within a Service Check context is that they allow the arguments of a Service Check to be modified during a certain Time Period. For example, if backups occur every evening between 1:00 am and 4:00 am then the load average on the file servers will be higher than usual, and may trigger alerts and false errors. To correctly account for this, an administrator could create a Time Period called ‘backups’ which is ‘01:00 ’ 04:00, Monday ’ Sunday’ and then override the load average check to say: Normal: check_nrpe -H $HOSTADDRESS$ -c check_load -a ‘-w 5,5,5 -c 9,9,9’ Time Period ‘backups’: -H $HOSTADDRESS$ -c check_load -a ‘-w 9,9,9 ‘c 15,15,15’ As can be seen, during the Time Period ‘backups’ the warning and critical levels are significantly higher ’ meaning if the load average goes above ‘5’ during the ‘backups’ Time Period then the Service Check stays in an ‘OK’ state and no alerts are sent. However if the load average goes above ‘5’ AFTER the backups Time Period has elapsed, i.e. normal hours, then the Service Check will change to a ‘WARNING’ state and alerts may be sent, if the notifications profiles are configured as such.
In Opsview Monitor, by default, there are four Time Periods:
24x7nonenonworkhoursworkhours
Note
The default Time Periods all use the SYSTEM timezone which may vary per collector - see timezones for details.
To access those details, go to the Configuration > Time Periods menu. Once clicked, the Time Periods list page is displayed:
To view the Time Periods details, either double-click on the relevant row or simply click Edit within the contextual menu for the Time Period:
There are seven days within the Time Period, Sunday to Saturday. For each day, the hours can be defined in an HH:MM format and comma-separated for multiple ranges. For example, 00:00-24:00 means all day, 09:00-17:00 means 9 AM to 5 PM, and 00:00-09:00,17:00-24:00 means not 9 AM to 5 PM. In all cases, time ranges are start-inclusive and end-exclusive.
Note
The defined hours must not cross the midnight boundary. For example,22:00-02:00is not valid. Instead, use22:00-24:00on the first day and00:00-02:00on the following day.
Timezones Copied
When defining any timestamps for a time period to apply to, they will all be evaluated using the configured Timezone. When a time period with the SYSTEM timezone is used as an effective check period, it resolves to the system timezone of the Opsview collector system that executes the check. This could result in the same check period resolving to different timestamps on different collectors, or the orchestrator, if system times differ across your Opsview system.
Using a geographical timezone like Europe/London will resolve to the appropriate DST.
Examples, given configured Time Period timestamps 18:00-19:00:
| Time Period timezone | Collector system timezone where check runs | Runs during actual time in UTC |
|---|---|---|
| SYSTEM | UTC | 18:00-19:00 |
| SYSTEM | EST (UTC-5) | 13:00-14:00 |
| UTC | UTC | 18:00-19:00 |
| UTC | EST (UTC-5) | 18:00-19:00 |
| CET (UTC+1) | UTC | 19:00-20:00 |
| CET (UTC+1) | EST (UTC-5) | 19:00-20:00 |
| Europe/London | UTC | During DST: 19:00-20:00, Otherwise: 18:00-19:00 |
| SYSTEM | Europe/London | During DST: 19:00-20:00, Otherwise: 18:00-19:00 |
Warning
If there are any errors detecting the system timezone when using SYSTEM for a check period, the scheduler will log a warning message and fall back to using UTC.
Note
The following timezones all resolve to UTC:
- UCT
- GMT
- GMT0
- GMT-0
- GMT+0