mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 14:19:58 +03:00
Merge pull request #281555 from fpletz/nixos/ntpd-rs-fix-metrics
nixos/ntpd-rs: fix metrics service
This commit is contained in:
commit
e59524560c
@ -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 New Issue
Block a user