Stop monitoring hosts o specific time

Hello,

We have few servers for DEV, which we stopping every evening. We need monitoring this server during workhours, and I want disable checks this servers & services between 20:00-06:00, but i don’t know, how to use TImeperiod for active_check.

Please, can tell me somebody, how I can do it?

Thanks a lot.

Easiest way would be to create a service/host template that just has the check_period property set to the wanted timeperiod, e.g.:

template Service "generic_service_timeperiod_dev" {
       check_period = "dev"
}

Then have the hosts/services import this template.

You could also create a scheduled/recurring downtime for these hosts, so that only the notifications are disabled, but the hosts are still checked 24/7.

you will also need to define a TimePeriod too e.g.:

object TimePeriod “dev” {
ranges = {
“monday” = “06:00-20:00”
“tuesday” = “06:00-20:00”
“wednesday” = “06:00-20:00”
“thursday” = “06:00-20:00”
“friday” = “06:00-20:00”
}
}

it’s really more about when to run the check versus when not to run.

Note: the times are whatever timezone is on the icinga servers (generally UTC).