diff options
author | Martin Fischer <martin@push-f.com> | 2025-09-18 10:25:03 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2025-09-18 10:25:03 +0200 |
commit | e78b42dfe2d4852a39770f8b16b46eed1780e87a (patch) | |
tree | cfaafcc4a3a92239b8cc124a9f730cfeb1e378fc | |
parent | 6777e059414701107f77c62cdd32435d27047c2e (diff) |
refactor: specify prometheus port
-rw-r--r-- | nixos/hosts/ev/default.nix | 1 | ||||
-rw-r--r-- | nixos/hosts/tente/default.nix | 1 | ||||
-rw-r--r-- | nixos/shared/monitoring.nix | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix index c797d29..a3dd610 100644 --- a/nixos/hosts/ev/default.nix +++ b/nixos/hosts/ev/default.nix @@ -43,6 +43,7 @@ torrent.networkNamespace = "se"; monitoring.alloyUiPort = 3001; monitoring.lokiPort = 3030; + monitoring.prometheusPort = 9090; monitoring.prometheusNodeExporterPort = 9002; home-automation.zigbeeSerialPort = "/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_e2fed465c59ded11962fd7a5a7669f5d-if00-port0"; diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix index b9ac389..708e218 100644 --- a/nixos/hosts/tente/default.nix +++ b/nixos/hosts/tente/default.nix @@ -122,6 +122,7 @@ rec { grafana.matrixServerUrl = "http://localhost:${toString matrix.port}"; monitoring.alloyUiPort = 3001; monitoring.lokiPort = 3030; + monitoring.prometheusPort = 9090; monitoring.prometheusNodeExporterPort = 9002; exporters.sqlExporterPort = 9003; headscale.port = 8080; diff --git a/nixos/shared/monitoring.nix b/nixos/shared/monitoring.nix index 8711630..eecad59 100644 --- a/nixos/shared/monitoring.nix +++ b/nixos/shared/monitoring.nix @@ -12,6 +12,9 @@ in alloyUiPort = lib.mkOption { type = lib.types.int; }; + prometheusPort = lib.mkOption { + type = lib.types.int; + }; prometheusNodeExporterPort = lib.mkOption { type = lib.types.int; }; @@ -23,6 +26,7 @@ in config = { services.prometheus = { enable = true; + port = cfg.prometheusPort; retentionTime = "1y"; |