English 中文(简体)
How to specify time range in {aggregate}_over_time?
原标题:

I have a Grafana chart that makes use of the sum_over_time(data_source[$__interval]) and count_over_time(data_source[$__interval]) command in Prometheus. Normally, it is working fine.

But, the commands don t run correctly when I set time range to a moment in the past, for example from now-3h to now-2h. For that example, the $__interval in the command become 1h and the commands roll for data from 1 hour ago to now, which is not what I intended.

Is there any way to archieve that time range in Prometheus? Please help!

问题回答

暂无回答




相关问题
Prometheus Java client manually exposing prometheus end point

I have a spring boot application where for certain legacy reasons I cannot use spring actuator. I was able to expose a prometheus end point and see a lot of default metrics. But I am not able to see ...

Grafana interval variable: minimum threshold function?

I m adding an interval variable to a dashboard to allow averaging some prometheus time series over an interval to get cleaner looking graphs. But I want to leave in the base sample rate (15s) so the ...

How to specify time range in {aggregate}_over_time?

I have a Grafana chart that makes use of the sum_over_time(data_source[$__interval]) and count_over_time(data_source[$__interval]) command in Prometheus. Normally, it is working fine. But, the ...

how to regex path in prometheus relabel_configs

i have a metric and label like this: namedprocess_namegroup_num_procs{groupname:"/data/home/user01/app.service.1/service"}, i want to get the last field: service, and the number in last but ...

Omit labels from series results PromQL

Suppose I write a basic PromQL query like this Query: kube_deployment_spec_replicas{} Result: kube_deployment_spec_replicas{deployment="mydeployment",endpoint="myendpoint",instance="myinstance",...

Last known timestamp of a metric sample?

How do I get the timestamp of the last known sample of a metric? I want to display a table that lists when was the last time a specific service was running before it disappeared (died or whatever). ...

热门标签