4

I am performing a query against some metric with a time range, say

sum_over_time(my_metrics{my_filter=~"filter_regex"}[4d])

What I am looking for is a way to determine if returned metrics were available for all 4 days. I want to bypass all returned values that were being gathared for less than 4 days.

It would be easy iy I knew what the first metric timestamp was. Is there any other way to acheive this?

Łukasz
  • 1,980
  • 6
  • 32
  • 52
  • 2
    Prometheus has no the corresponding functionality. Try using `lifetime` function from [MetricsQL](https://github.com/VictoriaMetrics/VictoriaMetrics/wiki/MetricsQL): `lifetime(my_metrics{my_filter=~"filter_regex"}[4d])` – valyala Jun 04 '20 at 17:39

0 Answers0