Hi Thank you for your reply.
I tried this querry in alerts as well as as in prometheus dashboard alerts
9090.
There is no alert fired even though i changed
max_over_time(probe_success{job="abc"}[5m]) == 0
other alerts like slow probes etc are firing. I am not sure this the
correct querry i have used. there are instances which are down for more
24hrs. so in my case i should have a alert fired.
Does the alert will wait till 24hrs and then fired?
On Wednesday, March 17, 2021 at 4:25:31 AM UTC+5:30 [email protected]
wrote:
> Use the fact that it's a number and you can take the maximum of all values
> in the last 24 hours:
>
> max_over_time(probe_success{job="abc"}[24h]) == 0
>
> No for clause needed in this case.
>
> /MR
>
> On Tue, Mar 16, 2021, 20:59 Amit Das <[email protected]> wrote:
>
>> Hi,
>> I would like to get alerts if my blackbox exporter targets are down for
>> more than 24hrs.
>>
>> I have used
>> "for 24h"
>> which is not correct. I am looking for alert rules
>>
>> probe_sucess=0{job="abc"} > 24h then i should get the alert triggered.
>>
>> Can someone correct the syntax
>>
>> thanks
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Prometheus Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/prometheus-users/66de0c3d-2ce1-42d6-92b4-6a64137d4950n%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/prometheus-users/66de0c3d-2ce1-42d6-92b4-6a64137d4950n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/7e6ed385-fcec-402b-a0f4-75816b5ff168n%40googlegroups.com.