Ad Widget

Collapse

Last and prev value for trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bforpc
    Junior Member
    • Jan 2024
    • 15

    #1

    Last and prev value for trigger

    Hello,

    i have this trigger every minute running;

    Code:
    last(/workerproc/proc.num[{$PROC_NAME2},,,{$PROC_CMD2}])<>1
    sometimes, the last value is 0 but it is not a failure. Only if the last and prev values are 0, then the trigger should release.
    So ist should be a expression with an "and" statement of the two values.

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

    #2
    last(/host/item,#1)=0 AND last(/host/item,#2)=0

    Comment

    • bforpc
      Junior Member
      • Jan 2024
      • 15

      #3
      Hi cyber,
      this works.
      In the documemnattion, i havent found this.
      Live can be easy :-)
      Thank you
      Bfo

      Comment

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

        #4
        Which part you did not find? This one?
        https://www.zabbix.com/documentation...ctions/history
        last (/host/key,<#num<:time shift>>)
        The most recent value. See common parameters.

        #num (optional) - the Nth most recent value

        Comment

        • ZabiiTech
          Junior Member
          • Feb 2024
          • 1

          #5
          I have a similar question, I have a trigger that I want to alert me when the last value is either 0 or nodata or error to provide an alert any recommendations? This what I have sofar.

          last(/TRIALCD/pinggoogleipv6)=0

          Comment

          • bforpc
            Junior Member
            • Jan 2024
            • 15

            #6
            Originally posted by cyber
            Which part you did not find? This one?
            https://www.zabbix.com/documentation...ctions/history
            last (/host/key,<#num<:time shift>>)
            The most recent value. See common parameters.

            #num (optional) - the Nth most recent value
            Of course, if you know where the needle is in the haystack. Tons of documentation, some from zabbix itself, which describe a completely different approach, or on the Internet, which are completely out of date.
            So be it. With the help above I was able to solve the problem.
            So thank you.

            Bfo

            Comment

            Working...