stockholm/makefu/2configs/stats/telegraf/default.nix
2019-09-25 14:51:43 +02:00

26 lines
488 B
Nix

{...}:
let
url = "http://localhost:8086";
mqtt_server = "localhost:1883";
in {
services.telegraf = {
enable = true;
extraConfig = {
agent.debug = false;
outputs = {
influxdb = [{
urls = [ url ];
database = "telegraf";
}];
mqtt = [{
servers = [ mqtt_server ];
topic_prefix = "/telegraf";
data_format = "json";
qos = 0;
batch = false;
}];
};
};
};
}