Ad Widget

Collapse

Comparing multiple items together

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mixmox
    Member
    • Apr 2020
    • 54

    #1

    Comparing multiple items together

    hey
    i have 10 agent that send OS version to my zabbix server to item : OS.VERSION
    im looking for solution that if THESE agents trigger OS.VERSION were the same, so everything is fine, otherwise trigger send and alarm about it, like one of agents version is out ot date
  • vladimir_lv
    Senior Member
    • May 2022
    • 240

    #2
    Hi!
    Probably, this helps you
    Code:
    last(/Workstation/system.sw.os[name],#1)<>last(/Workstation/system.sw.os[name],#2)

    Comment

    • mixmox
      Member
      • Apr 2020
      • 54

      #3
      Originally posted by vladimir_lv
      Hi!
      Probably, this helps you
      Code:
      last(/Workstation/system.sw.os[name],#1)<>last(/Workstation/system.sw.os[name],#2)
      tx from your reply, if i have 10 item i have to add 10 times ?
      and im not familar which the string, if template name was TEMPLATE and item ITEM, can you update em how fill this string ?

      last(/Workstation/system.sw.os[name],#1)<>

      Comment

      • vladimir_lv
        Senior Member
        • May 2022
        • 240

        #4
        Workstation is the name of my test VM, so you can replace it with your template name.
        This expression just compares the new value and the last value, it means that for the next checking time the problem should be resolved because the new and the last value will be equals. Probably the best way is to create a template, for example, "Check OS name and version", with macros {$OSNAME} = Your_OS and create item system.sw.os[name] and trigger last(/Check OS name and version/system.sw.os[name],#1)<>{$OSNAME} there.

        Comment

        • mixmox
          Member
          • Apr 2020
          • 54

          #5
          I probably did not explain the problem correctly. i dont want to check version , need to compare 10 items if they have same value its OK, If one of the items is different, issue a warning. Because all items must have the same value.
          also zabbix-agent on hosts send value to zabbix server.

          Comment

          Working...