forked from mirrors/nixpkgs
nixos/ntpd-rs: fix metrics service
This commit is contained in:
parent
842d9d80cf
commit
35c015ff91
|
@ -74,13 +74,13 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.ntp-rs-metrics = lib.mkIf cfg.metrics.enable {
|
||||
systemd.services.ntpd-rs-metrics = lib.mkIf cfg.metrics.enable {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
User = "";
|
||||
Group = "";
|
||||
DynamicUser = true;
|
||||
ExecStart = [ "" "${lib.makeBinPath [ cfg.package ]}/bin/ntp-metrics-exporter --config=${configFile}" ];
|
||||
ExecStart = [ "" "${lib.makeBinPath [ cfg.package ]}/ntp-metrics-exporter --config=${configFile}" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -41,9 +41,11 @@ import ./make-test-python.nix ({ lib, ... }:
|
|||
|
||||
testScript = { nodes, ... }: ''
|
||||
start_all()
|
||||
server.wait_for_unit('multi-user.target')
|
||||
client.wait_for_unit('multi-user.target')
|
||||
server.succeed('systemctl is-active ntpd-rs.service')
|
||||
client.succeed('systemctl is-active ntpd-rs.service')
|
||||
|
||||
for machine in (server, client):
|
||||
machine.wait_for_unit('multi-user.target')
|
||||
machine.succeed('systemctl is-active ntpd-rs.service')
|
||||
machine.succeed('systemctl is-active ntpd-rs-metrics.service')
|
||||
machine.succeed('curl http://localhost:9975/metrics | grep ntp_uptime_seconds')
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue