treewide: move nixos modules

This commit is contained in:
Charlotte Van Petegem 2024-07-18 15:04:18 +02:00
parent d84be7c616
commit 8eff4c5e4f
73 changed files with 62 additions and 62 deletions

View file

@ -0,0 +1,50 @@
{ config, lib, pkgs, ... }:
{
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 = "0s";
omit_hostname = false;
};
outputs.influxdb_v2 = {
urls = [ "https://stats.chvp.be:8086" ];
token = "$TOKEN";
organization = "default";
bucket = "default";
};
inputs = {
cpu = {
percpu = true;
totalcpu = true;
collect_cpu_time = false;
report_active = false;
};
diskio = { };
exec = {
commands = [ "${pkgs.zfs}/libexec/zfs/zpool_influxdb" ];
timeout = "5s";
data_format = "influx";
};
kernel = { };
mem = { };
processes = { };
swap = { };
system = { };
};
};
environmentFiles = [ config.age.secrets."passwords/services/telegraf-env".path ];
};
age.secrets."passwords/services/telegraf-env" = {
file = ../../../../secrets/passwords/services/telegraf-env.age;
owner = "telegraf";
};
}