Gather Bare-metal Sensor Data From An OpenShift Cluster
You are running an OpenShift cluster on bare-metal. The metrics and dashboards you get for monitoring your hosts are awesome, but doesn't include any temperature/lm_sensor type data.
Run a DaemonSet on your cluster to gather those metrics and ship off to your own monitoring system (e.g. InfluxDB).
This repo contains tools to build a container image with collectd along with the sensors plug-in, plus a custom script to pull S.M.A.R.T. data from an NVMe drive. It also has some YAML to setup the DaemonSet to run on all the nodes of your cluster. Works fine on OpenShift. Possibly also fine on vanilla kubernetes.
Modify yaml/config-map-include.yml
to point to your existing InfluxDB server, then run the following:
oc new-project bare-metal-sensors
oc apply -f yaml/service-account.yml
oc apply -f yaml/cluster-role-binding.yml
oc apply -f yaml/config-map-include.yml
oc apply -f yaml/daemon-set.yml
If you're not running InfluxDB, play around with the configmap to suit your purposes and have at it.