Node Exporter: add parameter for ignored network devices (#1887)
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user