ma stats/telegraf: export to mqtt

This commit is contained in:
makefu 2019-09-25 14:51:43 +02:00
parent 7fd5c5c896
commit 0a3528898a

View file

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