Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-9603

New built-in macros and functions for timestamp tracking

XMLWordPrintable

    • S24-W50/51/52
    • 3

      Introduce new built-in macros and history functions in order to enhance time-related tracking capabilities for item values.

      1. Add macros {ITEM.VALUE.DATE}, {ITEM.VALUE.TIME}, {ITEM.VALUE.TIMESTAMP}, {ITEM.VALUE.AGE}, {ITEM.LASTVALUE.DATE}, {ITEM.LASTVALUE.TIME}, {ITEM.LASTVALUE.TIMESTAMP}, {ITEM.LASTVALUE.AGE}
        1. {*.DATE} - the date (YYYYMMDD) when item value was collected
        2. {*.TIME} - the time (HHMMSS) when item value was collected
        3. {*.TIMESTAMP} - the unix timestamp when item value was collected
        4. {*.AGE} - the time elapsed in seconds since item value was collected until macro evaluation
        5. Support in contexts where {ITEM.VALUE} is supported
        6. Support numeric indexes <1-9> in the context of trigger expressions
      1. Add history functions:
        1. lastclock(/host/key, <#num<:time shift>>) - returns the timestamp of the Nth most recent item value
        2. logtimestamp(/host/key, <#num<:time shift>>) - returns the log message timestamp of the Nth most recent log item value
          1. calculation of time-shift is based on the item value clock, not on the log message timestamp
        3. firstclock(/host/key, sec<:time shift>) - returns the timestamp of the oldest item value within evaluation period
        4. Examples:
          1. lastclock(/host/key, #2) - returns the timestamp of the 2nd latest value
          2. logtimestamp(/host/key, #3:now-1d) - returns the log message timestamp of the 3rd latest value one day ago
          3. firstclock(/host/key, 30m) - returns the timestamp of the first value within 30m until now

            sboidenko Sergejs Boidenko
            palivoda Rostislav Palivoda
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: