Ad Widget

Collapse

Trigger expression with boolean values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bubbagump
    Junior Member
    • Sep 2021
    • 18

    #1

    Trigger expression with boolean values

    This seems like an extremely simple task, but I am flummoxed. I am using the HTTP agent to monitor an endpoint that returns JSON. I have the pre-processing working such that the value I want is being monitored. 1 = good 0 = broken. This shows up perfectly well in Latest Data when I test and graphs all work. Now I want to make a trigger that says if the value of this item = 0 for more than 15 minutes, do a thing. I have been trying to get this to work with last() with no luck. Last() is always triggering after 1 minute. I have tried
    Code:
    {SomeHost:SomeCheck.last(15)}=0
    which still triggers at one minute.
    Code:
    {SomeHost:SomeCheck.last(#15)}=0
    seems wrong based on the docs saying
    "Last(#3) - third most recent value (not three latest values)"
    Any help is greatly appreciated.
  • Bubbagump
    Junior Member
    • Sep 2021
    • 18

    #2
    Ah, max() seems to work a treat. Thank you!

    Should I understand that any where I see
    sec or #num - maximum evaluation period1 in seconds or in latest collected values
    I can use m, h, d in the function as well?

    Comment

    • Bubbagump
      Junior Member
      • Sep 2021
      • 18

      #3
      Derp, I see now in the footnote
      3) For all trigger functions sec and time_shift must be an integer with an optional time unit suffix and has absolutely nothing to do with the item's data type.

      Comment

      Working...