Grafana dashboards not working for long range queries

  • What Grafana version and what operating system are you using?

Grafana v10.0.2 (b2bbe10fbc) , OS:- Red Hat Enterprise Linux 8

  • What are you trying to achieve?

Querying/accessing data for beyond 30 days through Grafana UI

  • What happened?
    Dashboards are not rendered, only works when opened in edit mode.

  • What did you expect to happen?

dashboards should be rendered seamless

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No errors

Welcome to forum @asokdaya

What is the datasource you are querying?

Prometheus

what happens if you ran that same query in prometheus querying tool(s)

it loads fine.

save your dashboard, leave it, come back and hit refresh. also check your browser’s web console for any errors.

in edit mode

@yosiasz please let me know if you want me to check anything

Use time aggregated data and not raw data.

@jangaraj could you please let me know where I can set this

In your query. Please calculate how many datapoints you have for 120days

@jangaraj Did not set any value, it is set to default.
**
image
**

Let me predict it for you. Let’s say you are collecting metric every minute, so 120 days = 120 * 24 * 60 = 172800 datapoints - how can you visualize line with 172800 points on display with 4k pixels width (let’s assume you have 4k monitor)? Do you see that point?
So you should rather use time aggregation so your query will generate for example one datapoint per day (e.g. average value for that day) => only 120 datapoints will be generated.

ok, can this be resolved by downsampling data

It depends. Time aggregation is not downsampling. You can still have raw data if you need them. that’s not possible with downsampling.

BTW:

thank you @jangaraj - I will test this out and get back