Hi, I’m currently playing around with alert checks, but have a couple questions about setting the length of time for when I want a threshold alert to trigger and go back to the okay status.
For context, I’m creating an alert for checking cpu-total and have it configured so that it goes to critical when above 80% usage and back to okay below 81% usage.
How can I set the length of time for when I want the ‘Critical’ threshold level to be set? For e.g. I would only want the ‘Critical’ alert to be sent out if the cpu usage has been over 80% for 10 mins.
Can I separately set the length of time for when the cpu usage goes below 81%? For e.g. I’d want the ‘Okay’ level alert to be sent out once the cpu usage drops below 81% for 5 mins.
I am pretty sure you can create two separate rules (one for when CPU usage has been over 80% for 10 min, and another for when the CPU goes below 81% for 5 min).
Yes, this looks like something that would help with this. However, I’m not too familar with Flux, how would I implement that stateDuration() line in my check below?