Hi all
We’re using icinga 2.1.2 and have some problem with notifications and
timeperiods.
Our config looks like this (just a shirt summary):
object Host “demohost.local" {
import "generic-host"
address = “x.x.x.x"
vars.notification["mail"] = {
period = "piketthours"
}
}
apply Notification "notification-mail-piketthours" to Service {
command = "mail-service-notification"
user_groups = service.vars.notification.mail.groups
assign where service.vars.notification.mail &&
service.vars.notification.mail.period == “piketthours"
period = "piketthours"
interval = 2h
}
object TimePeriod "piketthours" {
import "legacy-timeperiod"
display_name = "Pikett TimePeriod"
ranges = {
"monday" = "06:30-22:30"
"tuesday" = "06:30-22:30"
"wednesday" = "06:30-22:30"
"thursday" = "06:30-22:30"
"friday" = "06:30-22:30"
"saturday" = "06:30-22:30"
"sunday" = "06:30-22:30"
}
}
apply Service "ping4" {
import "generic-service"
check_command = "ping4"
assign where host.address && host.vars.DisableHostCheck != true
}
So in this example we check if host “demohost.local” is reachable by
ping. The notification works well, if the host is down between 06:30 and
22:30 we’re getting a proper notification, repeated every 2 hours.
But if the host dies at 06:00 (30 minutes before the TimePeriod
“piketthours” which is used by the “apply Notification”) we’re getting
the first notification that this host is down at 08:00 (because of the
“interval = 2h”).
But in such scenario we’d like to get the notification right at 06:30
(start of the “piketthours” timeperiod). Any ideas how to implement such
behavior?
Regards
Christian
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users