2017-01-30 22:56:43 +01:00
|
|
|
{pkgs, config, ...}:
|
|
|
|
with import <stockholm/lib>;
|
|
|
|
{
|
|
|
|
lass.telegraf = {
|
|
|
|
enable = true;
|
2017-02-03 00:24:21 +01:00
|
|
|
interval = "1s";
|
|
|
|
|
|
|
|
|
2017-01-30 22:56:43 +01:00
|
|
|
outputs = ''
|
|
|
|
[outputs.influxdb]
|
|
|
|
urls = ["http://prism:8086"]
|
2017-02-03 00:24:21 +01:00
|
|
|
database = "telegraf_db"
|
2017-01-30 22:56:43 +01:00
|
|
|
user_agent = "telegraf"
|
|
|
|
'';
|
|
|
|
inputs = [
|
|
|
|
''
|
|
|
|
[cpu]
|
|
|
|
percpu = false
|
|
|
|
totalcpu = true
|
|
|
|
drop = ["cpu_time"]
|
|
|
|
''
|
|
|
|
''
|
|
|
|
[[inputs.mem]]
|
|
|
|
''
|
|
|
|
''
|
|
|
|
[[inputs.ping]]
|
|
|
|
urls = ["8.8.8.8"]
|
|
|
|
''
|
|
|
|
];
|
|
|
|
};
|
|
|
|
systemd.services.telegraf.path = with pkgs; [
|
|
|
|
iputils
|
|
|
|
lm_sensors
|
|
|
|
];
|
|
|
|
}
|