nixos/tests/prometheus-exporters/systemd: Update for 0.5.0 release
This commit is contained in:
parent
3ff276b5cd
commit
ebf7f86489
1 changed files with 3 additions and 3 deletions
|
@ -1181,21 +1181,21 @@ let
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
extraFlags = [
|
extraFlags = [
|
||||||
"--collector.enable-restart-count"
|
"--systemd.collector.enable-restart-count"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
metricProvider = { };
|
metricProvider = { };
|
||||||
exporterTest = ''
|
exporterTest = ''
|
||||||
wait_for_unit("prometheus-systemd-exporter.service")
|
wait_for_unit("prometheus-systemd-exporter.service")
|
||||||
wait_for_open_port(9558)
|
wait_for_open_port(9558)
|
||||||
succeed(
|
wait_until_succeeds(
|
||||||
"curl -sSf localhost:9558/metrics | grep '{}'".format(
|
"curl -sSf localhost:9558/metrics | grep '{}'".format(
|
||||||
'systemd_unit_state{name="basic.target",state="active",type="target"} 1'
|
'systemd_unit_state{name="basic.target",state="active",type="target"} 1'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
succeed(
|
succeed(
|
||||||
"curl -sSf localhost:9558/metrics | grep '{}'".format(
|
"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'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue