From c81dc5a13b469c511fac6fa2390b70422d1b4da5 Mon Sep 17 00:00:00 2001 From: azahi Date: Wed, 12 Mar 2025 20:17:13 +0300 Subject: 2025-03-12 --- modules/piracy/prowlarr.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'modules/piracy/prowlarr.nix') diff --git a/modules/piracy/prowlarr.nix b/modules/piracy/prowlarr.nix index ebcba7f..c1c34cc 100644 --- a/modules/piracy/prowlarr.nix +++ b/modules/piracy/prowlarr.nix @@ -44,7 +44,7 @@ in url = "http://127.0.0.1"; port = port + 10000; apiKeyFile = config.secrets.lidarr-api-key.path; - listenAddress = this.wireguard.ipv4.address; + listenAddress = "127.0.0.1"; environment = { PROWLARR__BACKFILL = "true"; PROWLARR__BACKFILL_DATE_SINCE = "2025-01-01"; @@ -52,6 +52,21 @@ in }; }; + environment.etc."alloy/prowlarr.alloy".text = + with config.services.prometheus.exporters.exportarr-prowlarr; '' + prometheus.scrape "prowlarr" { + targets = [ + { + __address__ = "${listenAddress}:${toString port}", + instance = "${config.networking.hostName}", + } + ] + forward_to = [prometheus.relabel.default.receiver] + } + ''; + + systemd.services.alloy.reloadTriggers = [ config.environment.etc."alloy/prowlarr.alloy".source ]; + topology.nodes.${this.hostname}.services.prowlarr = { name = "Prowlarr"; icon = "${inputs.homelab-svg-assets}/assets/prowlarr.svg"; -- cgit 1.4.1