Ad Widget

Collapse

Zabbix user macros in media type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manhquanxhome
    Junior Member
    • Feb 2020
    • 2

    #1

    Zabbix user macros in media type

    I have a custom media type (script) that accepts a number of parameters. One of them is some info on a location (country-like), so I created a global macro:
    {$CELL_NAME} with a default value (which I can then override per host).
    Now the issue is in the script executed by the trigger (media type) to create alerts: it seems it doesn't resolve this global macro when I "test" the newly created media type, but instead it seems to literally pass "{$CELL_NAME}" to my custom script. Is this not supported?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    I can't tell from the list of user macros supported by location whether what you're trying to do should work or not.

    It seems to me like the following lines from that document:
    • Trigger-based notifications and commands
    • Trigger-based internal notifications
    imply that it would work, but the documentation isn't completely clear.

    You may want to do some searching in the Zabbix bug tracker, to see if you can find anything about user macros in custom media types. If nothing else, it might be worth opening a bug report against the documentation?

    Comment

    Working...