When using time series chat:
i view 24 hours of data i get every 1m
i view 7 days of data i get every 7m
i view 30 days i get every 30m
i view 60 days i get every 60m
can i stop the aggregation so that when i view 60 days i get every one minute?
When using time series chat:
i view 24 hours of data i get every 1m
i view 7 days of data i get every 7m
i view 30 days i get every 30m
i view 60 days i get every 60m
can i stop the aggregation so that when i view 60 days i get every one minute?
Hi @danielarkins
What is your datasource and can you share your query?
it is a simple query of host cpu utilization like host_cpu_used_pct{host=“<hostname”}
In Grafana, Prometheus automatically adjusts the resolution of the data based on the time range you’re viewing to avoid querying too much data at once. However, you can control the query resolution using the step
parameter in your PromQL query to specify that you want a specific interval (e.g., 1 minute) for all time ranges.
To get data points at a 1-minute interval over any time range (e.g., 60 days), you can modify your query in Grafana using the rate()
or avg_over_time()
function along with a fixed step
interval.
Here’s how you can do that:
1m
to ensure that Grafana requests data at 1-minute intervals.rate()
or avg_over_time()
function and the step
parameter.rate(host_cpu_used_pct{host="my-server"}[1m])
This will calculate the rate of CPU usage over 1-minute intervals, and you will still get 1-minute resolution no matter how large the time range is.
@
to specify a fixed step:host_cpu_used_pct{host="my-server"} @ 60s
Also, ensure you adjust the “Max data points” option in Grafana’s query options to a high enough value to avoid Grafana downsampling the data.
sorry not geting it. doing this:
avg_over_time(host_cpu_used_pct{host=“”}[1m])
over 30 days with max data points at 2000000, i still get data every 5 minutes when my collection is occuring every 15s