Browse Source

Add bird to monitoring

master
clerie 3 months ago
parent
commit
588db80877
  1. 1
      hosts/carbon/configuration.nix
  2. 1
      hosts/dn42-il-gw1/configuration.nix
  3. 1
      hosts/dn42-il-gw5/configuration.nix
  4. 1
      hosts/dn42-il-gw6/configuration.nix
  5. 1
      hosts/gatekeeper/configuration.nix
  6. 15
      hosts/monitoring-3/configuration.nix
  7. 1
      hosts/nonat/configuration.nix
  8. 1
      hosts/porter/configuration.nix
  9. 7
      modules/monitoring/default.nix

1
hosts/carbon/configuration.nix

@ -448,6 +448,7 @@ @@ -448,6 +448,7 @@
enable = true;
id = "104";
pubkey = "sro9DUSMtVr5xV2o3GTgg+0vmLj+bRc8fN+3pIr6+HY=";
bird = true;
};
services.unbound = {

1
hosts/dn42-il-gw1/configuration.nix

@ -310,6 +310,7 @@ @@ -310,6 +310,7 @@
enable = true;
id = "301";
pubkey = "kTuC3/rLr4Qb3C4oEn1ecB/vS78poxmu6/Id3Rc1VGY=";
bird = true;
};
system.stateVersion = "21.03";

1
hosts/dn42-il-gw5/configuration.nix

@ -168,6 +168,7 @@ @@ -168,6 +168,7 @@
enable = true;
id = "305";
pubkey = "DRJ4FFqNCRgxzmD+k4WKVKJiKKTxTm5Uupcz04j1Ag8=";
bird = true;
};
system.stateVersion = "21.03";

1
hosts/dn42-il-gw6/configuration.nix

@ -168,6 +168,7 @@ @@ -168,6 +168,7 @@
enable = true;
id = "306";
pubkey = "5+/S3Fj0HknkKgUTgtmDhS7MoHZ2Ygsi/+eij+Gnf34=";
bird = true;
};
system.stateVersion = "21.03";

1
hosts/gatekeeper/configuration.nix

@ -252,6 +252,7 @@ @@ -252,6 +252,7 @@
enable = true;
id = "101";
pubkey = "H9Pvx/BzwEMM7acT9mioT8zBD2Yn13L82EKKqdAfeGM=";
bird = true;
};
system.stateVersion = "21.03";

15
hosts/monitoring-3/configuration.nix

@ -23,6 +23,12 @@ let @@ -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 { @@ -137,6 +143,15 @@ in {
}
];
}
{
job_name = "bird-exporter";
scrape_interval = "20s";
static_configs = [
{
targets = birdMonitoringTargets;
}
];
}
{
job_name = "zimmer-temp";
scrape_interval = "20s";

1
hosts/nonat/configuration.nix

@ -172,6 +172,7 @@ @@ -172,6 +172,7 @@
enable = true;
id = "103";
pubkey = "BHRfdK+HsoBXQHgLXotMnfPgfRrsVNHdSg19fvS2kg4=";
bird = true;
};
system.stateVersion = "21.03";

1
hosts/porter/configuration.nix

@ -172,6 +172,7 @@ @@ -172,6 +172,7 @@
enable = true;
id = "102";
pubkey = "+mJN+ustPo2ehP0wqajYs3nTdJ0SPuIDyiZQSHFIK3o=";
bird = true;
};
system.stateVersion = "21.03";

7
modules/monitoring/default.nix

@ -21,6 +21,7 @@ in @@ -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 @@ -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…
Cancel
Save