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