How to get first value of a metric if count is above a certain threshold

50 views
Skip to first unread message

श्री

unread,
Feb 19, 2021, 3:09:14 AM2/19/21
to Prometheus Users
Usecase:
I am trying to get the first value of a metric if  count is above a certain threshold in order to get labels.

I am trying "expr" like :

------------------------------------------------
IF 
count(probe_success == 0) > 100
THEN
probe_success == 0 | first  
------------------------------------------------  
The problem is, I am unable to get "instance" label when using count function and hence I am unable to pass it to receiver which has a mandatory condition for instance name.
Reply all
Reply to author
Forward
0 new messages