1 import ./make-test-python.nix ({ pkgs, ... }: {
11 extraConfig = lib.mkBefore ''
16 DataDir "/var/lib/collectd/rrd"
21 environment.systemPackages = [ pkgs.rrdtool ];
25 machine.wait_for_unit("collectd.service")
26 hostname = machine.succeed("hostname").strip()
27 file = f"/var/lib/collectd/rrd/{hostname}/load/load.rrd"
28 machine.wait_for_file(file);
29 machine.succeed(f"rrdinfo {file} | logger")
30 # check that this file contains a shortterm metric
31 machine.succeed(f"rrdinfo {file} | grep -F 'ds[shortterm].min = '")
32 # check that interval was set before the plugins
33 machine.succeed(f"rrdinfo {file} | grep -F 'step = 30'")
34 # check that there are frequent updates
35 machine.succeed(f"cp {file} before")
36 machine.wait_until_fails(f"cmp before {file}")