Ad Widget

Collapse

How to use trigger tag values in webhook alert script in Zabbix?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tuomas3000
    Junior Member
    • Dec 2019
    • 2

    #1

    How to use trigger tag values in webhook alert script in Zabbix?

    I would like to use trigger specific values in webhook alert script parameters in Zabbix (eg. wiki link, whether to send SMS).

    When I use {EVENT.TAGS} macro, I get a comma separated list of event tags and their values: TAG1:TAG1value, TAG2:TAG2value, TAG3:TAG3value, ...

    But when I try to get the value of a specific tag with {EVENT.TAGS.<tag name>} macro, for example with {EVENT.TAGS.ALERTWIKILINK}, the value does not get passed to webhook script. It gets passed as: {EVENT.TAGS.ALERTWIKILINK}.

    I have been debugging with Zabbix webhook eventlog.

    Zabbix version is 4.4.1.
    Last edited by tuomas3000; 02-12-2019, 14:45.
  • tuomas3000
    Junior Member
    • Dec 2019
    • 2

    #2
    This can be accomplished with a few lines of javascript. Although it would be nice if this could be done with {EVENT.TAGS.<tag name>} macro.

    I have posted my workaround to stack overflow: https://stackoverflow.com/a/59193770/539043

    Comment

    Working...