Ad Widget

Collapse

function last valid data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skipzoid
    Junior Member
    • Jul 2019
    • 20

    #1

    function last valid data

    hello.

    We have a device that goes off line from time to time, so often there is nodata() - however I would like to know the last valid value before nodata()

    is this possible ?

    Cheers,
  • Todd69
    Junior Member
    • Apr 2022
    • 1

    #2
    I am looking for the same, so jumped into your thread. Hope someone help.
    My CC Pay

    Comment

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

      #3
      {ITEM.LASTVALUE} → Trigger-based notifications and commands
      → Problem update notifications and commands
      → Trigger names, event names, operational data and descriptions
      Tag names and values
      → Trigger URLs
      → Manual event action scripts
      → Description of item value widget
      The latest value of the Nth item in the trigger expression that caused a notification.
      It will resolve to *UNKNOWN* in the frontend if the latest history value has been collected more than the Max history display period time ago (set in the Administration→General menu section).
      Note that since 4.0, when used in the problem name, it will not resolve to the latest item value when viewing problem events, instead it will keep the item value from the time of problem happening.
      It is alias to last(/{HOST.HOST}/{ITEM.KEY}).
      Customizing the macro value is supported for this macro; starting with Zabbix 3.2.0.

      This macro may be used with a numeric index e.g. {ITEM.LASTVALUE<1-9>} to point to the first, second, third, etc. item in a trigger expression. See indexed macros.

      Comment

      • skipzoid
        Junior Member
        • Jul 2019
        • 20

        #4
        Originally posted by cyber
        {ITEM.LASTVALUE} → Trigger-based notifications and commands
        → Problem update notifications and commands
        → Trigger names, event names, operational data and descriptions
        Tag names and values
        → Trigger URLs
        → Manual event action scripts
        → Description of item value widget
        The latest value of the Nth item in the trigger expression that caused a notification.
        It will resolve to *UNKNOWN* in the frontend if the latest history value has been collected more than the Max history display period time ago (set in the Administration→General menu section).
        Note that since 4.0, when used in the problem name, it will not resolve to the latest item value when viewing problem events, instead it will keep the item value from the time of problem happening.
        It is alias to last(/{HOST.HOST}/{ITEM.KEY}).
        Customizing the macro value is supported for this macro; starting with Zabbix 3.2.0.

        This macro may be used with a numeric index e.g. {ITEM.LASTVALUE<1-9>} to point to the first, second, third, etc. item in a trigger expression. See indexed macros.
        Thank you for your cut and paste of the documents, could you put some explaination to it to help me understand what it was you are suggesting to help find a solution.
        thanks.

        Comment

        • ripperSK
          Member
          • Jul 2019
          • 42

          #5
          to answer: "however I would like to know the last valid value before nodata()"

          Suppose you have data from item "Processor load (1 min average per core)" from the host till 8:00 am and monitoring happens every one minute.
          Right at 8:01 you receive "nodata" from this check - your trigger will fire and you will receive an alert.


          0) wake up in time that the actual data is not lost to "item history period" on zabbix server
          1) go to host latest data
          2) filter for "Processor load (1 min average per core)"
          3) click on the item and select "values"
          4) select time interval - let's say from 7:55 till 8:00
          5) look at the last measured values


          if the question involves some automation of the above steps - look into Zabbix API Docs - it will probably have API call to get the item value during a specific time.
          Attached Files

          Comment

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

            #6
            Originally posted by skipzoid

            Thank you for your cut and paste of the documents, could you put some explaination to it to help me understand what it was you are suggesting to help find a solution.
            thanks.
            As its description starts "The latest value of the Nth item in the trigger expression that caused a notification."... Try to use mentioned macro in your opdata or trigger name, as macro definition says.. "Macros resolve to a specific value depending on the context"

            Comment

            Working...