diff --git a/config/observability/README.md b/config/observability/README.md index 7ee86e95b..7b28d6090 100644 --- a/config/observability/README.md +++ b/config/observability/README.md @@ -49,10 +49,10 @@ Some example alerting rules are available in the [/examples](/examples) folder. ## Exporting a dashboard for use with Grafana Community Platform or other Grafana Instances -Following the steps in [Editing dashboards](#editing-dashboards), we need to make one export where the toggle "Export for sharing manually" is toggled. Once this is saved, run the following from `config/observability` . +Following the steps in [Editing dashboards](#editing-dashboards), export the dashboard json into `examples/dashboards/` with the toggle "Export for sharing manually" on. Once all dashboard json files sare saved/updated, run the following make target to sanitise it for use in both the Grafana Community Platform for sharing, and for use as a mounted configmap volume locally. ```bash -universal-dashboard.sh <"Export for sharing manually" JSON file> /path/to/ +make dashboard-cleanup ``` Now, you have a universal dashboard file you can use to import into your Grafana instance, but also use for uploading to the Grafana Community Platform. diff --git a/config/observability/kustomization.yaml b/config/observability/kustomization.yaml index c1f5ea6d0..334755814 100644 --- a/config/observability/kustomization.yaml +++ b/config/observability/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - github.com/prometheus-operator/kube-prometheus?ref=release-0.11 + - github.com/prometheus-operator/kube-prometheus?ref=release-0.13 - github.com/Kuadrant/gateway-api-state-metrics?ref=main - github.com/Kuadrant/gateway-api-state-metrics/config/examples/dashboards?ref=main # To scrape istio metrics, 3 configurations are required: diff --git a/examples/dashboards/app_developer.json b/examples/dashboards/app_developer.json index b38189162..d3b1c4674 100644 --- a/examples/dashboards/app_developer.json +++ b/examples/dashboards/app_developer.json @@ -1,5 +1,4 @@ { - "__elements": [], "__requires": [ { "type": "panel", @@ -11,7 +10,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "8.5.5" + "version": "9.5.3" }, { "type": "datasource", @@ -72,7 +71,6 @@ "gnetId": 7630, "graphTooltip": 1, "id": null, - "iteration": 1715589343999, "links": [], "liveNow": false, "panels": [ @@ -100,7 +98,7 @@ "kuadrant" ] }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "title": "Kuadrant Dashboards", "type": "dashlist" }, @@ -118,10 +116,15 @@ }, "id": 153, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "#### Overview of API/HTTPRoute Metrics\n\nThe row of panels below is repeated for each HTTPRoute resource in your cluster.\nThey provide real-time & historical insights into the performance and health of each API.\nMetrics displayed include request rates, success/error breakdown, and latency percentiles, giving a snapshot of API efficiency and reliability.\nUse this dashboard to monitor traffic patterns, identify potential issues, and ensure optimal performance of your services.\n\n*Important: HTTPRoutes must include a \"service\" and \"deployment\" label with a value that matches the name of the service & deployment being routed to. eg. \"service=myapp, deployment=myapp\"*", "mode": "markdown" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "title": "App Developer Dashboard", "type": "text" }, @@ -152,7 +155,9 @@ }, "custom": { "align": "center", - "displayMode": "auto", + "cellOptions": { + "type": "auto" + }, "inspect": false }, "mappings": [], @@ -169,14 +174,16 @@ "overrides": [] }, "gridPos": { - "h": 2, + "h": 3, "w": 24, "x": 0, "y": 8 }, "id": 97, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -185,7 +192,7 @@ }, "showHeader": true }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -346,6 +353,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, @@ -439,14 +448,15 @@ "h": 6, "w": 9, "x": 0, - "y": 10 + "y": 11 }, "id": 99, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -524,7 +534,7 @@ "h": 2, "w": 2, "x": 9, - "y": 10 + "y": 11 }, "id": 137, "options": { @@ -541,7 +551,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -592,7 +602,7 @@ "h": 2, "w": 2, "x": 11, - "y": 10 + "y": 11 }, "id": 149, "options": { @@ -609,7 +619,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -641,6 +651,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, @@ -736,14 +748,15 @@ "h": 6, "w": 9, "x": 13, - "y": 10 + "y": 11 }, "id": 129, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -820,7 +833,7 @@ "h": 2, "w": 2, "x": 22, - "y": 10 + "y": 11 }, "id": 139, "options": { @@ -837,7 +850,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -888,7 +901,7 @@ "h": 2, "w": 2, "x": 9, - "y": 12 + "y": 13 }, "id": 147, "options": { @@ -905,7 +918,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -956,7 +969,7 @@ "h": 2, "w": 2, "x": 11, - "y": 12 + "y": 13 }, "id": 150, "options": { @@ -973,7 +986,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -1023,7 +1036,7 @@ "h": 2, "w": 2, "x": 22, - "y": 12 + "y": 13 }, "id": 146, "options": { @@ -1040,7 +1053,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -1091,7 +1104,7 @@ "h": 2, "w": 2, "x": 9, - "y": 14 + "y": 15 }, "id": 148, "options": { @@ -1108,7 +1121,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -1159,7 +1172,7 @@ "h": 2, "w": 2, "x": 11, - "y": 14 + "y": 15 }, "id": 151, "options": { @@ -1176,7 +1189,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -1226,7 +1239,7 @@ "h": 2, "w": 2, "x": 22, - "y": 14 + "y": 15 }, "id": 138, "options": { @@ -1243,7 +1256,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -1264,7 +1277,7 @@ } ], "refresh": "30s", - "schemaVersion": 36, + "schemaVersion": 38, "style": "dark", "tags": [ "kuadrant" diff --git a/examples/dashboards/business_user.json b/examples/dashboards/business_user.json index e7a9c170e..c608b71b7 100644 --- a/examples/dashboards/business_user.json +++ b/examples/dashboards/business_user.json @@ -1,5 +1,4 @@ { - "__elements": [], "__requires": [ { "type": "panel", @@ -11,7 +10,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "8.5.5" + "version": "9.5.3" }, { "type": "datasource", @@ -70,7 +69,6 @@ "fiscalYearStartMonth": 0, "graphTooltip": 1, "id": null, - "iteration": 1715594450345, "links": [], "liveNow": false, "panels": [ @@ -98,7 +96,7 @@ "kuadrant" ] }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "title": "Kuadrant Dashboards", "type": "dashlist" }, @@ -116,10 +114,15 @@ }, "id": 150, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "#### Business Overview of APIs\n\nThe panels below are grouped by APIs, realized by a [Gateway API HTTPRoute](https://gateway-api.sigs.k8s.io/concepts/api-overview/#httproute). Each panel provides a comprehensive overview of request and error metrics associated with each API. Additionally, these panels include a heatmap that visualizes requests per second, offering real-time insights into the traffic patterns and operational status of your services.\n\n*Important: HTTPRoutes must include a \"service\" and \"deployment\" label with a value that matches the name of the service & deployment being routed to. eg. \"service=myapp, deployment=myapp\"*\n", "mode": "markdown" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "title": "Business User Dashboard", "type": "text" }, @@ -150,6 +153,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, @@ -206,8 +211,9 @@ "options": { "legend": { "calcs": [], - "displayMode": "hidden", - "placement": "bottom" + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, "tooltip": { "mode": "multi", @@ -270,7 +276,8 @@ "alignValue": "center", "legend": { "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "mergeValues": false, "rowHeight": 0.9, @@ -324,6 +331,8 @@ "mode": "palette-classic" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, @@ -381,7 +390,8 @@ "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -416,7 +426,9 @@ }, "custom": { "align": "auto", - "displayMode": "auto", + "cellOptions": { + "type": "auto" + }, "inspect": false }, "mappings": [], @@ -444,7 +456,9 @@ }, "id": 155, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -453,7 +467,7 @@ }, "showHeader": true }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -645,7 +659,7 @@ } ], "refresh": "30s", - "schemaVersion": 36, + "schemaVersion": 38, "style": "dark", "tags": [ "kuadrant" diff --git a/examples/dashboards/platform_engineer.json b/examples/dashboards/platform_engineer.json index 5d2b95848..ad0e3dc47 100644 --- a/examples/dashboards/platform_engineer.json +++ b/examples/dashboards/platform_engineer.json @@ -1,5 +1,4 @@ { - "__elements": [], "__requires": [ { "type": "panel", @@ -11,7 +10,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "8.5.5" + "version": "9.5.3" }, { "type": "datasource", @@ -72,7 +71,6 @@ "gnetId": 7630, "graphTooltip": 1, "id": null, - "iteration": 1715594457566, "links": [], "liveNow": false, "panels": [ @@ -100,7 +98,7 @@ "kuadrant" ] }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "title": "Kuadrant Dashboards", "type": "dashlist" }, @@ -118,10 +116,15 @@ }, "id": 150, "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "#### Overview of Gateways, Policies and APIs\n\nThe panels below are grouped by Gateways and APIs. A Gateway is a [Gateway API defined gateway](https://gateway-api.sigs.k8s.io/concepts/api-overview/#gateway) resource. An API is realised by a [Gateway API HTTPRoute](https://gateway-api.sigs.k8s.io/concepts/api-overview/#httproute).\nAny policies [attached to the Gateways and APIs](https://gateway-api.sigs.k8s.io/geps/gep-713/) will be shown, as well as summary request and error metrics for APIs.\n\n*Important: HTTPRoutes must include a \"service\" and \"deployment\" label with a value that matches the name of the service & deployment being routed to. eg. \"service=myapp, deployment=myapp\"*", "mode": "markdown" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "title": "Platform Engineer Dashboard", "type": "text" }, @@ -151,7 +154,9 @@ }, "custom": { "align": "center", - "displayMode": "auto", + "cellOptions": { + "type": "auto" + }, "inspect": false }, "mappings": [], @@ -204,7 +209,9 @@ }, "id": 115, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -215,7 +222,7 @@ "showHeader": true, "sortBy": [] }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -423,7 +430,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -454,7 +461,9 @@ }, "custom": { "align": "center", - "displayMode": "auto", + "cellOptions": { + "type": "auto" + }, "inspect": false }, "mappings": [], @@ -482,7 +491,9 @@ }, "id": 117, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -493,7 +504,7 @@ "showHeader": true, "sortBy": [] }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -660,7 +671,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -725,7 +736,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -769,7 +780,9 @@ }, "custom": { "align": "center", - "displayMode": "auto", + "cellOptions": { + "type": "auto" + }, "inspect": false }, "mappings": [], @@ -797,7 +810,9 @@ }, "id": 97, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -806,7 +821,7 @@ }, "showHeader": true }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -943,7 +958,9 @@ }, "custom": { "align": "center", - "displayMode": "auto", + "cellOptions": { + "type": "auto" + }, "inspect": false }, "mappings": [], @@ -971,7 +988,9 @@ }, "id": 118, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -982,7 +1001,7 @@ "showHeader": true, "sortBy": [] }, - "pluginVersion": "8.5.5", + "pluginVersion": "9.5.3", "targets": [ { "datasource": { @@ -1115,6 +1134,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, @@ -1172,7 +1193,8 @@ "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1208,6 +1230,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, @@ -1264,7 +1288,8 @@ "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1300,6 +1325,8 @@ "mode": "continuous-YlRd" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, @@ -1354,7 +1381,8 @@ "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1486,6 +1514,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1626,7 +1656,8 @@ "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1664,6 +1695,8 @@ "mode": "fixed" }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -1804,7 +1837,8 @@ "legend": { "calcs": [], "displayMode": "table", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { "mode": "multi", @@ -1831,7 +1865,7 @@ } ], "refresh": "30s", - "schemaVersion": 36, + "schemaVersion": 38, "style": "dark", "tags": [ "kuadrant" diff --git a/config/observability/universal-dashboard.sh b/hack/universal-dashboard.sh similarity index 100% rename from config/observability/universal-dashboard.sh rename to hack/universal-dashboard.sh diff --git a/make/observability.mk b/make/observability.mk index 8a290d77f..cefa5e1b1 100644 --- a/make/observability.mk +++ b/make/observability.mk @@ -7,3 +7,12 @@ deploy-observability: kustomize .PHONY: thanos-manifests thanos-manifests: ./hack/thanos/thanos_build.sh ./hack/thanos/thanos.jsonnet ./hack/thanos/thanos_build.sh + +DASHBOARD_FILES := $(wildcard examples/dashboards/*.json) + +.PHONY: dashboard-cleanup +dashboard-cleanup: + @for file in $(DASHBOARD_FILES); do \ + echo "Processing $$file"; \ + ./hack/universal-dashboard.sh $$file; \ + done