From cd946123691e59f3c743c65b478fc072e1bf7e9e Mon Sep 17 00:00:00 2001 From: QuantumEnigmaa Date: Tue, 7 Jan 2025 14:11:33 +0100 Subject: [PATCH] add promtail overview dashboard --- CHANGELOG.md | 4 + .../shared/private/promtail-overview.json | 219 ++++++++++++++++++ 2 files changed, 223 insertions(+) create mode 100644 helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/promtail-overview.json diff --git a/CHANGELOG.md b/CHANGELOG.md index e9312d85..0ee4b33a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add `Promtail overview` dashboard. + ### Changed - Fixed nodes overview dashboard to avoid master duplicating numbers. diff --git a/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/promtail-overview.json b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/promtail-overview.json new file mode 100644 index 00000000..732e311b --- /dev/null +++ b/helm/dashboards/charts/private_dashboards_mz/dashboards/shared/private/promtail-overview.json @@ -0,0 +1,219 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "%", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "timezone": [ + "" + ], + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "100 * (sum(rate(promtail_request_duration_seconds_count{status_code!~\"2..\", cluster_id=~\"$cluster\"}[5m])) by (cluster_id, installation, provider, pipeline, namespace, job, route, instance, pod) / sum(rate(promtail_request_duration_seconds_count{cluster_id=~\"$cluster\"}[5m])) by (cluster_id, installation, provider, pipeline, namespace, job, route, instance, pod))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Amount of failed requests", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "11.3.1", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "editorMode": "code", + "expr": "{cluster_id=~\"$cluster\", container=\"promtail\"} |= ``", + "queryType": "range", + "refId": "A" + } + ], + "title": "Promtail pods' logs", + "type": "logs" + } + ], + "preload": false, + "refresh": "", + "schemaVersion": 40, + "tags": [], + "templating": { + "list": [ + { + "current": { + "text": "Prometheus", + "value": "PBFA97CFB590B2093" + }, + "label": "Datasource", + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_pod_container_info,cluster_id)", + "includeAll": true, + "label": "Cluster", + "name": "cluster", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_pod_container_info,cluster_id)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "time": { + "from": "now-12h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Promtail overview", + "version": 0, + "weekStart": "" +}