Add telegraf logging to queen (hardware logging)

This commit is contained in:
Lillian Violet 2024-03-28 11:12:02 +01:00
parent 7611eb763f
commit 740e79cc9f
2 changed files with 54 additions and 0 deletions

View file

@ -10,5 +10,6 @@
./grafana ./grafana
#./loki #./loki
./prometheus ./prometheus
./telegraf
]; ];
} }

View file

@ -0,0 +1,53 @@
{
inputs,
lib,
config,
pkgs,
user,
...
}: {
services.telegraf = {
enable = true;
extraConfig = {
agent = {
interval = "10s";
round_interval = true;
metric_batch_size = 1000;
metric_buffer_limit = 10000;
collection_jitter = "0s";
flush_interval = "10s";
flush_jitter = "0s";
precision = "";
debug = false;
quiet = false;
logfile = "";
hostname = "queen";
omit_hostname = false;
};
inputs = {
cpu = {
percpu = true;
totalcpu = true;
collect_cpu_time = false;
report_active = false;
core_tags = false;
};
disk = {
ignore_fs = ["tmpfs" "devtmpfs" "devfs" "overlay" "aufs" "squashfs"];
};
diskio = {};
kernel = {};
mem = {};
system = {};
};
# outputs = {
# influxdb_v2 = {
# urls = ["http://monitoringvm:8086"];
# token = "\${influx_token}";
# organization = "home";
# bucket = "tigstack";
# };
# };
};
};
}