Prometheus can return all values for a time (e.g. api_counter[1h]
for all values in the last hour). When the metric is new, there will not be 1 hour of data points. Is it possible to write a promql query which only returns data if there is data from 1 hour ago?
I want to do (e.g.) rate(api_counter[1h])
, but not return any data for the first hour, because there won't be 1 hour's worth of data available, so I want to just return nothing.
Prometheus v2.15 installed via apt on Ubuntu Linux 20.04. I am new to prometheus, please