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";
22 outputs.file.files = ["/tmp/metrics.out"];
23 outputs.file.data_format = "influx";
30 machine.wait_for_unit("telegraf.service")
31 machine.wait_until_succeeds("grep -q example /tmp/metrics.out")