add telegraf

This commit is contained in:
soraefir
2026-06-06 00:34:26 +02:00
parent dddbd8309f
commit 2066940c77
6 changed files with 216 additions and 61 deletions

View File

@@ -0,0 +1,54 @@
{ lib, ... }:
with lib; {
telegraf = {
enable = mkOption {
type = types.bool;
default = false;
};
collectors = mkOption {
type = types.listOf (types.enum [
"cpu"
"mem"
"swap"
"system"
"disk"
"diskio"
"kernel"
"net"
"netstat"
"processes"
"temp"
"mdstat"
"smart"
"docker"
"ping"
]);
default = [ ];
};
outputs = {
urls = mkOption {
type = types.listOf types.str;
default = [ ];
};
database = mkOption {
type = types.nullOr types.str;
default = null;
};
token = mkOption {
type = types.str;
default = "$INFLUXDB_TOKEN";
};
secretName = mkOption {
type = types.nullOr types.str;
default = null;
};
};
extraConfig = mkOption {
type = types.attrs;
default = { };
};
};
}