Ad Widget

Collapse

Template macro used in trigger prototype not updating

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marian@mari.cz
    Junior Member
    • Aug 2019
    • 4

    #1

    Template macro used in trigger prototype not updating

    Hi all Zabbixers, I have a little issue with using Macro in Trigger prototype. I did update a value in this macro, however already generated triggers from this macro are still using old value.

    Let see standard Template in Zabbix installation "Template Module Interfaces Simple SNMPv2", there is Macro value {$IF_UTIL_MAX} equal 90 by default.

    I did change this value to 95, however all triggers are still generating alarm using value of 90.

    Trigger expression is defined as:


    ({Template Module Interfaces Simple SNMPv2:net.if.in[ifInOctets.{#SNMPINDEX}].avg(15m)}>({$IF_UTIL_MAX:"{#IFNAME}"}/100)*{Template Module Interfaces Simple SNMPv2:net.if.speed[ifSpeed.{#SNMPINDEX}].last()} or {Template Module Interfaces Simple SNMPv2:net.if.out[ifOutOctets.{#SNMPINDEX}].avg(15m)}>({$IF_UTIL_MAX:"{#IFNAME}"}/100)*{Template Module Interfaces Simple SNMPv2:net.if.speed[ifSpeed.{#SNMPINDEX}].last()}) and {Template Module Interfaces Simple SNMPv2:net.if.speed[ifSpeed.{#SNMPINDEX}].last()}>0


    Can you please explain, where the connection between Macro value of {$IF_UTIL_MAX} in Template and actually generated triggers on host is? In other words, how does Zabbix know what value (from what template) of Macro {$IF_UTIL_MAX} to use?

    Thank you for any advice.
    Last edited by [email protected]; 12-08-2019, 15:27. Reason: Solved.
  • zux
    Member
    • Sep 2018
    • 93

    #2
    Go to a host -> Macros -> Inherited and global macros and check what's actually used in there
    a macro on a host overrides macro on template, macro on template overrides global.

    Comment

    • marian@mari.cz
      Junior Member
      • Aug 2019
      • 4

      #3
      Thank you, I never realized that menu before. Now I spotted my problem. AS I applied more templates to this host (those are clones of the original one) only first template macro value was inherited to the hosts. When I changed macro value on third template, it never changes back on host.

      Appreciate you input, very helpful.

      Comment

      Working...