nixos/tests/prometheus-exporters/systemd: Update for 0.5.0 release

This commit is contained in:
Scott Worley 2022-08-01 05:58:34 +00:00 committed by Martin Weinelt
parent 3ff276b5cd
commit ebf7f86489

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