Hi fellows,

I want to get the timestamp or the time passed since a certain metric has 
been a certain value, like 1 in this case:

I have an enum value (can make it a Gauge too, if needed) and want to see, 
when it has been at a certain state the last time, hence getting the 
timestamp of it. The state in question:
my_metric{label="custom_thing: a"} 1

Currently the metric is this state since couple days:
my_metric{label="custom_thing: b"} 0

Output expected after query:
my_metric{label="custom_thing: a"} 1590743254.8581
or
my_metric{label="custom_thing: a"} [email protected]


When I run 

my_metric{label="custom_thing: a"}[1w]

I end up in seeing the timestamps in question, if the change has been 
within the last week. That approach would be sufficient, I could do 
different ranges to workaround it. Still the output is like
1 @1590743254.858
1 @1590743554.858
1 @1590743854.858

but I can't just get the most recent timestamp of these. 

Any ideas would be appreciated.

BR;v

-- 
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/c9eb9f0b-220e-4a02-8a57-84b4390f6981o%40googlegroups.com.

Reply via email to