mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2025-02-16 18:31:44 +01:00
allow prometheus to access metrics
This commit is contained in:
parent
c7c25d5dbc
commit
51a349428f
@ -7,6 +7,7 @@
|
|||||||
inputs.srvos.nixosModules.hardware-hetzner-cloud
|
inputs.srvos.nixosModules.hardware-hetzner-cloud
|
||||||
inputs.srvos.nixosModules.mixins-telegraf
|
inputs.srvos.nixosModules.mixins-telegraf
|
||||||
./single-disk.nix
|
./single-disk.nix
|
||||||
|
./monitoring.nix
|
||||||
{
|
{
|
||||||
sops.age.keyFile = "/var/lib/secrets/age";
|
sops.age.keyFile = "/var/lib/secrets/age";
|
||||||
}
|
}
|
||||||
|
10
modules/monitoring.nix
Normal file
10
modules/monitoring.nix
Normal 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
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user