From c54b655b0e3edfc88dfaf290fc7ee0b7c593dc18 Mon Sep 17 00:00:00 2001 From: June Date: Thu, 3 Oct 2024 16:09:42 +0200 Subject: [PATCH] all: setup prometheus node exporter for all hosts on Chaosknoten Do that so we can have monitoring for them via prometheus, alertmanager and grafana. Also add a local ip for the git host for PVE firewalling. --- config/extra/prometheus-exporter.nix | 8 ++++++++ config/hosts/git/networking.nix | 4 ++++ flake.nix | 10 ++++++++++ 3 files changed, 22 insertions(+) create mode 100644 config/extra/prometheus-exporter.nix diff --git a/config/extra/prometheus-exporter.nix b/config/extra/prometheus-exporter.nix new file mode 100644 index 0000000..46477ed --- /dev/null +++ b/config/extra/prometheus-exporter.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + services.prometheus.exporters.node = { + enable = true; + openFirewall = true; + }; +} diff --git a/config/hosts/git/networking.nix b/config/hosts/git/networking.nix index 688fff3..34159f9 100644 --- a/config/hosts/git/networking.nix +++ b/config/hosts/git/networking.nix @@ -11,6 +11,10 @@ address = "212.12.51.136"; prefixLength = 28; } + { + address = "172.31.17.154"; + prefixLength = 25; + } ]; ipv6.addresses = [ { diff --git a/flake.nix b/flake.nix index 4e33852..106daa5 100644 --- a/flake.nix +++ b/flake.nix @@ -113,6 +113,7 @@ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops + ./config/extra/prometheus-exporter.nix ./config/hosts/netbox ]; }; @@ -123,6 +124,7 @@ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops + ./config/extra/prometheus-exporter.nix ./config/hosts/matrix ]; }; @@ -133,6 +135,7 @@ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops + ./config/extra/prometheus-exporter.nix ./config/hosts/public-web-static ]; }; @@ -143,6 +146,7 @@ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops + ./config/extra/prometheus-exporter.nix ./config/hosts/git ]; }; @@ -153,6 +157,7 @@ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops + ./config/extra/prometheus-exporter.nix ./config/hosts/forgejo-actions-runner ]; }; @@ -171,6 +176,7 @@ modules = [ ./config/common ./config/proxmox-vm + ./config/extra/prometheus-exporter.nix ./config/hosts/eh22-wiki ]; }; @@ -180,6 +186,7 @@ modules = [ ./config/common ./config/proxmox-vm + ./config/extra/prometheus-exporter.nix ./config/hosts/nix-box-june ]; }; @@ -208,6 +215,7 @@ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops + ./config/extra/prometheus-exporter.nix ./config/hosts/mjolnir ]; }; @@ -218,6 +226,7 @@ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops + ./config/extra/prometheus-exporter.nix ./config/hosts/woodpecker ]; specialArgs = { @@ -241,6 +250,7 @@ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops + ./config/extra/prometheus-exporter.nix ./config/hosts/penpot ]; };