From 72395ecc0e4b3995ec5014ce1d318d3a39d39334 Mon Sep 17 00:00:00 2001 From: chemavx Date: Wed, 22 Jul 2026 09:51:59 +0000 Subject: [PATCH] monitoring: panel para el runner, Prometheus y Uptime Kuma MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Los tres puntos ciegos que quedaban. El gitea-runner se dejó fuera del panel de gitea a propósito, porque si cae se paran los builds pero Gitea sigue sirviendo y pintar "gitea: Down" sería una falsa alarma; pero su caída es de las mudas y merecía el suyo. Prometheus y Uptime Kuma se quedaron sin representar cuando el panel "grafana" pasó a mirar sólo a su deployment en vez de a todo el namespace monitoring (5d0078c). Misma forma que los otros doce, con el selector acotado al workload concreto; para Prometheus, que es un StatefulSet, la rama de deployment sale vacía y resuelve la de statefulset. La fila de servicios estaba llena, así que se abre una tercera y todo lo de debajo baja 4 filas de rejilla. Verificado antes de escribirlo: las tres consultas dan 1 ahora y 0 con escasez de réplicas simulada. Y después, los 15 estados a través del proxy de datasource de Grafana, no consultando yo a Prometheus por otro lado. Nota conocida, no un fallo: si kube-state-metrics cae, los 15 paneles se ponen en rojo a la vez, porque todos dependen de sus métricas. Un tablero entero en rojo hay que leerlo como "se ha caído el que mide", no como quince caídas. Co-Authored-By: Claude Opus 4.8 --- .../configmap-chemavx-homelab-overview.yaml | 280 +++++++++++++++++- 1 file changed, 272 insertions(+), 8 deletions(-) diff --git a/monitoring/configmap-chemavx-homelab-overview.yaml b/monitoring/configmap-chemavx-homelab-overview.yaml index 70b3557..f18ebf9 100644 --- a/monitoring/configmap-chemavx-homelab-overview.yaml +++ b/monitoring/configmap-chemavx-homelab-overview.yaml @@ -1375,13 +1375,277 @@ data: "title": "searxng", "type": "stat" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 0, + "text": "Down" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "green", + "index": 1, + "text": "Running" + }, + "to": null + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 0, + "y": 18 + }, + "id": 34, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "12.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "min((kube_deployment_status_replicas_available{namespace=\"gitea\",deployment=\"gitea-runner\"} >= bool 1) or (kube_statefulset_status_replicas_ready{namespace=\"gitea\",deployment=\"gitea-runner\"} >= bool 1)) or vector(0)", + "instant": true, + "legendFormat": "gitea-runner", + "refId": "A" + } + ], + "title": "gitea-runner", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 0, + "text": "Down" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "green", + "index": 1, + "text": "Running" + }, + "to": null + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 4, + "y": 18 + }, + "id": 35, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "12.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "min((kube_deployment_status_replicas_available{namespace=\"monitoring\",statefulset=\"prometheus-kube-prometheus-stack-prometheus\"} >= bool 1) or (kube_statefulset_status_replicas_ready{namespace=\"monitoring\",statefulset=\"prometheus-kube-prometheus-stack-prometheus\"} >= bool 1)) or vector(0)", + "instant": true, + "legendFormat": "prometheus", + "refId": "A" + } + ], + "title": "prometheus", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 0, + "text": "Down" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "green", + "index": 1, + "text": "Running" + }, + "to": null + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 8, + "y": 18 + }, + "id": 36, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "12.4.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "min((kube_deployment_status_replicas_available{namespace=\"monitoring\",deployment=\"uptime-kuma\"} >= bool 1) or (kube_statefulset_status_replicas_ready{namespace=\"monitoring\",deployment=\"uptime-kuma\"} >= bool 1)) or vector(0)", + "instant": true, + "legendFormat": "uptime-kuma", + "refId": "A" + } + ], + "title": "uptime-kuma", + "type": "stat" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 18 + "y": 22 }, "id": 18, "panels": [], @@ -1417,7 +1681,7 @@ data: "h": 8, "w": 12, "x": 0, - "y": 19 + "y": 23 }, "id": 19, "options": { @@ -1479,7 +1743,7 @@ data: "h": 8, "w": 12, "x": 12, - "y": 19 + "y": 23 }, "id": 20, "options": { @@ -1518,7 +1782,7 @@ data: "h": 1, "w": 24, "x": 0, - "y": 27 + "y": 31 }, "id": 30, "panels": [], @@ -1553,7 +1817,7 @@ data: "h": 8, "w": 8, "x": 0, - "y": 28 + "y": 32 }, "id": 31, "options": { @@ -1613,7 +1877,7 @@ data: "h": 8, "w": 8, "x": 8, - "y": 28 + "y": 32 }, "id": 32, "options": { @@ -1680,7 +1944,7 @@ data: "h": 8, "w": 8, "x": 16, - "y": 28 + "y": 32 }, "id": 33, "options": { @@ -1728,6 +1992,6 @@ data: "timezone": "browser", "title": "ChemaVX Homelab Overview", "uid": "chemavx-homelab-v1", - "version": 6, + "version": 7, "weekStart": "" }