dan
(Dan)
April 11, 2021, 8:25pm
1
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?
dan
(Dan)
April 12, 2021, 5:16am
2
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$
dan
(Dan)
April 12, 2021, 5:33pm
3
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?
dan
(Dan)
April 12, 2021, 8:21pm
4
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’
Flolo
(Flo)
November 23, 2021, 9:42am
5
Hey @dan ,
How did you select these HostTags for Notifications?
dan
(Dan)
November 23, 2021, 3:18pm
6
You don’t need to change anything to make them available for notifications. They are available in the environment variable: ‘NOTIFY_HOSTTAGS’.
Is there way to get hosttag as key value pair ?
Regards,
DD
system
(system)
Closed
April 19, 2023, 7:55am
8
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.