From 0966ff66164cb54a7bd3ea826044db3c6692f99d Mon Sep 17 00:00:00 2001 From: RealAnna <89971034+RealAnna@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:56:40 +0100 Subject: [PATCH] chore: add promotion counter to grafana dashboard for apps (#3204) Signed-off-by: RealAnna --- .../grafana-dashboard-keptn-applications.yaml | 1536 +++++++++-------- .../grafana_dashboard_applications.json | 154 +- examples/Makefile | 2 +- 3 files changed, 910 insertions(+), 782 deletions(-) diff --git a/dashboards/grafana/configmap/grafana-dashboard-keptn-applications.yaml b/dashboards/grafana/configmap/grafana-dashboard-keptn-applications.yaml index f3ba139bf8..f6a5cc99b5 100644 --- a/dashboards/grafana/configmap/grafana-dashboard-keptn-applications.yaml +++ b/dashboards/grafana/configmap/grafana-dashboard-keptn-applications.yaml @@ -1,803 +1,867 @@ apiVersion: v1 data: grafana_dashboard_applications.json: |- - { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 26, - "links": [], - "liveNow": false, - "panels": [ + { + "annotations": { + "list": [ { + "builtIn": 1, "datasource": { - "type": "prometheus", - "uid": "prometheus" + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [ ], + "type": "dashboard" }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "green", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [ ], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 2, - "x": 0, - "y": 0 + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "sum" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 80 + "overrides": [ ] + }, + "gridPos": { + "h": 6, + "w": 2, + "x": 0, + "y": 0 + }, + "id": 19, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "text": { + "valueSize": 80 + }, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "textMode": "auto" - }, - "pluginVersion": "9.2.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "builder", - "expr": "keptn_app_count_total{keptn_deployment_app_status=\"Succeeded\", keptn_deployment_app_name=\"$Application\"}", - "format": "table", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Succeeded", - "transformations": [ - { - "id": "groupBy", - "options": { - "fields": { - "Value": { - "aggregations": [ - "max" - ], - "operation": "aggregate" - }, - "keptn_deployment_app_version": { - "aggregations": [], - "operation": "groupby" - } + "editorMode": "builder", + "expr": "keptn_app_count_total{keptn_deployment_app_status=\"Succeeded\", keptn_deployment_app_name=\"$Application\"}", + "format": "table", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Succeeded", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "Value": { + "aggregations": [ + "max" + ], + "operation": "aggregate" + }, + "keptn_deployment_app_version": { + "aggregations": [ ], + "operation": "groupby" } } } - ], - "type": "stat" + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "orange", - "value": 70 - }, - { - "color": "red", - "value": 85 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 2, - "y": 0 + "fieldConfig": { + "defaults": { + "mappings": [ ], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "overrides": [ ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 2, + "y": 0 + }, + "id": 4, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.2.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "builder", - "expr": "max(keptn_app_active{keptn_deployment_app_name=\"$Application\"})", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Active Deployments", - "type": "gauge" + "editorMode": "builder", + "expr": "max(keptn_app_active{keptn_deployment_app_name=\"$Application\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Active Deployments", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - } + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "red", + "mode": "fixed" }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 2, - "x": 10, - "y": 0 + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } }, - "id": 3, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "sum" - ], - "fields": "", - "values": false - }, - "text": { - "valueSize": 80 + "overrides": [ ] + }, + "gridPos": { + "h": 6, + "w": 2, + "x": 10, + "y": 0 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "text": { + "valueSize": 80 + }, + "textMode": "auto" + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "textMode": "auto" - }, - "pluginVersion": "9.2.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "builder", - "expr": "keptn_app_count_total{keptn_deployment_app_status=\"Failed\", keptn_deployment_app_name=\"$Application\"}", - "format": "table", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Failed", - "transformations": [ - { - "id": "groupBy", - "options": { - "fields": { - "Value": { - "aggregations": [ - "max" - ], - "operation": "aggregate" - }, - "keptn_deployment_app_version": { - "aggregations": [ - "count" - ], - "operation": "groupby" - } + "editorMode": "builder", + "expr": "keptn_app_count_total{keptn_deployment_app_status=\"Failed\", keptn_deployment_app_name=\"$Application\"}", + "format": "table", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Failed", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "Value": { + "aggregations": [ + "max" + ], + "operation": "aggregate" + }, + "keptn_deployment_app_version": { + "aggregations": [ + "count" + ], + "operation": "groupby" } } } - ], - "type": "stat" + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 86400 - } - ] - }, - "unit": "s" + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 2, - "x": 0, - "y": 6 - }, - "id": 10, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 86400 + } + ] }, - "showUnfilled": true + "unit": "s" }, - "pluginVersion": "9.2.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "builder", - "expr": "avg by(keptn_deployment_app_previousversion, keptn_deployment_app_version) (keptn_app_deploymentinterval{keptn_deployment_app_name=\"$Application\"})", - "format": "time_series", - "legendFormat": "{{keptn_deployment_app_previousversion}} - {{keptn_deployment_app_version}}", - "range": true, - "refId": "A" - } - ], - "title": "Time between Deployments", - "type": "bargauge" + "overrides": [ ] }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "min": 2, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 43200 - }, - { - "color": "red", - "value": 86400 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 8, - "x": 2, - "y": 6 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "9.2.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "builder", - "expr": "avg by(keptn_deployment_workload_previousversion) (keptn_app_deploymentinterval{keptn_deployment_app_name=\"$Application\"})", - "format": "table", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Average Time between Deployments", - "type": "gauge" + "gridPos": { + "h": 6, + "w": 2, + "x": 0, + "y": 6 }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 2, - "x": 10, - "y": 6 - }, - "id": 14, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "id": 10, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "showUnfilled": true - }, - "pluginVersion": "9.2.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "builder", - "expr": "max by(keptn_deployment_app_version) (keptn_app_deploymentduration{keptn_deployment_app_name=\"$Application\"})", - "interval": "", - "legendFormat": "{{keptn_workload_version}}", - "range": true, - "refId": "A" - } - ], - "title": "Deployment Time", - "type": "bargauge" + "editorMode": "builder", + "expr": "avg by(keptn_deployment_app_previousversion, keptn_deployment_app_version) (keptn_app_deploymentinterval{keptn_deployment_app_name=\"$Application\"})", + "format": "time_series", + "legendFormat": "{{keptn_deployment_app_previousversion}} - {{keptn_deployment_app_version}}", + "range": true, + "refId": "A" + } + ], + "title": "Time between Deployments", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "bars", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 3, - "scaleDistribution": { - "type": "linear" + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ ], + "min": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + { + "color": "#EAB839", + "value": 43200 }, - "thresholdsStyle": { - "mode": "off" + { + "color": "red", + "value": 86400 } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } + ] }, - "overrides": [] + "unit": "s" }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 12 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "overrides": [ ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 2, + "y": 6 + }, + "id": 16, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "tooltip": { - "mode": "single", - "sort": "none" + "editorMode": "builder", + "expr": "avg by(keptn_deployment_workload_previousversion) (keptn_app_deploymentinterval{keptn_deployment_app_name=\"$Application\"})", + "format": "table", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Average Time between Deployments", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "builder", - "expr": "max(keptn_app_active{keptn_deployment_app_name=\"$Application\"})", - "format": "table", - "interval": "1", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Deployments Active", - "type": "timeseries" + "overrides": [ ] }, - { - "datasource": { - "type": "jaeger", - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } + "gridPos": { + "h": 6, + "w": 2, + "x": 10, + "y": 6 + }, + "id": 14, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 9, - "x": 0, - "y": 20 - }, - "id": 8, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false + "editorMode": "builder", + "expr": "max by(keptn_deployment_app_version) (keptn_app_deploymentduration{keptn_deployment_app_name=\"$Application\"})", + "interval": "", + "legendFormat": "{{keptn_workload_version}}", + "range": true, + "refId": "A" + } + ], + "title": "Deployment Time", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" }, - "showHeader": true - }, - "pluginVersion": "9.2.1", - "targets": [ - { - "datasource": { - "type": "jaeger", - "uid": "jaeger" + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "operation": "AppPreDeployTasks", - "queryType": "search", - "refId": "A", - "service": "lifecycle-operator", - "tags": "keptn.deployment.app.name=$Application" - } - ], - "title": "Traces", - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 3, + "scaleDistribution": { + "type": "linear" }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "keptn_deployment_workload_version (lastNotNull)" + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "properties": [ - { - "id": "custom.width", - "value": 100 - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 9, - "y": 20 + { + "color": "red", + "value": 80 + } + ] + } }, - "id": 21, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false + "overrides": [ ] + }, + "gridPos": { + "h": 9, + "w": 9, + "x": 0, + "y": 12 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "showHeader": false - }, - "pluginVersion": "9.2.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "builder", - "expr": "keptn_deployment_deploymentduration{keptn_deployment_app_name=\"$Application\"}", - "format": "table", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Active Workloads", - "transformations": [ - { - "id": "groupBy", - "options": { - "fields": { - "Value": { - "aggregations": [] - }, - "keptn_deployment_workload_name": { - "aggregations": [], - "operation": "groupby" - }, - "keptn_deployment_workload_version": { - "aggregations": [], - "operation": "aggregate" - } + "editorMode": "builder", + "expr": "max(keptn_app_active{keptn_deployment_app_name=\"$Application\"})", + "format": "table", + "interval": "1", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Deployments Active", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "fieldConfig": { + "defaults": { + "mappings": [ ], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 } - } - }, - { - "id": "sortBy", - "options": { - "fields": {}, - "sort": [ - { - "desc": true, - "field": "keptn_deployment_workload_version" - } - ] - } + ] } - ], - "type": "table" - } - ], - "refresh": "5s", - "schemaVersion": 37, - "style": "dark", - "tags": [], - "templating": { - "list": [ + }, + "overrides": [ ] + }, + "gridPos": { + "h": 9, + "w": 3, + "x": 9, + "y": 12 + }, + "id": 23, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.2.1", + "targets": [ { - "current": { - "selected": false, - "text": "podtato-head", - "value": "podtato-head" - }, "datasource": { "type": "prometheus", "uid": "prometheus" }, - "definition": "label_values(keptn_deployment_app_name)", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Application", - "options": [], - "query": { - "query": "label_values(keptn_deployment_app_name)", - "refId": "StandardVariableQuery" + "editorMode": "builder", + "expr": "max(keptn_promotion_count_total{keptn_deployment_app_name=\"$Application\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Successful promotions", + "type": "gauge" + }, + { + "datasource": { + "type": "jaeger", + "uid": "PC9A941E8F2E49454" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, + "overrides": [ ] + }, + "gridPos": { + "h": 7, + "w": 9, + "x": 0, + "y": 21 + }, + "id": 8, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "jaeger", + "uid": "PC9A941E8F2E49454" + }, + "operation": "AppPreDeployTasks", + "queryType": "search", + "refId": "A", + "service": "lifecycle-operator", + "tags": "keptn.deployment.app.name=$Application" + } + ], + "title": "Traces", + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false + }, + "mappings": [ ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "keptn_deployment_workload_version (lastNotNull)" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 9, + "y": 21 + }, + "id": 21, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": false + }, + "pluginVersion": "9.2.1", + "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "filters": [], - "hide": 0, - "name": "Filters", - "skipUrlSync": false, - "type": "adhoc" + "editorMode": "builder", + "expr": "keptn_deployment_deploymentduration{keptn_deployment_app_name=\"$Application\"}", + "format": "table", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Keptn Applications", - "uid": "nbiPNgN4z", - "version": 1, - "weekStart": "" - } + ], + "title": "Active Workloads", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "Value": { + "aggregations": [ ] + }, + "keptn_deployment_workload_name": { + "aggregations": [ ], + "operation": "groupby" + }, + "keptn_deployment_workload_version": { + "aggregations": [ ], + "operation": "aggregate" + } + } + } + }, + { + "id": "sortBy", + "options": { + "fields": { }, + "sort": [ + { + "desc": true, + "field": "keptn_deployment_workload_version" + } + ] + } + } + ], + "type": "table" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "podtato-head", + "value": "podtato-head" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(keptn_deployment_app_name)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "Application", + "options": [ ], + "query": { + "query": "label_values(keptn_deployment_app_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "filters": [ ], + "hide": 0, + "name": "Filters", + "skipUrlSync": false, + "type": "adhoc" + } + ] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": { }, + "timezone": "", + "title": "Keptn Applications", + "uid": "nbiPNgN4z", + "version": 1, + "weekStart": "" + } kind: ConfigMap metadata: creationTimestamp: null diff --git a/dashboards/grafana/import/grafana_dashboard_applications.json b/dashboards/grafana/import/grafana_dashboard_applications.json index 078e372d20..216c7696ea 100644 --- a/dashboards/grafana/import/grafana_dashboard_applications.json +++ b/dashboards/grafana/import/grafana_dashboard_applications.json @@ -1,5 +1,6 @@ { - "dashboard": { + "dashboard": + { "annotations": { "list": [ { @@ -25,14 +26,13 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": null, "links": [], "liveNow": false, "panels": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "fieldConfig": { "defaults": { @@ -81,8 +81,8 @@ "targets": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "editorMode": "builder", "expr": "keptn_app_count_total{keptn_deployment_app_status=\"Succeeded\", keptn_deployment_app_name=\"$Application\"}", @@ -116,8 +116,8 @@ }, { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "fieldConfig": { "defaults": { @@ -165,8 +165,8 @@ "targets": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "editorMode": "builder", "expr": "max(keptn_app_active{keptn_deployment_app_name=\"$Application\"})", @@ -180,8 +180,8 @@ }, { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "fieldConfig": { "defaults": { @@ -230,8 +230,8 @@ "targets": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "editorMode": "builder", "expr": "keptn_app_count_total{keptn_deployment_app_status=\"Failed\", keptn_deployment_app_name=\"$Application\"}", @@ -267,8 +267,8 @@ }, { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "fieldConfig": { "defaults": { @@ -318,8 +318,8 @@ "targets": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "editorMode": "builder", "expr": "avg by(keptn_deployment_app_previousversion, keptn_deployment_app_version) (keptn_app_deploymentinterval{keptn_deployment_app_name=\"$Application\"})", @@ -334,8 +334,8 @@ }, { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "fieldConfig": { "defaults": { @@ -388,8 +388,8 @@ "targets": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "editorMode": "builder", "expr": "avg by(keptn_deployment_workload_previousversion) (keptn_app_deploymentinterval{keptn_deployment_app_name=\"$Application\"})", @@ -404,8 +404,8 @@ }, { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "fieldConfig": { "defaults": { @@ -454,8 +454,8 @@ "targets": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "editorMode": "builder", "expr": "max by(keptn_deployment_app_version) (keptn_app_deploymentduration{keptn_deployment_app_name=\"$Application\"})", @@ -470,8 +470,8 @@ }, { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "fieldConfig": { "defaults": { @@ -526,8 +526,8 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 12, + "h": 9, + "w": 9, "x": 0, "y": 12 }, @@ -547,8 +547,8 @@ "targets": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "editorMode": "builder", "expr": "max(keptn_app_active{keptn_deployment_app_name=\"$Application\"})", @@ -562,6 +562,70 @@ "title": "Deployments Active", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "P1809F7CD0C75ACF3" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 3, + "x": 9, + "y": 12 + }, + "id": 23, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "builder", + "expr": "max(keptn_promotion_count_total{keptn_deployment_app_name=\"$Application\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Successful promotions", + "type": "gauge" + }, { "datasource": { "type": "jaeger", @@ -598,7 +662,7 @@ "h": 7, "w": 9, "x": 0, - "y": 20 + "y": 21 }, "id": 8, "options": { @@ -630,8 +694,8 @@ }, { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "fieldConfig": { "defaults": { @@ -677,7 +741,7 @@ "h": 7, "w": 3, "x": 9, - "y": 20 + "y": 21 }, "id": 21, "options": { @@ -694,8 +758,8 @@ "targets": [ { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "editorMode": "builder", "expr": "keptn_deployment_deploymentduration{keptn_deployment_app_name=\"$Application\"}", @@ -749,13 +813,13 @@ "list": [ { "current": { - "selected": false, + "selected": true, "text": "podtato-head", "value": "podtato-head" }, "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "definition": "label_values(keptn_deployment_app_name)", "hide": 0, @@ -775,8 +839,8 @@ }, { "datasource": { - "type": "prometheus" - + "type": "prometheus", + "uid": "prometheus" }, "filters": [], "hide": 0, @@ -787,13 +851,13 @@ ] }, "time": { - "from": "now-24h", + "from": "now-2d", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Keptn Applications", - "uid": null, + "uid": "nbiPNgN4z", "version": 1, "weekStart": "" } diff --git a/examples/Makefile b/examples/Makefile index 343321a590..29a7fbb8c9 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -11,7 +11,7 @@ install: install-observability @echo "-----------------------------------" helm repo add keptn https://charts.lifecycle.keptn.sh helm repo update - helm upgrade --install keptn keptn/keptn -n $(TOOLKIT_NAMESPACE) --set 'lifecycleOperator.promotionTasksEnabled="true"' --create-namespace --wait + helm upgrade --install keptn keptn/keptn -n $(TOOLKIT_NAMESPACE) --set 'lifecycleOperator.promotionTasksEnabled=true' --create-namespace --wait kubectl apply -f support/keptn/keptnconfig.yaml -n $(TOOLKIT_NAMESPACE) .PHONY: install-observability