Using Custom Host Attribute in Notification (Mail, Telegram)

Hi all,

is it possible to use a custom host attribute in mail notification and third party script like telegram?

br
Dennis

Hi,
have a look at this kb article:

https://kb.checkmk.com/display/KB/Custom+attributes

Karl

1 Like

hi,

  1. custom attribute set: “location”

  2. set log level for notfications to “Full dump of all variables…” but there is no variable like “*_*LOCATION”

  3. is it possible, that the variable is called “NOTIFY_HOST_LOCATION”?

BR
Dennis

Hi,

just saw in variable list, HOSTLABELS could also beeing used for my case. Set a HOSTLABEL like “location:example” and used then “NOTIFY_HOSTLABEL_location” in telegram notify script. Works like expected…

@kdeutsch or would you say working with hostlabels for this usecase is not the preferred solution in cmk?

Hi @dns_es ,
that depends on the operational scenario: Custom host attributes are static, host labels are very dynamic. They can also arise at runtime from scripts, discovered processes, etc. I would probably rather do the solution with labels …

Karl

1 Like

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.