Ad Widget

Collapse

{Item.value1} and {item.value2} showing same value?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #1

    {Item.value1} and {item.value2} showing same value?

    I have a trigger expression that looks like this (this is the actual host's expression, that originates on a template's trigger prototype):

    Code:
    last(/OfficeSWXG/Speed[Port 9],#1)<>last(/OfficeSWXG/Speed[Port 9],#2)
    In the name of the trigger it looks like this:

    Code:
    Port 9 Speed change on port {ITEM.VALUE2} to {ITEM.VALUE1}
    When it fires, it shows like this (a cut/paste direct from the problem display when it is showing (and should be showing) a problem):

    Code:
    Port 9 Speed change on port 1 Gbps to 1 Gbps
    Always shows the same value. This despite the history showing a clear change (0 -> 1 then back). It's as though it is showing the same thing twice.

    The trigger is working, the values are right in the item history, everything is right but the title.... the title seems to be picking one of them twice instead of each separately. Is that because it's the same item (but a different last instance)? Bug? Am I doing something wrong syntactically?
  • troffasky
    Senior Member
    • Jul 2008
    • 565

    #2
    "indexed macros" refer to items by their position in the trigger expression, not by their values in time. Value1 and Value2 are the same item, so you see the same value twice.

    I am not sure what the solution is. There probably is one.

    Comment

    • BP_Vital
      Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Feb 2016
      • 42

      #3
      Try {FUNCTION.VALUE1} and {FUNCTION.VALUE2}, those supposed to resolve to the values of the first and second item-based functions at the time of the event.

      Comment

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

        #4
        Function macros or expression macros. In this case function ones seem more appropriate..

        Comment

        • Linwood
          Senior Member
          • Dec 2013
          • 398

          #5
          Function took care of it. I had not even noticed those existed, been a long time since I wrote new trigger expressions. Thank you BP_Vital and cyber you nailed it.

          Comment

          Working...