From 15a4b4dbe493e1bf0353b25b344a790d2c420b37 Mon Sep 17 00:00:00 2001 From: Dmitry Anoshin Date: Fri, 22 Nov 2024 15:15:20 -0800 Subject: [PATCH] Fix errors filesystem metrics scraping errors By excluding mount point that are not accessible by the collector container --- .../templates/config/_otel-agent.tpl | 3 +++ .../splunk-otel-collector/templates/daemonset.yaml | 9 --------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl index a1e7c2e50..ed32af04a 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl @@ -56,6 +56,9 @@ receivers: cpu: disk: filesystem: + exclude_mount_points: + match_type: regexp + mount_points: [/var/.*] memory: network: # System load average metrics https://en.wikipedia.org/wiki/Load_(computing) diff --git a/helm-charts/splunk-otel-collector/templates/daemonset.yaml b/helm-charts/splunk-otel-collector/templates/daemonset.yaml index 84d238902..b3daa1633 100644 --- a/helm-charts/splunk-otel-collector/templates/daemonset.yaml +++ b/helm-charts/splunk-otel-collector/templates/daemonset.yaml @@ -315,15 +315,6 @@ spec: name: {{ include "splunk-otel-collector.secret" . }} key: splunk_platform_hec_token {{- end }} - {{- if eq (include "splunk-otel-collector.metricsEnabled" .) "true" }} - {{- if not .Values.isWindows }} - # until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/5879 - # is resolved fall back to previous gopsutil mountinfo path: - # https://github.com/shirou/gopsutil/issues/1271 - - name: HOST_PROC_MOUNTINFO - value: /proc/self/mountinfo - {{- end }} - {{- end }} {{- with $agent.extraEnvs }} {{- . | toYaml | nindent 10 }} {{- end }}