Cannot read disk space usage metrics && wrong metrics inside Docker/Kubernetes environment (important because we should alert when disks become full)

Hey, @fzyzcjy. If you feel adventurous and have a system where we can do some testing… Could you check the following changes

0 helmchart (master *%)$ git diff
diff --git a/charts/netdata/templates/daemonset.yaml b/charts/netdata/templates/daemonset.yaml
index f616ca1..c42f96b 100644
--- a/charts/netdata/templates/daemonset.yaml
+++ b/charts/netdata/templates/daemonset.yaml
@@ -132,6 +132,10 @@ spec:
             successThreshold: {{ .Values.child.readinessProbe.successThreshold }}
             timeoutSeconds: {{ .Values.child.readinessProbe.timeoutSeconds }}
           volumeMounts:
+            - name: root
+              mountPropagation: HostToContainer
+              mountPath: /host/root
+              readOnly: true
             - name: proc
               readOnly: true
               mountPath: /host/proc
@@ -196,6 +200,9 @@ spec:
     {{- end }}
       terminationGracePeriodSeconds: {{ .Values.child.terminationGracePeriodSeconds }}
       volumes:
+        - name: root
+          hostPath:
+            path: /
         - name: proc
           hostPath:
             path: /proc
diff --git a/charts/netdata/values.yaml b/charts/netdata/values.yaml
index fef19e4..26a6d91 100644
--- a/charts/netdata/values.yaml
+++ b/charts/netdata/values.yaml
@@ -257,6 +257,8 @@ child:
           memory mode = ram
         [health]
           enabled = no
+        [plugin:proc:diskspace]
+          exclude space metrics on paths = /proc/* /sys/* /var/run/user/* /run/user/* /snap/* */var/lib/docker/*
     stream:
       enabled: true
       path: /etc/netdata/stream.conf
1 Like

Hi thanks for the reply! I will do this experiment when I am doing ops work.

1 Like