From 09fdac739deb9f6a43ca1e7da1f713e4e5a5ee7d Mon Sep 17 00:00:00 2001
From: Prashant Balachandran <pnair@redhat.com>
Date: Tue, 27 Jul 2021 17:17:19 +0530
Subject: [PATCH] changing node exporter ignore list

---
 jsonnet/kube-prometheus/components/node-exporter.libsonnet | 4 ++--
 manifests/node-exporter-daemonset.yaml                     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/jsonnet/kube-prometheus/components/node-exporter.libsonnet b/jsonnet/kube-prometheus/components/node-exporter.libsonnet
index 5530d16a..d59d22e7 100644
--- a/jsonnet/kube-prometheus/components/node-exporter.libsonnet
+++ b/jsonnet/kube-prometheus/components/node-exporter.libsonnet
@@ -178,8 +178,8 @@ function(params) {
         // NOTE: ignore veth network interface associated with containers.
         // OVN renames veth.* to <rand-hex>@if<X> where X is /sys/class/net/<if>/ifindex
         // thus [a-z0-9] regex below
-        '--collector.netclass.ignored-devices=^(veth.*|[a-z0-9]+@if\\d+)$',
-        '--collector.netdev.device-exclude=^(veth.*|[a-z0-9]+@if\\d+)$',
+        '--collector.netclass.ignored-devices=^(veth.*|[a-f0-9]{15})$',
+        '--collector.netdev.device-exclude=^(veth.*|[a-f0-9]{15})$',
       ],
       volumeMounts: [
         { name: 'sys', mountPath: '/host/sys', mountPropagation: 'HostToContainer', readOnly: true },
diff --git a/manifests/node-exporter-daemonset.yaml b/manifests/node-exporter-daemonset.yaml
index 21ad1fe0..e414d12b 100644
--- a/manifests/node-exporter-daemonset.yaml
+++ b/manifests/node-exporter-daemonset.yaml
@@ -30,8 +30,8 @@ spec:
         - --no-collector.wifi
         - --no-collector.hwmon
         - --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
-        - --collector.netclass.ignored-devices=^(veth.*|[a-z0-9]+@if\d+)$
-        - --collector.netdev.device-exclude=^(veth.*|[a-z0-9]+@if\d+)$
+        - --collector.netclass.ignored-devices=^(veth.*|[a-f0-9]{15})$
+        - --collector.netdev.device-exclude=^(veth.*|[a-f0-9]{15})$
         image: quay.io/prometheus/node-exporter:v1.2.0
         name: node-exporter
         resources:
-- 
GitLab