Ad Widget

Collapse

Check for an item value if it is from today

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #1

    Check for an item value if it is from today

    I have a prototype item that basically receives a file write timestamp in unixtime which indicates its last arrival time.
    Everyday a new file is created with the same name and Zabbix receives its arrival timestamp.

    Now, I wanted to create a trigger that checks if there is a new file arrival time for the current date.
    For now, my raw logic is something like this:
    Between 00h and 02h30 there should be a new file coming, and should it not arrive, it is a delay; therefore, an event should be created.
    Code:
    if time() > 023000 and last(file timestamp) <> today, then trigger alarm.
    I'm not sure how to create that trigger.
    How should I read the date from that item (timestamp value)?
    Last edited by markfree; 20-09-2022, 02:35.
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #2
    For now, I have tried something like this.
    Code:
    nodata(/host/key[{#NAME.SUFFIX}],4h)=1
    and
    time()>040000
    and
    dayofweek()>=2
    and
    dayofweek()<=6
    But this expression does not account for "Discard unchanged" preprocessing, which my item uses.
    So, it always triggers after 04h.​

    Any thoughts?

    Comment

    Working...