diff --git a/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix b/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix index 8ae2c927b58c..82e881236adf 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix @@ -42,6 +42,14 @@ in { Whether or not the remote IP of a WireGuard peer should be exposed via prometheus. ''; }; + + addr = mkOption { + type = types.str; + default = "0.0.0.0"; + description = '' + IP address of the exporter. + ''; + }; }; serviceOpts = { path = [ pkgs.wireguard-tools ]; @@ -51,6 +59,7 @@ in { ExecStart = '' ${pkgs.prometheus-wireguard-exporter}/bin/prometheus_wireguard_exporter \ -p ${toString cfg.port} \ + -l ${cfg.addr} \ ${optionalString cfg.verbose "-v"} \ ${optionalString cfg.singleSubnetPerField "-s"} \ ${optionalString cfg.withRemoteIp "-r"} \ diff --git a/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix b/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix index 9b0d91747ad1..249a3f8a089a 100644 --- a/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/wireguard-exporter.nix @@ -2,13 +2,13 @@ rustPlatform.buildRustPackage rec { pname = "wireguard-exporter"; - version = "3.1.0"; + version = "3.1.1"; src = fetchFromGitHub { owner = "MindFlavor"; repo = "prometheus_wireguard_exporter"; rev = version; - sha256 = "0hl82cg6cijk3xf35cgi4v14gmxk3fj4c3z1x5hrs2i0j1i26ilw"; + sha256 = "1cc36bngpjq8138f98d2dl0imgisiph7xmw1i7csmjs03b4pnfcx"; }; cargoSha256 = "1ndb33bi08j40b4jkj4q7d3k0cw5fscz2gc2cc3134nbs2r7jamk";