Skip to content
Snippets Groups Projects
Unverified Commit 1bf12a98 authored by SUN Haoyu's avatar SUN Haoyu Committed by GitHub
Browse files

Node Exporter: add parameter for ignored network devices (#1887)

parent 90f30144
Branches
Tags
No related merge requests found
......@@ -15,6 +15,10 @@ local defaults = {
},
listenAddress:: '127.0.0.1',
filesystemMountPointsExclude:: '^/(dev|proc|sys|run/k3s/containerd/.+|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)',
// 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
ignoredNetworkDevices:: '^(veth.*|[a-f0-9]{15})$',
port:: 9100,
commonLabels:: {
'app.kubernetes.io/name': defaults.name,
......@@ -200,11 +204,8 @@ function(params) {
'--no-collector.wifi',
'--no-collector.hwmon',
'--collector.filesystem.mount-points-exclude=' + ne._config.filesystemMountPointsExclude,
// 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-f0-9]{15})$',
'--collector.netdev.device-exclude=^(veth.*|[a-f0-9]{15})$',
'--collector.netclass.ignored-devices=' + ne._config.ignoredNetworkDevices,
'--collector.netdev.device-exclude=' + ne._config.ignoredNetworkDevices,
],
volumeMounts: [
{ name: 'sys', mountPath: '/host/sys', mountPropagation: 'HostToContainer', readOnly: true },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment