How I can configure the alert to monitor every 1s for one hour

Thanks in advance!
How I can configure the alert to monitor every 1s for one hour. If the total of seconds is more than 300s (not continually just the total) during the one hour will send an alert.
For example:
From 10:00 to 11:00 I want to be checked every second
If grafana found an issue at 10:10.10 this will be the first second
If grafana found an issue at 10:17.02 this will be the other second.
.
.
.
.
. etc.
If the total of these seconds during the one hour is above 100 seconds grafana will send an alert.
@grafahna

Can anyone help me with that?

Hello Moh

Have you tried the built-in alerting feature from Grafana?

When you create a new rule, there are a few steps you must complete.

The following is an image from one part of those steps

The A part is the query to execute. This will be the part where you retrieve data.
The B part would be checking the “Alerting” condition. Or part of it.
The C part would be what you are looking for. You want the B condition to be satisfied an x number of times and I believe this could at least lead you on the path you want.

Please let us know if this was helpful to you

1 Like

Thank you very much for your response @TaiyoShin
I am using Grafana 8.3

The idea is to check every 1s (From now to the last hour) if the total of 1s is 3m( not continually) will alert so I do not receive an alert every time it happened (very second) just when happened many times and the total is 3m.