From 0498d770f216b6c0404308b01a83a59fda3b95fa Mon Sep 17 00:00:00 2001 From: alkatrazz Date: Thu, 14 May 2026 18:42:11 +0200 Subject: [PATCH] =?UTF-8?q?fix(monitoring):=20dashboard=20infra=20nodata?= =?UTF-8?q?=20=E2=80=94=20nftables=20pod=20CIDR=20+=20mountpoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nftables.conf.j2 : - Ajoute 10.42.0.0/16 (CIDR pods k8s) pour port 9100 (node_exporter) et port 8080 (hermes webhook AlertManager) - Appliqué live sur storage-01 + persisté dans /etc/sysconfig/nftables.conf - storage-01 était up=0 (timeout) car pods Prometheus ne pouvaient pas l'atteindre malgré node_exporter actif dashboard-infrastructure.yaml : - Corrige mountpoint /srv → /srv/data (RAID5 monté sur /srv/data) Co-Authored-By: Claude Sonnet 4.6 --- ansible/roles/gateway/templates/nftables.conf.j2 | 8 ++++---- .../monitoring/dashboards/dashboard-infrastructure.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/roles/gateway/templates/nftables.conf.j2 b/ansible/roles/gateway/templates/nftables.conf.j2 index bb25344..24c9b24 100644 --- a/ansible/roles/gateway/templates/nftables.conf.j2 +++ b/ansible/roles/gateway/templates/nftables.conf.j2 @@ -32,11 +32,11 @@ table inet filter { # Services données (accès cluster uniquement) tcp dport { 5432, 6333, 6334, 9000, 9001 } ip saddr 192.168.10.0/24 accept - # Monitoring — node_exporter + alertmanager webhook (accès cluster) - tcp dport { 9100, 9093 } ip saddr 192.168.10.0/24 accept + # Monitoring — node_exporter (scraping par Prometheus : nœuds cluster + pods 10.42/16) + tcp dport 9100 ip saddr { 192.168.10.0/24, 10.42.0.0/16 } accept - # Hermes gateway (accès LAN domestique + cluster) - tcp dport 8080 ip saddr { 192.168.1.0/24, 192.168.10.0/24 } accept + # Hermes gateway (accès LAN domestique + cluster + pods k8s pour alertmanager webhook) + tcp dport 8080 ip saddr { 192.168.1.0/24, 192.168.10.0/24, 10.42.0.0/16 } accept # Hermes dashboard (poste admin uniquement) tcp dport 9119 ip saddr {{ hermes_dashboard_allowed_ip }} accept diff --git a/k8s/infra/monitoring/dashboards/dashboard-infrastructure.yaml b/k8s/infra/monitoring/dashboards/dashboard-infrastructure.yaml index 1c3d15b..abd2b0f 100644 --- a/k8s/infra/monitoring/dashboards/dashboard-infrastructure.yaml +++ b/k8s/infra/monitoring/dashboards/dashboard-infrastructure.yaml @@ -369,7 +369,7 @@ data: "targets": [ { "datasource": {"type": "prometheus", "uid": "${datasource}"}, - "expr": "100 - (node_filesystem_avail_bytes{job=\"storage-01\",mountpoint=\"/srv\",fstype!=\"tmpfs\"} / node_filesystem_size_bytes{job=\"storage-01\",mountpoint=\"/srv\",fstype!=\"tmpfs\"} * 100)", + "expr": "100 - (node_filesystem_avail_bytes{job=\"storage-01\",mountpoint=\"/srv/data\",fstype!=\"tmpfs\"} / node_filesystem_size_bytes{job=\"storage-01\",mountpoint=\"/srv/data\",fstype!=\"tmpfs\"} * 100)", "legendFormat": "/srv", "refId": "A" }