Merge pull request #27 from NixOS/joerg-ci

Monitoring fixes
This commit is contained in:
Jörg Thalheim 2024-02-20 16:47:02 +07:00 committed by GitHub
commit 21b52c4289
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,7 @@
inputs.srvos.nixosModules.hardware-hetzner-cloud
inputs.srvos.nixosModules.mixins-telegraf
./single-disk.nix
./monitoring.nix
{
sops.age.keyFile = "/var/lib/secrets/age";
}

10
modules/monitoring.nix Normal file
View File

@ -0,0 +1,10 @@
{
# Allow Mic92's prometheus server to access telegraf
networking.firewall.extraCommands = ''
ip6tables -A nixos-fw -p tcp --source 2a03:4000:62:fdb::/128 --dport 9273 -j nixos-fw-accept
'';
networking.firewall.extraStopCommands = ''
ip6tables -D nixos-fw -p tcp --source 2a03:4000:62:fdb::/128 --dport 9273 -j nixos-fw-accept || true
'';
}

View File

@ -33,7 +33,9 @@ in
address = [
# configure addresses including subnet mask
"65.21.240.250/32"
# TODO: drop this ip and only keep ::1
"2a01:4f9:c012:8178::/64"
"2a01:4f9:c012:8178::1/64"
];
routes = [
# create default routes for both IPv6 and IPv4