{ lib, ... }:
with lib; {
  telegraf = {
    enable = mkOption {
      type = types.bool;
      default = false;
    };

    interval = mkOption {
      type = types.str;
      default = "10s";
    };

    collectors = mkOption {
      type = types.listOf (types.enum [
        "cpu"
        "mem"
        "swap"
        "system"
        "disk"
        "diskio"
        "kernel"
        "net"
        "netstat"
        "processes"
        "temp"
        "mdstat"
        "smart"
        "docker"
        "systemd_units"
        "nix"
        "ping"
        "internet_speed"
        "gpu"
      ]);
      default = [ ];
    };

    outputs = mkOption {
      type = types.listOf types.str;
      default = [ ];
    };

    extraConfig = mkOption {
      type = types.attrs;
      default = { };
    };
  };
}
