cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

commit 6b08306edae2505b3b2cde7ce1092444426ac77e
parent 684fb43e166a24f8806a992eeeb55f864178f9b1
Author: MTRNord <MTRNord@users.noreply.github.com>
Date:   Tue, 24 Mar 2026 14:53:39 +0100

add stalwart grafana dash

Signed-off-by: MTRNord <MTRNord@users.noreply.github.com>

Diffstat:
Mapps/talos_cluster/monitoring-stack/dashboards/kustomization.yaml | 9+++++++++
Aapps/talos_cluster/monitoring-stack/dashboards/stalwart.json | 1+
Mapps/talos_cluster/stalwart/release.yaml | 7+++++++
3 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/apps/talos_cluster/monitoring-stack/dashboards/kustomization.yaml b/apps/talos_cluster/monitoring-stack/dashboards/kustomization.yaml @@ -87,3 +87,12 @@ configMapGenerator: grafana_dashboard: "1" annotations: grafana_folder: k6 + - name: grafana-dashboards-stalwart + namespace: monitoring + files: + - stalwart.json=stalwart.json + options: + labels: + grafana_dashboard: "1" + annotations: + grafana_folder: Mail diff --git a/apps/talos_cluster/monitoring-stack/dashboards/stalwart.json b/apps/talos_cluster/monitoring-stack/dashboards/stalwart.json @@ -0,0 +1 @@ +{"annotations": {"list": [{"builtIn": 1, "datasource": {"type": "datasource", "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": 1, "links": [], "panels": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-BlPu"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "dark-purple"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 5, "x": 0, "y": 0}, "id": 67, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_user_count", "format": "time_series", "instant": true, "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "User Count", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-BlPu"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "dark-purple"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 5, "x": 5, "y": 0}, "id": 68, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_domain_count", "format": "time_series", "instant": true, "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "Domain Count", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-YlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "red"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 5, "x": 10, "y": 0}, "id": 69, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_auth_failed", "format": "time_series", "instant": true, "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "Auth failed", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}, {"color": "#1F60C4", "value": 50}, {"color": "#C4162A", "value": 100}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 5, "x": 15, "y": 0}, "id": 64, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_http_active_connections", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "HTTP Active connections", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "dark-green"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 4, "x": 20, "y": 0}, "id": 66, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_http_connection_start", "format": "time_series", "instant": true, "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "HTTP Connection start", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 5, "w": 5, "x": 0, "y": 7}, "id": 73, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_smtp_active_connections", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "__auto", "range": false, "refId": "A"}], "title": "SMTP Active connections", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 5, "w": 5, "x": 5, "y": 7}, "id": 75, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_imap_active_connections", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "__auto", "range": false, "refId": "A"}], "title": "IMAP Active connections", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 5, "w": 5, "x": 10, "y": 7}, "id": 76, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_pop3_active_connections", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "__auto", "range": false, "refId": "A"}], "title": "POP3 Active connections", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 5, "w": 5, "x": 15, "y": 7}, "id": 74, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_delivery_active_connections", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "__auto", "range": false, "refId": "A"}], "title": "Delivery Active connections", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 5, "w": 4, "x": 20, "y": 7}, "id": 77, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_sieve_active_connections", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "__auto", "range": false, "refId": "A"}], "title": "Sieve Active connections", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-GrYlRd"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 6, "x": 0, "y": 12}, "id": 78, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_store_blob_read", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "Store BLOB Read", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-RdYlGr"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 6, "x": 6, "y": 12}, "id": 71, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_store_data_write", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "Store Data Write", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "continuous-BlPu"}, "mappings": [{"options": {"match": "null", "result": {"text": "N/A"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "#37872D"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 6, "x": 12, "y": 12}, "id": 72, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_store_data_iterate", "format": "time_series", "hide": false, "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "Store Data Iterate", "type": "stat"}, {"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "description": "", "fieldConfig": {"defaults": {"color": {"mode": "thresholds"}, "decimals": 0, "fieldMinMax": false, "mappings": [{"options": {"match": "null", "result": {"index": 0, "text": "0"}}, "type": "special"}], "thresholds": {"mode": "absolute", "steps": [{"color": "dark-blue"}]}, "unit": "none"}, "overrides": []}, "gridPos": {"h": 7, "w": 6, "x": 18, "y": 12}, "id": 63, "maxDataPoints": 100, "options": {"colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "percentChangeColorMode": "standard", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "showPercentChange": false, "textMode": "auto", "wideLayout": true}, "pluginVersion": "12.0.1", "targets": [{"datasource": {"type": "prometheus", "uid": "${DS_PROMETHEUS}"}, "editorMode": "code", "exemplar": false, "expr": "stalwart_http_response_body", "format": "time_series", "hide": false, "instant": true, "intervalFactor": 1, "legendFormat": "", "range": false, "refId": "A"}], "title": "HTTP Response body", "type": "stat"}], "refresh": "15s", "schemaVersion": 41, "tags": ["prometheus", "service", "stalwart"], "templating": {"list": [{"current": {}, "includeAll": false, "label": "Datasource", "name": "DS_PROMETHEUS", "options": [], "query": "prometheus", "refresh": 1, "regex": "", "type": "datasource"}]}, "time": {"from": "now-1h", "to": "now"}, "timepicker": {"refresh_intervals": ["15s", "30s", "1m", "5m", "10m"]}, "timezone": "", "title": "Stalwart Mailserver Metrics", "uid": "${DS_PROMETHEUS}", "version": 9, "weekStart": "", "gnetId": 23498, "description": "Simple stalwart metrics dashboard based on the default stalwart metrics endpoint"} diff --git a/apps/talos_cluster/stalwart/release.yaml b/apps/talos_cluster/stalwart/release.yaml @@ -37,6 +37,13 @@ spec: value: key: metrics-username name: stalwart-secret + - op: add + path: /spec/endpoints/0/metricRelabelings + value: + - sourceLabels: [__name__] + regex: (.+) + targetLabel: __name__ + replacement: stalwart_$1 values: replicaCount: 1