Merge pull request #184452 from r-ryantm/auto-update/systemd_exporter

This commit is contained in:
Martin Weinelt 2022-08-12 12:58:53 +02:00 committed by GitHub
commit 66f08894d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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'
)
)
'';

View File

@ -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; };