Time Periods
Time periods control when a Nagios check job is allowed to run. Each time period is a named schedule with one or more allow rules.
- Outside the active time period, the check does not execute and its state becomes
paused. - The built-in
24x7period (always allowed) is the defaultcheck_period. - Set the
check_periodoption in a job to reference a named time period. - Define custom time periods using the
time_periodsoption within the same job.
Rule Types
| Type | Description | Key Fields |
|---|---|---|
weekly |
Repeats on specific weekdays | days, ranges |
nth_weekday |
Nth occurrence of a weekday in a month | weekday, nth, ranges |
date |
Specific calendar dates | dates, ranges |
Fields
days— List of weekday names:monday,tuesday,wednesday,thursday,friday,saturday,sundayranges— List of time ranges inHH:MM-HH:MMformat (e.g.,"09:00-18:00"). Use"00:00-24:00"for all day.weekday— Single weekday name (fornth_weekdayrules)nth— Which occurrence of the weekday in the month (1 = first, 2 = second, etc.)dates— List of calendar dates inYYYY-MM-DDformatexclude— List of other time period names to subtract from this period
Examples
Business hours (Mon–Fri, 09:00–18:00)
time_periods:
- name: business_hours
alias: Business Hours
rules:
- type: weekly
days: [monday, tuesday, wednesday, thursday, friday]
ranges: ["09:00-18:00"]
First Monday maintenance window each month
time_periods:
- name: first_monday_maintenance
alias: First Monday Maint
rules:
- type: nth_weekday
weekday: monday
nth: 1
ranges: ["02:00-04:00"]
Holiday blackout by specific dates
time_periods:
- name: holidays
alias: Holiday Blackout
rules:
- type: date
dates: ["2026-12-25", "2026-12-31"]
ranges: ["00:00-24:00"]
Always allowed, except during maintenance and holidays
time_periods:
- name: run_checks
alias: Run Checks
rules:
- type: weekly
days: [sunday, monday, tuesday, wednesday, thursday, friday, saturday]
ranges: ["00:00-24:00"]
exclude: [first_monday_maintenance, holidays]
Notes
- Date format is strict
YYYY-MM-DD. - Time range format is strict
HH:MM-HH:MM.24:00is valid only as an end boundary. - The built-in
24x7period is always available and is the defaultcheck_period.