update node-exporter

This commit is contained in:
2024-07-31 21:37:21 +10:00
parent 5f575d648d
commit d8d99875c2

View File

@@ -14,10 +14,15 @@ spec:
metadata: metadata:
labels: labels:
app: prometheus-node-exporter app: prometheus-node-exporter
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: '/metrics'
prometheus.io/port: "9100"
spec: spec:
hostNetwork: true hostNetwork: true
hostPID: true hostPID: true
hostIPC: true hostIPC: true
enableServiceLinks: false
topologySpreadConstraints: topologySpreadConstraints:
- maxSkew: 1 - maxSkew: 1
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
@@ -29,16 +34,27 @@ spec:
- name: prometheus-node-exporter - name: prometheus-node-exporter
image: prom/node-exporter image: prom/node-exporter
args: args:
- "--path.rootfs=/host" - "--path.rootfs=/root"
- "--path.sysfs=/host/sys"
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.netclass.ignored-devices=^(veth.*)$
ports:
- containerPort: 9100
protocol: TCP
volumeMounts: volumeMounts:
- name: node-volume - name: sys
mountPath: /host mountPath: /host/sys
mountPropagation: HostToContainer
- name: root
mountPath: /root
readOnly: true readOnly: true
mountPropagation: HostToContainer mountPropagation: HostToContainer
securityContext: securityContext:
privileged: true privileged: true
volumes: volumes:
- name: node-volume - name: sys
hostPath:
path: /sys
- name: root
hostPath: hostPath:
path: / path: /
type: Directory