Open tonypowa opened 4 weeks ago
This issue is a test copy of an issue in another repo. Original issue: https://github.com/grafana/grafana/issues/#90313
Summary: InfluxDB graphs in a dashboard intermittently display an 'unauthorized access' error, despite data source tests passing. Issue remains open and unpredictable behavior occurs upon dashboard refreshes.
Elaboration:
Hi @tonypowa, thank you for taking the time to report this issue. To help us address this unpredictable behavior with your InfluxDB graphs, could you please provide a little more information? This will enable us to better understand and troubleshoot the problem you're encountering. Here are some questions and requests that could help us move forward:
Once we have these additional details, we'll be in a better position to understand what might be causing this sporadic unauthorized access error with InfluxDB on your Grafana dashboard.
Thanks again for your contribution to the community!
Hi @tonypowa, it seems like you are experiencing intermittent authorization issues with InfluxDB within Grafana. This could be related to the Grafana backend or datasource configuration. I would suggest transferring this issue to the AWS Datasources project as InfluxDB is one of the supported datasource plugins, and the team handling AWS Datasources should also be looking into issues related to other datasource plugins like InfluxDB.
Please ensure that your InfluxDB credentials have not changed and have the necessary permissions for the queries Grafana is attempting to execute. In the meantime, it might be helpful to check the Grafana server logs for any additional errors and to confirm if this behavior is consistent across different browsers or isolated to a specific environment.
What happened?
I have a dashboard with two mainly 2 data sources: MySQL and InfluxDB.
Both worked fine when setting up the dashboard.
Now, InfluxDB graphs are not always working (9 times out of 10 not working), showing "Status: 500. Message: unauthorized: unauthorized access".
I have around 6 graphs with InfluxDB data source. Usually all of them are showing the above error. Sometimes only some of them are showing the error, others displayed fine.
Sometimes, if I refresh the page, some graphs will appear, some will disappear. It is really unpredictable.
If I check the data source on the Connections -> Data sources page and hit Save & Test, it is always working, no errors there.
What did you expect to happen?
Graphs should appear consistently, as before.
Did this work before?
Yes, it worked on previous versions (unfortunately, I don't know when it started to behave like this).
How do we reproduce it?
I'm unclear of the steps to reproduce it.
The dashboard code is provided below.
InfluxDB is really basic, no custom configuration.
Is the bug inside a dashboard panel?
| Key | Value |
|--|--|
| Panel | timeseries @ Grafana v11.1.0 (5b85c4c2fc) |
| Grafana | Grafana v11.1.0 (5b85c4c2fc) // Open Source |
Panel debug snapshot dashboard
```json { "panels": [ { "datasource": { "type": "grafana", "uid": "grafana" }, "description": "A hőmérséklet és páratartalom szenzor által visszajelzett érték", "fieldConfig": { "defaults": { "custom": { "drawStyle": "line", "lineInterpolation": "smooth", "barAlignment": 0, "lineWidth": 1, "fillOpacity": 0, "gradientMode": "none", "spanNulls": 1200000, "insertNulls": 960000, "showPoints": "auto", "pointSize": 5, "stacking": { "mode": "none", "group": "A" }, "axisPlacement": "auto", "axisLabel": "", "axisColorMode": "text", "axisBorderShow": false, "scaleDistribution": { "type": "linear" }, "axisCenteredZero": false, "hideFrom": { "tooltip": false, "viz": false, "legend": false }, "thresholdsStyle": { "mode": "off" }, "lineStyle": { "fill": "solid" } }, "color": { "mode": "palette-classic" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "celsius" }, "overrides": [ { "matcher": { "id": "byName", "options": "Humidity" }, "properties": [ { "id": "unit", "value": "humidity" } ] } ] }, "gridPos": { "h": 13, "w": 15, "x": 0, "y": 0 }, "id": 2, "options": { "tooltip": { "mode": "single", "sort": "none" }, "legend": { "showLegend": true, "displayMode": "list", "placement": "bottom", "calcs": [] } }, "targets": [ { "refId": "A", "datasource": { "type": "grafana", "uid": "grafana" }, "queryType": "snapshot", "snapshot": [ { "schema": { "refId": "A", "meta": { "typeVersion": [ 0, 0 ], "executedQueryString": "from(bucket: \"log\")\r\n |> range(start: 2024-06-10T23:02:07.703Z, stop: 2024-07-10T23:02:07.703Z)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"environment\" and r[\"key\"] == \"HU/BLAKE/U2-PT3.5\" and r[\"_field\"] == \"boardTemp\")\r\n |> aggregateWindow(every: 1s, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({ time : r[\"_time\"], \"Board Temperature\" : r._value}))\r\n" }, "fields": [] }, "data": { "values": [] } }, { "schema": { "refId": "B", "meta": { "typeVersion": [ 0, 0 ], "executedQueryString": "from(bucket: \"log\")\r\n |> range(start: 2024-06-10T23:02:07.703Z, stop: 2024-07-10T23:02:07.703Z)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"environment\" and r[\"key\"] == \"HU/BLAKE/U2-PT3.5\" and r[\"_field\"] == \"coreTemp\")\r\n |> aggregateWindow(every: 1s, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({ time : r[\"_time\"], \"Core Temperature\" : r._value}))\r\n" }, "fields": [] }, "data": { "values": [] } }, { "schema": { "refId": "C", "meta": { "typeVersion": [ 0, 0 ], "executedQueryString": "from(bucket: \"log\")\r\n |> range(start: 2024-06-10T23:02:07.703Z, stop: 2024-07-10T23:02:07.703Z)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"environment\" and r[\"key\"] == \"HU/BLAKE/U2-PT3.5\" and r[\"_field\"] == \"sensorTemp\")\r\n |> aggregateWindow(every: 1s, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({ time : r[\"_time\"], \"Sensor Temperature\" : r._value}))" }, "fields": [] }, "data": { "values": [] } }, { "schema": { "refId": "D", "meta": { "typeVersion": [ 0, 0 ], "executedQueryString": "from(bucket: \"log\")\r\n |> range(start: 2024-06-10T23:02:07.703Z, stop: 2024-07-10T23:02:07.703Z)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"environment\" and r[\"key\"] == \"HU/BLAKE/U2-PT3.5\" and r[\"_field\"] == \"humidity\")\r\n |> aggregateWindow(every: 1s, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({ time : r[\"_time\"], \"Humidity\" : r._value}))" }, "fields": [] }, "data": { "values": [] } } ] } ], "title": "Reproduced with embedded data", "type": "timeseries" }, { "gridPos": { "h": 7, "w": 9, "x": 15, "y": 0 }, "id": 5, "options": { "content": "Environment (with versions)?
Grafana: v11.1.0 (5b85c4c2fc)
OS: Windows 11 (also checked: iOS, macOS)
Browser: Chrome (also checked: Safari, Firefox)
Grafana platform?
Docker
Datasource(s)?
influxdb