feat: prometheus + grafana

This commit is contained in:
2026-07-09 13:25:15 +02:00
parent 800a78848d
commit 61fe3f4338
27 changed files with 2282 additions and 115 deletions
@@ -0,0 +1,24 @@
{config, ...}: let
nodeExporterPort = config.m3ta.ports.get "node-exporter";
cldNetbirdIP = "100.91.203.184";
in {
services.prometheus.scrapeConfigs = [
{
job_name = "node-cld";
static_configs = [
{
targets = ["${cldNetbirdIP}:${toString nodeExporterPort}"];
labels = {
instance = "AZ-CLD-1";
};
}
];
}
];
# Allow CLD to reach PRM prometheus scrapes (prometheus initiates connection TO CLD exporter)
networking.firewall.extraCommands = ''
# No PRM-side firewall change needed: PRM scrapes outbound to CLD:9100.
# CLD-side must allow inbound from 100.91.49.26 (PRM netbird IP) see CLD config.
'';
}