Probably because the dashboard query is using a rate with a fixed interval, 
e.g.
    rate(foo[2m])
This won't work with a scrape interval of 2m, because the 2m time range 
only includes one data point, and at least two data points are required to 
calculate a range.

Firstly, change the query to:
    rate(foo[$__rate_interval])

Then go to Grafana settings, Prometheus data source, and configure the 
actual scrape interval you are using.

$__rate_interval returns the larger of:
* 4 times the configured scrape interval; or
* the configured scrape interval plus the interval between points on the 
graph (when zoomed out a long way)

See: 
https://grafana.com/docs/grafana/latest/datasources/prometheus/#using-__rate_interval

On Wednesday, 2 March 2022 at 09:48:45 UTC [email protected] wrote:

> Hello All,
>
> If the scrape interval is 15 seconds I am able to see CPU used in the  
> GRAFANA dashboard. but if the scrape interval is 2 minutes I am not able to 
> see CPU used in the  GRAFANA dashboard. what could be the reason behind 
> that?
>
> and we can set scrape interval at max 2 minutes right? then why I am 
> unable to see CPU used in GRAFANA dashboard
>

-- 
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/a6984953-31d4-44cd-ae12-99e9dcfbc41fn%40googlegroups.com.

Reply via email to