blob: c60539c7199a71e05371c27ba33d895f0119a1a0 (
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
|
{...}:
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;
}];
};
};
};
}
|