Skip to content

Commit 00cdb40

Browse files
authored
feat(cockpit): add more info in troubleshooting (#4468)
1 parent b12c4dd commit 00cdb40

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

pages/cockpit/troubleshooting/synchronize-grafana-data-sources.mdx

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ meta:
55
content:
66
h1: No data showing up on Grafana dashboards
77
paragraph: Fix Grafana data synchronization issues and ensure data appears on Cockpit dashboards with this troubleshooting guide.
8-
tags: grafana data-sources synchronization sync no-data dashboard
8+
tags: no-data-sources no-data cockpit-unavailable dashboard datasource-not-found missing-data cannot-view access-cockpit
99
dates:
10-
validation: 2025-02-06
10+
validation: 2025-02-24
1111
posted: 2025-02-06
1212
categories:
1313
- observability
1414
---
1515

16-
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+
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).
1717

1818
<Message type="important">
1919
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,25 +24,46 @@ This page shows you how to visualize your data again when it does not display on
2424
- A Scaleway account logged into the [console](https://console.scaleway.com)
2525
- [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
2626
- [Installed](https://curl.se/download.html) curl
27+
- [Configured your environment variables](https://github.com/scaleway/scaleway-cli/blob/master/docs/commands/config.md)
2728

2829

2930
## Problem
3031

31-
Many Cockpit users often encounter issues with Grafana data sources not synchronizing properly, leading to missing data on dashboards when data should be available.
32+
- Many Cockpit users often encounter issues with Grafana data sources not synchronizing properly, leading to missing data on dashboards when data should be available.
3233

33-
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`.
34+
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`.
3435

35-
<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" />
36+
<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" />
3637

38+
- Your Cockpit is unavailable.
39+
- You cannot view your logs and/or metrics in Grafana.
40+
- Your Cockpit data sources are not configured.
41+
- You cannot view your dashboards in Grafana.
42+
43+
## Cause
44+
45+
These issues often occur due to synchronization failures between Cockpit and Grafana, preventing dashboards from displaying the latest logs and metrics as expected.
3746

3847
## Solution
3948

49+
### Using the Scaleway API
50+
4051
Open a terminal and run the following command to trigger the synchronization of your data sources:
4152
```bash
4253
curl -X POST \
4354
-H "X-Auth-Token: $SCW_SECRET_KEY" \
4455
-H "Content-Type: application/json" \
4556
-d '{"project_id":"$SCALEWAY_PROJECT_ID"}' \
4657
"https://api.scaleway.com/cockpit/v1/grafana/sync-data-sources"
58+
```
59+
60+
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.
61+
62+
### Using the Scaleway CLI
63+
64+
Open a terminal and run the following command:
65+
```bash
66+
scw cockpit grafana sync-data-sources project-id=<PROJECT-ID>
67+
```
4768

48-
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.
69+
Make sure that you replace `<PROJECT-ID>` with the ID of the Scaleway Project affected by the issue.

0 commit comments

Comments
 (0)