I have made a timeperiod like this
object TimePeriod “stefan” {
display_name = “Icinga 2 stefan TimePeriod”
ranges = {
“wednesday” = “14:00-15:00”
}
}
Then a notification like this
apply Notification “utlast_mail-icingaadmin” to Host {
command = “mail-service-notification”
users = [“icingaadmin”]
interval = 0
period = “stefan”
assign where host.vars.utlast_notification.mail
}
And a host like this
object Host “stefanl03” {
import “generic-host”
address = “stefanl03”
check_command = “hostalive”
vars.utlast_notification.mail.users = [“icingaadmin”]
}
However notification_timeperiod_object_id never changes value in the database.
All other hosts are using the “24x7” default timeperiod.
All notification_timeperiod_object_id for all hosts are 0 no matter what I do.
Am I missing something?