From c6c7725cd6cffe07badffd96e6a53a3aef02e2b2 Mon Sep 17 00:00:00 2001 From: Julien Nioche Date: Fri, 20 Dec 2024 12:20:02 +0000 Subject: [PATCH 1/2] Show API and CloudScanner versions in dasboard, fixes #648 Signed-off-by: Julien Nioche --- ...fana-dashboard-cloud-impacts.template.json | 159 +++++++++++++----- 1 file changed, 120 insertions(+), 39 deletions(-) diff --git a/dashboard-config/provisioning/dashboards/grafana-dashboard-cloud-impacts.template.json b/dashboard-config/provisioning/dashboards/grafana-dashboard-cloud-impacts.template.json index bdd73e97..13b47c19 100644 --- a/dashboard-config/provisioning/dashboards/grafana-dashboard-cloud-impacts.template.json +++ b/dashboard-config/provisioning/dashboards/grafana-dashboard-cloud-impacts.template.json @@ -177,7 +177,7 @@ "overrides": [] }, "gridPos": { - "h": 5, + "h": 6, "w": 5, "x": 0, "y": 2 @@ -429,6 +429,99 @@ ], "title": "Number of resources - Running", "type": "stat" + }, + { + "datasource": { + "default": false, + "type": "prometheus", + "uid": "cloud-scanner-prometheus-demo-uid" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#5794F2", + "mode": "fixed" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 5, + "y": 5 + }, + "id": 47, + "options": { + "cellHeight": "md", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 0, + "showHeader": true + }, + "pluginVersion": "11.2.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "cloud-scanner-prometheus-demo-uid" + }, + "disableTextWrap": false, + "editorMode": "code", + "exemplar": false, + "expr": "max(boavizta_number_of_resources_total) by (boaviztapi_version, cloud_scanner_version)\n\n", + "format": "table", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A", + "useBackend": false + } + ], + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "boaviztapi_version", + "cloud_scanner_version" + ] + } + } + } + ], + "type": "table" } ], "title": "🧭 Overview", @@ -459,8 +552,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -476,7 +568,7 @@ "h": 5, "w": 9, "x": 0, - "y": 3 + "y": 11 }, "id": 21, "options": { @@ -533,8 +625,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -546,7 +637,7 @@ "h": 5, "w": 10, "x": 9, - "y": 3 + "y": 11 }, "id": 29, "options": { @@ -656,8 +747,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -673,7 +763,7 @@ "h": 5, "w": 9, "x": 0, - "y": 8 + "y": 16 }, "id": 26, "options": { @@ -743,8 +833,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -756,7 +845,7 @@ "h": 5, "w": 10, "x": 9, - "y": 8 + "y": 16 }, "id": 41, "options": { @@ -847,8 +936,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -864,7 +952,7 @@ "h": 5, "w": 9, "x": 0, - "y": 14 + "y": 22 }, "id": 42, "links": [ @@ -929,8 +1017,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -942,7 +1029,7 @@ "h": 5, "w": 10, "x": 9, - "y": 14 + "y": 22 }, "id": 34, "links": [ @@ -1057,8 +1144,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1074,7 +1160,7 @@ "h": 5, "w": 9, "x": 0, - "y": 19 + "y": 27 }, "id": 27, "links": [ @@ -1149,8 +1235,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" } ] }, @@ -1162,7 +1247,7 @@ "h": 5, "w": 10, "x": 9, - "y": 19 + "y": 27 }, "id": 32, "links": [ @@ -1292,8 +1377,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1309,7 +1393,7 @@ "h": 5, "w": 9, "x": 0, - "y": 15 + "y": 23 }, "id": 28, "links": [ @@ -1418,8 +1502,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1435,7 +1518,7 @@ "h": 5, "w": 10, "x": 9, - "y": 15 + "y": 23 }, "id": 33, "links": [ @@ -1559,8 +1642,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1576,7 +1658,7 @@ "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 24 }, "id": 44, "options": { @@ -1662,8 +1744,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1679,7 +1760,7 @@ "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 24 }, "id": 45, "options": { @@ -1720,7 +1801,7 @@ "type": "row" } ], - "refresh": "", + "refresh": "5s", "schemaVersion": 39, "tags": [], "templating": { @@ -1814,4 +1895,4 @@ "uid": "e2cad6b6-5c70-4bf4-9d8e-6e57dfdfa597", "version": 2, "weekStart": "" -} +} \ No newline at end of file From a0d94f59da3a3fcb580138a3bc8d3f16a58b3aae Mon Sep 17 00:00:00 2001 From: Julien Nioche Date: Fri, 20 Dec 2024 12:22:20 +0000 Subject: [PATCH 2/2] added CHANGELOG Signed-off-by: Julien Nioche --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c46d1d66..cb940eb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased _This paragraph may describe WIP/unreleased features. They are merged to main branch but not tagged._ +- [Show API and CloudScanner versions in dasboard](https://github.com/Boavizta/cloud-scanner/pull/649) - [Return API and scanner version in the metrics output](https://github.com/Boavizta/cloud-scanner/issues/266) - [Upgrade version of BoaviztAPI to 1.3.7 and adjust tests accordingly](https://github.com/Boavizta/cloud-scanner/issues/643) - [Return API and scanner version in the json output](https://github.com/Boavizta/cloud-scanner/issues/265)