Ad Widget

Collapse

How to trigger only after 10m below 10

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cyberphantom
    Member
    • Dec 2021
    • 67

    #1

    How to trigger only after 10m below 10

    Hello,

    First of all, there are many questions like this on the forum, and I have already checked the documentation. However, I still seem to be making a mistake.
    I have an item that is 0 most of the time, but there are times when it gradually increases. I want the trigger to activate ONLY if the value remains below 10 for 10 minutes. So, I created this expression:
    last(/AVS-Nodes/cpu_average[test_metrics,{#INSTANCEID},cpuUsageAverage]) > 0 and min(/AVS-Nodes/cpu_average[test_metrics,{#INSTANCEID},cpuUsageAverage], 10m) < 10
    The problem is that the trigger is firing at the same time when the item's value is higher than 0 but less than 10, and not 10 minutes later below 10.
    What's the issue? I'm asking because I've tried it multiple times in different ways, but the problem persists
    Note: The item is executed every 5 minutes (scheduling interval: m/5).
    Last edited by cyberphantom; 04-10-2023, 21:15.
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Quick read, but I think you need max, not min on the 2nd test.

    Comment


    • cyberphantom
      cyberphantom commented
      Editing a comment
      I've changed it to the maximum value, but the issue persists. The trigger activates exactly at the moment when the CPU average is less than 10 and not when the CPU average remains below 10 for more than 10 minutes:
      last(/AVS-Nodes/cpu_average[ec2_metrics,{#INSTANCEID},cpuUsageAverage])>0 and max(/AVS-Nodes/cpu_average[ec2_metrics,{#INSTANCEID},cpuUsageAverage],10m)<10
      I understand that, according to documentation, this expression would be right for my objective...
Working...