From a9a3785e80437cedda701ec31695f63fbd640b78 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Sat, 2 Nov 2019 13:54:34 +0100 Subject: [PATCH] LoutreOS: ajout metrics cgroup dans Telegraf --- systems/LoutreOS/monitoring.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/systems/LoutreOS/monitoring.nix b/systems/LoutreOS/monitoring.nix index b8260cf..599eded 100644 --- a/systems/LoutreOS/monitoring.nix +++ b/systems/LoutreOS/monitoring.nix @@ -32,6 +32,20 @@ in processes = {}; system = {}; disk = {}; + cgroup = [ + { + paths = [ + "/sys/fs/cgroup/memory/system.slice/*" + ]; + files = ["memory.*usage*" "memory.limit_in_bytes"]; + } + { + paths = [ + "/sys/fs/cgroup/cpu/system.slice/*" + ]; + files = ["cpuacct.usage" "cpu.cfs_period_us" "cpu.cfs_quota_us"]; + } + ]; ipmi_sensor = { path = "${pkgs.ipmitool}/bin/ipmitool"; }; smart = { path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl";