Add bird to monitoring
This commit is contained in:
parent
3ff361db44
commit
588db80877
@ -448,6 +448,7 @@
|
||||
enable = true;
|
||||
id = "104";
|
||||
pubkey = "sro9DUSMtVr5xV2o3GTgg+0vmLj+bRc8fN+3pIr6+HY=";
|
||||
bird = true;
|
||||
};
|
||||
|
||||
services.unbound = {
|
||||
|
@ -310,6 +310,7 @@
|
||||
enable = true;
|
||||
id = "301";
|
||||
pubkey = "kTuC3/rLr4Qb3C4oEn1ecB/vS78poxmu6/Id3Rc1VGY=";
|
||||
bird = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "21.03";
|
||||
|
@ -168,6 +168,7 @@
|
||||
enable = true;
|
||||
id = "305";
|
||||
pubkey = "DRJ4FFqNCRgxzmD+k4WKVKJiKKTxTm5Uupcz04j1Ag8=";
|
||||
bird = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "21.03";
|
||||
|
@ -168,6 +168,7 @@
|
||||
enable = true;
|
||||
id = "306";
|
||||
pubkey = "5+/S3Fj0HknkKgUTgtmDhS7MoHZ2Ygsi/+eij+Gnf34=";
|
||||
bird = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "21.03";
|
||||
|
@ -252,6 +252,7 @@
|
||||
enable = true;
|
||||
id = "101";
|
||||
pubkey = "H9Pvx/BzwEMM7acT9mioT8zBD2Yn13L82EKKqdAfeGM=";
|
||||
bird = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "21.03";
|
||||
|
@ -23,6 +23,12 @@ let
|
||||
"${host.config.networking.hostName}.mon.clerie.de:9100")
|
||||
monitoringHosts;
|
||||
|
||||
birdMonitoringTargets = mapAttrsToList (name: host:
|
||||
"${host.config.networking.hostName}.mon.clerie.de:9324")
|
||||
(filterAttrs (name: host:
|
||||
attrByPath ["clerie" "monitoring" "bird"] false host.config)
|
||||
monitoringHosts);
|
||||
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
@ -137,6 +143,15 @@ in {
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "bird-exporter";
|
||||
scrape_interval = "20s";
|
||||
static_configs = [
|
||||
{
|
||||
targets = birdMonitoringTargets;
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "zimmer-temp";
|
||||
scrape_interval = "20s";
|
||||
|
@ -172,6 +172,7 @@
|
||||
enable = true;
|
||||
id = "103";
|
||||
pubkey = "BHRfdK+HsoBXQHgLXotMnfPgfRrsVNHdSg19fvS2kg4=";
|
||||
bird = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "21.03";
|
||||
|
@ -172,6 +172,7 @@
|
||||
enable = true;
|
||||
id = "102";
|
||||
pubkey = "+mJN+ustPo2ehP0wqajYs3nTdJ0SPuIDyiZQSHFIK3o=";
|
||||
bird = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "21.03";
|
||||
|
@ -21,6 +21,7 @@ in
|
||||
type = types.str;
|
||||
description = "Public Key of the monitoring wireguard interface of this host";
|
||||
};
|
||||
bird = mkEnableOption "Monitor bird";
|
||||
};
|
||||
};
|
||||
|
||||
@ -47,5 +48,11 @@ in
|
||||
openFirewall = true;
|
||||
firewallFilter = "-i wg-monitoring -p tcp -m tcp --dport 9100";
|
||||
};
|
||||
|
||||
services.prometheus.exporters.bird = mkIf cfg.bird {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
firewallFilter = "-i wg-monitoring -p tcp -m tcp --dport 9324";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user