Custom host attributes in notifications

I have this box selected in under custom host attributes:
“Make this custom attribute available to check commands, notifications and the status GUI”

These attributes do not show up as environment variables when the notification script is called though.

How can these be accessed by notifications?

I have located them in environment variables but I’m unsure of the variable format.

They are located under NOTIFY_PARAMETERS and NOTIFY_PARAMETER_1, NOTIFY_PARAMETER_2, etc.

In WATO I have ‘call with the following parameters’ set and have tried the following formats with no luck:
$_HOSTCUSTOMNAME1$
$_CUSTOMNAME1$

When setting ‘call with the following parameters’ in a notification rule, variables are not being replaced:

I tested with $HOSTNAME$

When notification script is executed, environment reports:
‘NOTIFY_PARAMETER_1’: ‘$HOSTNAME$’

Is it possible to use variable names here?

I switched over to using host tags. Labels applied to hosts or folders work as well.

For host tags: ‘NOTIFY_HOSTTAGS’ (space separated tag list)
For labels: ‘NOTIFY_HOSTLABEL_labelname’

Hey @dan,

How did you select these HostTags for Notifications?

You don’t need to change anything to make them available for notifications. They are available in the environment variable: ‘NOTIFY_HOSTTAGS’.