What should I use for time on irate/rate?

Hey folks,

I’m new to Grafana and am trying to understand how time is used when generating irate/rate charts. We are using Prometheus as our primary datasource on a Kubernetes cluster using the stable/prometheus chart.

When I imported a dashboard from the marketplace, I noticed it had rate(query_field{app="selector"}[15s]). However, this resulted in “no data” on the graphs. If I changed 15s to 2m I started to get results.

From what I can see, Prometheus’ scrape defaults to 60 seconds. However, when I look at a graph with 2m set, I see data points every 15 seconds. As you can probably tell, I’m completely confused on what value to set for these queries.

Is there a guide somewhere, or someone have a minute to explain to me how to determine what this value should be?


The value in square brackets must be at least 2x of the scrape interval. This is Prometheus’ limitation. This limitation has been removed in VictoriaMetrics - long-term remote storage for Prometheus.
As for the rate vs irate, prefer rate, since irate doesn’t capture spikes.