From 5de2f00a720e29cdc81f5300a69cda46f12902ab Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Tue, 30 Dec 2025 13:32:30 +0100 Subject: tweak(ev): set up prometheus for hosehawk --- nixos/hosts/ev/default.nix | 9 ++++++++- nixos/hosts/ev/hosehawk.nix | 10 +++++++--- nixos/hosts/ev/ports.nix | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) (limited to 'nixos/hosts/ev') diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix index 4c8562d..fc7d425 100644 --- a/nixos/hosts/ev/default.nix +++ b/nixos/hosts/ev/default.nix @@ -132,7 +132,8 @@ in }; hosehawk = { - port = ports.hosehawk; + nestPort = ports.hosehawk; + hawkMetricsPort = ports.prometheusHoseHawk; }; kodi = { @@ -172,6 +173,12 @@ in targets = ["localhost:${toString ports.prometheusSqlExporter}"]; }]; } + { + job_name = "hosehawk"; + static_configs = [{ + targets = ["localhost:${toString ports.prometheusHoseHawk}"]; + }]; + } ]; }; diff --git a/nixos/hosts/ev/hosehawk.nix b/nixos/hosts/ev/hosehawk.nix index 09637cd..3a9c71d 100644 --- a/nixos/hosts/ev/hosehawk.nix +++ b/nixos/hosts/ev/hosehawk.nix @@ -10,7 +10,10 @@ in ]; options.hosehawk = { - port = lib.mkOption { + nestPort = lib.mkOption { + type = lib.types.int; + }; + hawkMetricsPort = lib.mkOption { type = lib.types.int; }; }; @@ -18,11 +21,12 @@ in config = { services.hosenest = { enable = true; - port = cfg.port; + port = cfg.nestPort; }; services.hosehawk = { enable = true; - hosenestUrl = "http://localhost:${toString cfg.port}/"; + hosenestUrl = "http://localhost:${toString cfg.nestPort}/"; + prometheusPort = cfg.hawkMetricsPort; }; }; } diff --git a/nixos/hosts/ev/ports.nix b/nixos/hosts/ev/ports.nix index 71a611e..b68a046 100644 --- a/nixos/hosts/ev/ports.nix +++ b/nixos/hosts/ev/ports.nix @@ -7,6 +7,7 @@ rec { prometheus = 9090; prometheusNodeExporter = 9002; prometheusSqlExporter = 9003; + prometheusHoseHawk = 9004; qbittorrent = 7777; zigbee2mqtt = 8080; -- cgit v1.3.1