Ad Widget

Collapse

Value Mapping vs Macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JeffNL
    Junior Member
    • Mar 2020
    • 17

    #1

    Value Mapping vs Macros

    I have created a template which contains running an external script to check if a route change has been detected.
    We use redundant connections and want to monitor which connection is the active one.
    The following macros have been added in that template:

    {$IPROUTE1}
    {$IPROUTE1NAME}
    {$IPROUTE2}
    {$IPROUTE2NAME}

    The result of the external script can be:
    0 = error
    1 = route 1 active
    2 = route 2 active

    I wanted to use “value mapping” to translate the result to a more human readable result to show in “latest data”.
    Therefore I created this value mapping in the template:

    equals 0 = Error
    equals 1 = {$IPROUTE1NAME}
    equals 2 = {$IPROUTE2NAME}

    At some host I have these macros defined:

    {$IPROUTE1NAME} = Glasvezel
    {$IPROUTE2NAME} = NLIX

    The result is that in latest data of the host this is shown when route 1 is the active one:

    {$IPROUTE1NAME} (1)

    instead of the wanted/expected:

    Glasvezel (1)

    Can it be made possible to use macros in value mappings?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    No you cannot use macros there.

    Comment


    • JeffNL
      JeffNL commented
      Editing a comment
      I posted this under "Zabbix Suggestions and Feedback", so my question is actually a feature request ;-)
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #3
    Oh, I never pay any attention to subforums..:P
    Better submit a request to https://support.zabbix.com/projects/ZBXNEXT/ where it can get more attention. And can be upvoted by other people.

    Comment

Working...