Ad Widget

Collapse

Referencing Macros in Trigger Title

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tomstocker
    Junior Member
    • Jan 2024
    • 16

    #1

    Referencing Macros in Trigger Title

    Hi all

    I've activated our new triggers described in:



    Now I've referenced the Macro in the Trigger title as like:

    Dynamic largedisk: Free disk space is less than {$TR_LARGEDISK_LOW_DISASTER} on FS {#FSNAME}

    It always evaluates to the values from the global Macro for {$TR_LARGEDISK_LOW_DISASTER}.

    I guess there is no way to reference which value it should evaluate to (global - template - host macro)? It should basically always take the hierarchically lowest available.

    Thank you guys
  • Answer selected by tomstocker at 19-03-2024, 11:47.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    Zabbix resolves macros according to the following precedence:
    1. host level macros (checked first)
    2. macros defined for first level templates of the host (i.e., templates linked directly to the host), sorted by template ID
    3. macros defined for second level templates of the host, sorted by template ID
    4. macros defined for third level templates of the host, sorted by template ID, etc.
    5. global macros (checked last)
    https://www.zabbix.com/documentation...os/user_macros
    It should be the other way It will take the one that it finds first...
    Looking at that other topic, it looks like it resolves exactly to what it should resolve... You have somewhere (globally? in template? ) defined those {$TR_SMALLDISK_LOW_WARNING} etc triggers ... Or have you tried to override them at some point?

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #2
      Zabbix resolves macros according to the following precedence:
      1. host level macros (checked first)
      2. macros defined for first level templates of the host (i.e., templates linked directly to the host), sorted by template ID
      3. macros defined for second level templates of the host, sorted by template ID
      4. macros defined for third level templates of the host, sorted by template ID, etc.
      5. global macros (checked last)
      https://www.zabbix.com/documentation...os/user_macros
      It should be the other way It will take the one that it finds first...
      Looking at that other topic, it looks like it resolves exactly to what it should resolve... You have somewhere (globally? in template? ) defined those {$TR_SMALLDISK_LOW_WARNING} etc triggers ... Or have you tried to override them at some point?

      Comment

      • tomstocker
        Junior Member
        • Jan 2024
        • 16

        #3
        It works correctly, it evaluates in the messages. Just not in the title, there I have the initial values like: Dynamic largedisk: Free disk space is less than 2%

        I think I can live with that, thank you cyber.

        Comment

        Working...