Custom notifications with host vars

I have a following custom notification:
apply Notification “jira-service-tds” to Service {
import “jira-service-notification”
interval = 24h
assign where service.vars.jiranotification_tds && host.vars.jiranotification

in template for host I have:

template Host “host-preprod” {
max_check_attempts = 5
check_interval = 1m
retry_interval = 1m = “no”
vars.jiranotification = “false”

The problem is that the notifications for service are still comming in. Can you advise how to fix that?

Hi Sebastian,

you don’t have to wrap vars.jiranotification into quotes. The quotes treat the value as string and not as boolean.

vars.jiranotification = false is what you want.

1 Like

Additional docs reference: Attribute value types.