From ff19e211ce92dc8829b38dd56cc61f108889331e Mon Sep 17 00:00:00 2001
From: David Mehren <git@herrmehren.de>
Date: Wed, 9 Feb 2022 21:22:29 +0100
Subject: [PATCH] Add config option to monitor all disks inside containers

---
 defaults/main.yml         | 1 +
 templates/netdata.conf.j2 | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/defaults/main.yml b/defaults/main.yml
index 6a9129e..78214f3 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -6,3 +6,4 @@ netdata_enable_elasticsearch: false
 netdata_enable_postgres: false
 netdata_enable_mysql: false
 netdata_enable_ebpf: true
+netdata_container_diskspace_root_only: true
diff --git a/templates/netdata.conf.j2 b/templates/netdata.conf.j2
index d909f83..455fd9b 100644
--- a/templates/netdata.conf.j2
+++ b/templates/netdata.conf.j2
@@ -30,6 +30,7 @@
 [plugin:proc]
     netdata server resources = no
 
+{% if netdata_container_diskspace_root_only %}
 [plugin:proc:diskspace]
     space usage for all disks = no
     inodes usage for all disks = no
@@ -37,7 +38,7 @@
 [plugin:proc:diskspace:/]
     space usage = yes
     inodes usage = yes
-
+{% endif %}
 [health]
     enabled = no
 {% endif %}
-- 
GitLab