diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index d14c737a4bd1..4fdff7dbdab8 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -1181,21 +1181,21 @@ let enable = true; extraFlags = [ - "--collector.enable-restart-count" + "--systemd.collector.enable-restart-count" ]; }; metricProvider = { }; exporterTest = '' wait_for_unit("prometheus-systemd-exporter.service") wait_for_open_port(9558) - succeed( + wait_until_succeeds( "curl -sSf localhost:9558/metrics | grep '{}'".format( 'systemd_unit_state{name="basic.target",state="active",type="target"} 1' ) ) succeed( "curl -sSf localhost:9558/metrics | grep '{}'".format( - 'systemd_service_restart_total{state="prometheus-systemd-exporter.service"} 0' + 'systemd_service_restart_total{name="prometheus-systemd-exporter.service"} 0' ) ) ''; diff --git a/pkgs/servers/monitoring/prometheus/systemd-exporter.nix b/pkgs/servers/monitoring/prometheus/systemd-exporter.nix index 96029c99d8c6..4d5d97da7683 100644 --- a/pkgs/servers/monitoring/prometheus/systemd-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/systemd-exporter.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "systemd_exporter"; - version = "0.4.0"; + version = "0.5.0"; - vendorSha256 = "sha256-bYoB0r+d0j3esi/kK2a7/Duup9cf4M3WJjiBNs2+bj8="; + vendorSha256 = "sha256-XkwBhj2M1poirPkWzS71NbRTshc8dTKwaHoDfFxpykU="; src = fetchFromGitHub { owner = "povilasv"; repo = pname; rev = "v${version}"; - sha256 = "sha256-JDfRHczFnTP9sxA7polUE9qzJhSPIiAU58GBNDYkX4c="; + sha256 = "sha256-q6rnD8JCtB1zTkUfZt6f2Uyo91uFi3HYI7WFlZdzpBM="; }; passthru.tests = { inherit (nixosTests.prometheus-exporters) systemd; };