Too many points to visualize properly. Update the query to return fewer points

Hi Team,

I have a dashboard that displays service status in a time-series graph, with data sourced from InfluxDB. Currently, it can only show data for a 1-hour period. When I attempt to view data beyond that, I encounter the message: “Too many points to visualize properly. Update the query to return fewer points

I understand that this is due to the large number of data points, but is there a way to address this limitation?

The reason I’m asking is that I want to review when a service became unavailable over a 6-hour period, for example, without needing to filter the time range into smaller sections each time.

Any suggestions would be greatly appreciated.

Thank you all.

Don’t select raw data, but use aggregation function and aggregate by time time($__interval)

Example:
https://play.grafana.org/d/f62a0410-5abb-4dd8-9dfc-caddfc3e2ffd/eccb2445-b0a2-5e83-8e0f-6d5ea53ad575?orgId=1&var-fueltype=Hydro&var-fueltype=Nuclear&var-fueltype=Wind&var-type=Demand&var-region=Florida&var-region=New%20York&var-fueltype78=All&forceLogin=&from=now-15d&to=now&timezone=browser&refresh=&editPanel=1

hi @jangaraj , thanks for your response. I think I am doing the aggregation, below is my query.

please advise if I might be missing something here ?

from(bucket: "monitoring_metrics")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "win_services")
  |> filter(fn: (r) => r["host"] =~ /${DB_SERVER:regex}/)
  |> filter(fn: (r) => r["type"] == "DB")
  |> filter(fn: (r) => r["miles_env"] =~ /${MILES_ENV:regex}/)
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
  |> keep(columns: ["_time","_value","service_name"])

Provide reproducible example first. I bet you are not using time series panel.

ah appologise… its a Status History panel.

That v. windowPeriod is too fine/granular for this type of panel. Create custom interval variable - customize step count, e. g. 30 = Grafana will try to create aggregation window where only 30 values will be returned for selected time period. Select auto value (you may hide that variable then) and use it in the query instead of “magic” v.windowaperiod

thanks you @jangaraj for the insights… applied your suggestion.

1 Like