summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/stats/telegraf/default.nix
blob: 5a81e274979b3412c476ca7452c5e3e2123b371f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{...}:
let
  url = "http://localhost:8086";
  mqtt_server = "localhost:1883";
in {
  services.telegraf = {
    enable = true;
    extraConfig = {
      agent.debug = false;
      outputs = {
        influxdb = [{
          urls = [ url ];
          database = "telegraf";
        }];
        #file = [{ # debugging
        #  files = [ "stdout" ];
        #  data_format = "influx";
        #}];

        #mqtt = [{
        #  servers = [ mqtt_server ];
        #  topic_prefix = "/telegraf";
        #  data_format = "json";
        #  qos = 0;
        #  batch = false;
        #}];
      };
    };
  };
}