Hi and welcome,
What is the content of this variable on the host?
The downtime variable of the service definition is not used anywhere in your apply rule.
So either change the downtime config for the service to something like
apply ScheduledDowntime “service-downtime” to Service {
ranges = {
monday = service.vars.downtime
tuesday = service.vars.downtime
wednesday = service.vars.downtime
thursday = service.vars.downtime
friday = service.vars.downtime
saturday = service.vars.downtime
sunday = service.vars.downtime
}
assign where service.vars.downtime != “”
}
or add the correct downtime window to the host variable(be aware that this would also change the hosts downtime!)
Also please use the options to format your posts, e.g. with code tags at the beginning and the end of code/config snippets. ```
Here is a guide: