Ad Widget

Collapse

How does last (seconds) trigger function work?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • registration_is_lame
    Senior Member
    • Nov 2007
    • 148

    #1

    How does last (seconds) trigger function work?

    How does it work? Does it query every minute and fetch all 3600 seconds values to validate?

    Which is better for smooth performance? The goal is to trigger if the value is 30 and hasn't changed not even once for last 1 hour.

    {Template: item_key.last(,3600)}= 30}

    OR

    {Template: item_key.min(60m)} =30)


    Also another question:

    In the documentation they mention

    last (sec|#num,<time_shift>)

    The most recent value.

    sec (ignored) or #num - the Nth most recent value
    time_shift (optional) - see avg()


    What do they mean "Ignored"? Is last (,60) seconds ignored?

    Last edited by registration_is_lame; 26-05-2017, 12:28.
  • registration_is_lame
    Senior Member
    • Nov 2007
    • 148

    #2
    I figured it.

    last (,60) is the value of last minute value, so 3600 is the value of 3600.

    min is the function to use if you want to trigger if value is constant for 1 hour.

    Comment

    Working...