cluster

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

commit 2f90729fa64681bfac277b2e44cdeef4b81f048a
parent 1d52650a8ddb3521d3fe459be3f2b15e47b81ee6
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 27 Sep 2024 00:15:31 +0200

Add d4all status board

Diffstat:
Aapps/base/victoria-metrics-k8s-stack/dashboards/draupnir4all_status.json | 410+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mapps/base/victoria-metrics-k8s-stack/release.yaml | 5+++++
2 files changed, 415 insertions(+), 0 deletions(-)

diff --git a/apps/base/victoria-metrics-k8s-stack/dashboards/draupnir4all_status.json b/apps/base/victoria-metrics-k8s-stack/dashboards/draupnir4all_status.json @@ -0,0 +1,409 @@ +{ + "__inputs": [ + { + "name": "DS_LOKI", + "label": "Loki", + "description": "", + "type": "datasource", + "pluginId": "loki", + "pluginName": "Loki" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.4.0" + }, + { + "type": "panel", + "id": "logs", + "name": "Logs", + "version": "" + }, + { + "type": "datasource", + "id": "loki", + "name": "Loki", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + } + ], + "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, + "id": null, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 3, + "panels": [], + "title": "Status Overview", + "type": "row" + }, + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "description": "Green means everything is as expected", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value #Failed" + }, + "properties": [ + { + "id": "displayName", + "value": "Failed" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #BackOff" + }, + "properties": [ + { + "id": "displayName", + "value": "BackOff" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 1, + "options": { + "colorMode": "background_solid", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "max" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "editorMode": "builder", + "expr": "max(count_over_time({app=\"kube-event-exporter\"} | json | namespace = `matrix` | reason = `Failed` | name =~ `.*draupnir-synapse.*` [5m]))", + "intervalMs": 1000, + "legendFormat": "Failed", + "maxDataPoints": 43200, + "queryType": "instant", + "refId": "Failed" + }, + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "editorMode": "builder", + "expr": "count_over_time({app=\"kube-event-exporter\"} | json | namespace = `matrix` | reason = `BackOff` | name =~ `.*draupnir-synapse.*` [5m])", + "hide": false, + "intervalMs": 1000, + "legendFormat": "BackOff", + "maxDataPoints": 43200, + "queryType": "instant", + "refId": "BackOff" + } + ], + "title": "Draupnir Synapse Status", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "description": "Green means everything is as expected", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value #Failed" + }, + "properties": [ + { + "id": "displayName", + "value": "Failed" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #BackOff" + }, + "properties": [ + { + "id": "displayName", + "value": "BackOff" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 2, + "options": { + "colorMode": "background_solid", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "max" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "editorMode": "builder", + "expr": "max(count_over_time({app=\"kube-event-exporter\"} | json | namespace = `matrix` | reason = `Failed` | name =~ `.*draupnir4all.*` [5m]))", + "intervalMs": 1000, + "legendFormat": "Failed", + "maxDataPoints": 43200, + "queryType": "instant", + "refId": "Failed" + }, + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "editorMode": "builder", + "expr": "count_over_time({app=\"kube-event-exporter\"} | json | namespace = `matrix` | reason = `BackOff` | name =~ `.*draupnir4all.*` [5m])", + "hide": false, + "intervalMs": 1000, + "legendFormat": "BackOff", + "maxDataPoints": 43200, + "queryType": "instant", + "refId": "BackOff" + } + ], + "title": "Draupnir4All Status", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 4, + "panels": [], + "title": "Logs", + "type": "row" + }, + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 5, + "options": { + "dedupStrategy": "exact", + "enableLogDetails": true, + "prettifyLogMessage": true, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "editorMode": "builder", + "expr": "{app=\"kube-event-exporter\"} | json | namespace = `matrix` | name =~ `.*draupnir-synapse.*`", + "queryType": "range", + "refId": "A" + } + ], + "title": "Draupnir4All Synapse Events", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 6, + "options": { + "dedupStrategy": "exact", + "enableLogDetails": true, + "prettifyLogMessage": true, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${DS_LOKI}" + }, + "editorMode": "builder", + "expr": "{app=\"kube-event-exporter\"} | json | namespace = `matrix` | name =~ `.*draupnir4all.*`", + "queryType": "range", + "refId": "A" + } + ], + "title": "Draupnir4All Events", + "type": "logs" + } + ], + "refresh": "10s", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "browser", + "title": "Draupnir4All Status and logs", + "uid": "bdz3qba37rwg0e", + "version": 4, + "weekStart": "" +} +\ No newline at end of file diff --git a/apps/base/victoria-metrics-k8s-stack/release.yaml b/apps/base/victoria-metrics-k8s-stack/release.yaml @@ -989,6 +989,11 @@ spec: datasource: - name: DS_PROMETHEUS value: Prometheus + draupnir4all_status: + url: https://raw.githubusercontent.com/MTRNord/cluster/main/apps/base/victoria-metrics-k8s-stack/dashboards/draupnir4all_status.json + datasource: + - name: DS_LOKI + value: loki flux-control-plane: url: https://raw.githubusercontent.com/fluxcd/flux2-monitoring-example/bcae1ef44963da89caabe962a93280c0dfad3381/monitoring/configs/dashboards/control-plane.json datasource: