Time Periods
Overview Copied
This page explains the concept, definition, and configuration of Time Periods, the Opsview Monitor items that use Time Periods, and the method to change these values. Time Periods in the context of notifications are not covered in this page.
Determine if a host is being actively monitored Copied
Time Periods are used within Opsview Monitor to determine when a Host or Service Check is being actively monitored and to identify when notifications must 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 9 AM to 5 PM, Monday to Friday, and then apply this Time Period to the Host via a field called the Check Period.
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 individually applied in 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, which may trigger alerts and false errors.
To correct this, an administrator can create a Time Period called backups that runs from 01:00 to 04:00, Monday through Sunday. Then, override the load average check to use the following settings:
- 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'
In the Time Period backups, the warning and critical levels are significantly higher. This means that if the load average exceeds 5 during the backups, the Service Check remains in an OK state and no alerts are sent. However, if the load average exceeds 5 after the backups passed the normal hours, the Service Check will transition to a WARNING state and alerts may be sent, provided the notifications profiles are configured accordingly.
By default in Opsview Monitor, 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