1 import ./make-test-python.nix ({ pkgs, ...} : {
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ mic92 ];
7 nodes.machine = { ... }: {
8 services.telegraf.enable = true;
9 services.telegraf.environmentFiles = [(pkgs.writeText "secrets" ''
12 services.telegraf.extraConfig = {
13 agent.interval = "1s";
14 agent.flush_interval = "1s";
17 "${pkgs.runtimeShell} -c 'echo $SECRET,tag=a i=42i'"
20 data_format = "influx";
28 outputs.file.files = ["/tmp/metrics.out"];
29 outputs.file.data_format = "influx";
36 machine.wait_for_unit("telegraf.service")
37 machine.wait_until_succeeds("grep -q example /tmp/metrics.out")
38 machine.wait_until_succeeds("grep -q ping /tmp/metrics.out")