Ad Widget

Collapse

Trigger question, is compare on non existing previous item value possible?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • toj
    Junior Member
    • Oct 2023
    • 8

    #1

    Trigger question, is compare on non existing previous item value possible?

    Hi

    Im trying to trigger if the previous item value is not the same as "current/last" item value, but trigger only fires if there is a item value in history aka if a previous item value exists.
    In my world a item value that does not exists should not be equal to one that does, is what im trying to do just not possible in zabbix?

    # My Trigger
    count(/Zabbix server/log[/var/log/my.log],#1,"regexp","ERROR")>0 and last(/Zabbix server/log[/var/log/my.log],#1)<>last(/Zabbix server/log[/var/log/my.log],#2)

    // Torben
  • Answer selected by toj at 16-04-2024, 12:41.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    How long you keep history, so you end up having no more than one value there?
    Otherwise its quite understandable, that you cannot make proper calculation if some values are unknown... There are some cases, where it works, but not in this case, I think...

    Comment

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

      #2
      How long you keep history, so you end up having no more than one value there?
      Otherwise its quite understandable, that you cannot make proper calculation if some values are unknown... There are some cases, where it works, but not in this case, I think...

      Comment

      • toj
        Junior Member
        • Oct 2023
        • 8

        #3
        Ok, that ofc. makes sense.

        Thanks a lot for the anwser.

        Comment

        Working...