Skip to content

Commit 2a3a858

Browse files
committed
enable hwmon for sensor collection for bare metal clusters
Enable the hwmon data collection so that hardware telemetry like CPU temperature and fan speeds are available for bare metal clusters. Signed-off-by: Doug Hellmann <[email protected]>
1 parent 10453df commit 2a3a858

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Adjusted NodeClockNotSynchronising, NodeNetworkReceiveErrs, and NodeNetworkTransmitErrs alerts.
88
- [#962](https://github.com/openshift/cluster-monitoring-operator/pull/962) Enable namespace by pod and pod total networking Grafana dashboards.
99
- [#959](https://github.com/openshift/cluster-monitoring-operator/pull/959) Remove memory limits from prometheus-config-reloader in user workload monitoring
10+
- [#971](https://github.com/openshift/cluster-monitoring-operator/pull/971) Enable `hwmon` in node-exporter for hardware sensor data collection
1011

1112
## 4.6
1213

assets/node-exporter/daemonset.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ spec:
2323
- --path.sysfs=/host/sys
2424
- --path.rootfs=/host/root
2525
- --no-collector.wifi
26-
- --no-collector.hwmon
2726
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
2827
- --collector.mountstats
2928
- --collector.cpu.info

jsonnet/node-exporter.jsonnet

+4-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ local tlsVolumeName = 'node-exporter-tls';
123123
}
124124
else
125125
c {
126-
args+: ['--collector.mountstats', '--collector.cpu.info', '--collector.textfile.directory=' + textfileDir],
126+
// Remove the flag to disable hwmon that is set upstream so we
127+
// gather that data (especially for bare metal clusters), and
128+
// add flags to collect data not included by default.
129+
args: [a for a in c.args if a != '--no-collector.hwmon'] + ['--collector.mountstats', '--collector.cpu.info', '--collector.textfile.directory=' + textfileDir],
127130
terminationMessagePolicy: 'FallbackToLogsOnError',
128131
volumeMounts+: [
129132
containerVolumeMount.new(textfileVolumeName, textfileDir, true),

manifests/0000_50_cluster-monitoring-operator_02-role.yaml

+21-21
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
# assets/prometheus-k8s/cluster-role.yaml
2020
# assets/prometheus-k8s/role-config.yaml
2121
# assets/prometheus-k8s/role-specific-namespaces.yaml
22-
# assets/prometheus-operator-user-workload/cluster-role.yaml
2322
# assets/prometheus-operator/cluster-role.yaml
23+
# assets/prometheus-operator-user-workload/cluster-role.yaml
2424
# assets/prometheus-user-workload/cluster-role.yaml
2525
# assets/prometheus-user-workload/role-config.yaml
2626
# assets/prometheus-user-workload/role-specific-namespaces.yaml
@@ -419,20 +419,6 @@ rules:
419419
verbs:
420420
- list
421421
- watch
422-
- apiGroups:
423-
- apiextensions.k8s.io
424-
resourceNames:
425-
- alertmanagers.monitoring.coreos.com
426-
- podmonitors.monitoring.coreos.com
427-
- prometheuses.monitoring.coreos.com
428-
- prometheusrules.monitoring.coreos.com
429-
- servicemonitors.monitoring.coreos.com
430-
- thanosrulers.monitoring.coreos.com
431-
resources:
432-
- customresourcedefinitions
433-
verbs:
434-
- get
435-
- update
436422
- apiGroups:
437423
- ''
438424
resources:
@@ -448,12 +434,6 @@ rules:
448434
- get
449435
- list
450436
- watch
451-
- apiGroups:
452-
- apiextensions.k8s.io
453-
resources:
454-
- customresourcedefinitions
455-
verbs:
456-
- create
457437
- apiGroups:
458438
- apps
459439
resources:
@@ -478,6 +458,26 @@ rules:
478458
- delete
479459
- get
480460
- update
461+
- apiGroups:
462+
- apiextensions.k8s.io
463+
resourceNames:
464+
- alertmanagers.monitoring.coreos.com
465+
- podmonitors.monitoring.coreos.com
466+
- prometheuses.monitoring.coreos.com
467+
- prometheusrules.monitoring.coreos.com
468+
- servicemonitors.monitoring.coreos.com
469+
- thanosrulers.monitoring.coreos.com
470+
resources:
471+
- customresourcedefinitions
472+
verbs:
473+
- get
474+
- update
475+
- apiGroups:
476+
- apiextensions.k8s.io
477+
resources:
478+
- customresourcedefinitions
479+
verbs:
480+
- create
481481
- apiGroups:
482482
- monitoring.coreos.com
483483
resources:

pkg/manifests/bindata.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)