From 83834e3f6e112186b1e6167b31f854575e646cd8 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:02:05 +1000 Subject: [PATCH] modules/darwin: switch to srvos telegraf --- modules/darwin/common/telegraf.nix | 44 ++++-------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/modules/darwin/common/telegraf.nix b/modules/darwin/common/telegraf.nix index b8272b69e..65baf9a62 100644 --- a/modules/darwin/common/telegraf.nix +++ b/modules/darwin/common/telegraf.nix @@ -1,41 +1,7 @@ -{ pkgs, ... }: +{ inputs, ... }: { - imports = [ ../../shared/telegraf.nix ]; - - services.telegraf = { - enable = true; - extraConfig = { - agent.interval = "60s"; - inputs = { - smart.path_smartctl = "${pkgs.smartmontools}/bin/smartctl"; - system = { }; - mem = { }; - swap = { }; - disk.tagdrop = { - fstype = [ - "tmpfs" - "ramfs" - "devtmpfs" - "devfs" - "iso9660" - "overlay" - "aufs" - "squashfs" - ]; - device = [ - "rpc_pipefs" - "lxcfs" - "nsfs" - "borgfs" - ]; - }; - diskio = { }; - internal = { }; - }; - outputs.prometheus_client = { - listen = ":9273"; - metric_version = 2; - }; - }; - }; + imports = [ + inputs.srvos.darwinModules.mixins-telegraf + ../../shared/telegraf.nix + ]; }