-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pull & push with datasource CloudWatch breaks dashboards #75
Comments
Did you have the same issue on grafana 8? Not sure if grafana SDK is supporting grafana 9. Maybe this is the issue |
I did a downgrade to Grafana 8.3.11 (changed image and restart deployment). This shows the same problems. From the code I see no specific things done. So maybe this is an issue with the CloudWatch datasource. What do you think would be a good approach to tackle this? |
I did some further debugging. I made some findings that I would like to explain here. The json pulled by ❯ git diff dashboards/status.json | cat
diff --git a/dashboards/status.json b/dashboards/status.json
index c2aaa5b..5772933 100644
--- a/dashboards/status.json
+++ b/dashboards/status.json
@@ -2,34 +2,31 @@
"annotations": {
"list": [
{
+ "builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
- "expr": "",
+ "hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
- "iconSize": 0,
- "lineColor": "",
"name": "Annotations & Alerts",
- "query": "",
- "showLine": false,
- "step": "",
- "tagKeys": "",
- "tags": null,
- "tagsField": "",
- "textField": "",
- "textFormat": "",
- "titleFormat": "",
+ "target": {
+ "limit": 100,
+ "matchAny": false,
+ "tags": [],
+ "type": "dashboard"
+ },
"type": "dashboard"
}
]
},
"editable": true,
+ "fiscalYearStartMonth": 0,
"graphTooltip": 1,
- "hideControls": false,
+ "id": 422,
"links": [],
- "originalTitle": "",
+ "liveNow": false,
"panels": [
{
"collapsed": false,
@@ -43,10 +40,8 @@
},
"id": 23,
"isNew": false,
- "panels": null,
"span": 0,
"title": "Health",
- "transparent": false,
"type": "row"
},
{
@@ -62,6 +57,9 @@
"mode": "palette-classic"
},
"custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
@@ -91,6 +89,7 @@
"mode": "off"
}
},
+ "mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
@@ -105,7 +104,8 @@
]
},
"unit": ""
- }
+ },
+ "overrides": []
[.....] When manually pulling the JSON via WebUI. Then pushing it with assumption) Can it be that some values are "forgotten" by the sdk used? One way to check would be to compare grafana-sync result with a manual query via the rest API of Grafana. |
Yes, it may be that not all values are pushed/pull when doing it with sdk for cloud watch data source. I will try to take a look once i have a chance but not able to give any ETA right now |
We have more going on, but I am restricting this PR to the essence. What I am describing here works perfectly for the datasource Prometheus. Also copy & paste from "json model" via WebUI seems to work fine. It seems that some options (default options or so) are not synced correctly.
Steps to reproduce:
before.json.txt
after.json.txt
before.json.txt
after.json.txt
"Broken" is defined as: The panel just shows blank. See
Also the Annotations seems to be duplicated.
Also some things have been removed when diffing.
This can be "fixed" as follows:
Using Grafana v9.1.0. Deployed as part of prometheus-operator on k8s.
This could be an issue with Grafan itself, but could also be some "default value not sync"-optimization or so.
Would be great to get some insights, let me know where I can help.
The text was updated successfully, but these errors were encountered: