|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: No data showing up on Grafana dashboards |
| 4 | + description: Fix Grafana data synchronization issues and ensure data appears on Cockpit dashboards with this troubleshooting guide. |
| 5 | + h1: No data showing up on Grafana dashboards |
| 6 | + paragraph: Fix Grafana data synchronization issues and ensure data appears on Cockpit dashboards with this troubleshooting guide. |
| 7 | +tags: grafana data-sources synchronization sync no-data dashboard |
| 8 | +dates: |
| 9 | + validation: 2025-02-06 |
| 10 | + posted: 2025-02-06 |
| 11 | +categories: |
| 12 | + - observability |
| 13 | +--- |
| 14 | + |
| 15 | +This page shows you how to visualize your data again when it does not display on your Grafana dashboards, using the `SyncGrafanaDataSources` [endpoint](https://www.scaleway.com/en/developers/api/cockpit/v1/global-api/#path-grafana-synchronize-grafana-data-sources) of the [Cockpit Global API](https://www.scaleway.com/en/developers/api/cockpit/v1/global-api/#path-grafana-synchronize-grafana-data-sources). |
| 16 | + |
| 17 | +<Message type="important"> |
| 18 | + The [Cockpit Global API](https://www.scaleway.com/en/developers/api/cockpit/v1/global-api/#path-grafana-synchronize-grafana-data-sources) contains deprecated information that is being updated, you should not use it for any other purpose than the one described on this page. |
| 19 | +</Message> |
| 20 | + |
| 21 | +<Macro id="requirements" /> |
| 22 | + |
| 23 | + - A Scaleway account logged into the [console](https://console.scaleway.com) |
| 24 | + - [Created](/iam/how-to/create-api-keys/) an API key with sufficient [IAM permissions](/iam/reference-content/permission-sets/) to perform the actions described on this page |
| 25 | + - [Installed](https://curl.se/download.html) curl |
| 26 | + |
| 27 | + |
| 28 | +## Problem |
| 29 | + |
| 30 | +Many Cockpit users often encounter issues with Grafana data sources not synchronizing properly, leading to missing data on dashboards when data should be available. |
| 31 | + |
| 32 | +When users open their Grafana dashboards, they see a `No data` message along with an error banner stating: `Failed to upgrade legacy queries datasource was not found`. |
| 33 | + |
| 34 | +<Lightbox src="scaleway_cpt_grafana_datasources_troubleshooting.webp" alt="Grafana dashboard showing error messages and warning signs of no data found for the user's datasources" /> |
| 35 | + |
| 36 | + |
| 37 | +## Solution |
| 38 | + |
| 39 | +Open a terminal and run the following command to trigger the synchronization of your data sources: |
| 40 | + ```bash |
| 41 | + curl -X POST \ |
| 42 | + -H "X-Auth-Token: $SCW_SECRET_KEY" \ |
| 43 | + -H "Content-Type: application/json" \ |
| 44 | + -d '{"project_id":"$SCALEWAY_PROJECT_ID"}' \ |
| 45 | + "https://api.scaleway.com/cockpit/v1/grafana/sync-data-sources" |
| 46 | + |
| 47 | +Make sure that you replace `$SCW_SECRET_KEY` with your API secret key and `$SCALEWAY_PROJECT_ID` with the ID of the Scaleway Project affected by the issue. |
0 commit comments