diff --git a/pages/cockpit/troubleshooting/synchronize-grafana-data-sources.mdx b/pages/cockpit/troubleshooting/synchronize-grafana-data-sources.mdx index 4aef9798bd..2cb7ee35fd 100644 --- a/pages/cockpit/troubleshooting/synchronize-grafana-data-sources.mdx +++ b/pages/cockpit/troubleshooting/synchronize-grafana-data-sources.mdx @@ -5,15 +5,15 @@ meta: content: h1: No data showing up on Grafana dashboards paragraph: Fix Grafana data synchronization issues and ensure data appears on Cockpit dashboards with this troubleshooting guide. -tags: grafana data-sources synchronization sync no-data dashboard +tags: no-data-sources no-data cockpit-unavailable dashboard datasource-not-found missing-data cannot-view access-cockpit dates: - validation: 2025-02-06 + validation: 2025-02-24 posted: 2025-02-06 categories: - observability --- -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). +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) or the [Scaleway CLI](https://cli.scaleway.com/cockpit/#get-your-cockpits-grafana). 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. @@ -24,19 +24,30 @@ This page shows you how to visualize your data again when it does not display on - A Scaleway account logged into the [console](https://console.scaleway.com) - [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 - [Installed](https://curl.se/download.html) curl + - [Configured your environment variables](https://github.com/scaleway/scaleway-cli/blob/master/docs/commands/config.md) ## Problem -Many Cockpit users often encounter issues with Grafana data sources not synchronizing properly, leading to missing data on dashboards when data should be available. +- Many Cockpit users often encounter issues with Grafana data sources not synchronizing properly, leading to missing data on dashboards when data should be available. -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`. + 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`. - + +- Your Cockpit is unavailable. +- You cannot view your logs and/or metrics in Grafana. +- Your Cockpit data sources are not configured. +- You cannot view your dashboards in Grafana. + +## Cause + +These issues often occur due to synchronization failures between Cockpit and Grafana, preventing dashboards from displaying the latest logs and metrics as expected. ## Solution +### Using the Scaleway API + Open a terminal and run the following command to trigger the synchronization of your data sources: ```bash curl -X POST \ @@ -44,5 +55,15 @@ Open a terminal and run the following command to trigger the synchronization of -H "Content-Type: application/json" \ -d '{"project_id":"$SCALEWAY_PROJECT_ID"}' \ "https://api.scaleway.com/cockpit/v1/grafana/sync-data-sources" + ``` + +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. + +### Using the Scaleway CLI + +Open a terminal and run the following command: + ```bash + scw cockpit grafana sync-data-sources project-id= + ``` -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. \ No newline at end of file +Make sure that you replace `` with the ID of the Scaleway Project affected by the issue. \ No newline at end of file