diff options
| author | Martin Fischer <martin@push-f.com> | 2025-12-30 13:32:30 +0100 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2025-12-30 13:32:30 +0100 |
| commit | 5de2f00a720e29cdc81f5300a69cda46f12902ab (patch) | |
| tree | c8bc963aa0a69f7c06378bd15ca746da86493dd3 /nixos/hosts/ev | |
| parent | ac134acb64e1ede86733602b7c467a7e9a0ee86b (diff) | |
tweak(ev): set up prometheus for hosehawk
Diffstat (limited to 'nixos/hosts/ev')
| -rw-r--r-- | nixos/hosts/ev/default.nix | 9 | ||||
| -rw-r--r-- | nixos/hosts/ev/hosehawk.nix | 10 | ||||
| -rw-r--r-- | nixos/hosts/ev/ports.nix | 1 |
3 files changed, 16 insertions, 4 deletions
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; |
