Monitor HDD Temperatures with Collectd, InfluxDB, Grafana – (CentOS 7.x x64)
Introduction
I like to monitor things. I like to have data. As much of it as I can. I'm the software version of a hoarder, never wanting to delete anything and to have a long, visible, track record of history for usage to be further analyzed later on.
This configuration is about monitoring the hard drive temperatures that are connected to your physical server/device.
Prerequisites
You should..
- Have Grafana installed and configured
- Have InfluxDB installed and configured
- Have collectd installed and configured
- Epel-release installed
yum install epel-release -y
Install "hddtemp" from Epel Repository
This is the package you will need the epel-release repository for.
- Install "hddtemp" and enable it to run as a daemon at boot time.
yum install hddtemp -y --enablerepo=epel systemctl enable hddtemp.service
- Start the service
systemctl start hddtemp.service
Edit /etc/collectd.conf to use "hddtemp"
- Edit the configuration for collectd to use the hddtemp plugin
LoadPlugin hddtemp
- Add to the collectd configuration to include the port/IP the daemon is listening on:
<Plugin hddtemp> Host "127.0.0.1" Port 7634 </Plugin>
Note: If you're monitor HDD temperatures on a different physical host, then you will want that host to be running HDDTemp so that collectd can connect to it's IP address:port to pull measurements.
- Restart collectd
systemctl restart collectd.service
Conclusion
After some time, you should start having hard drive temperature measurements accumulate within Grafana/InfluxDB for monitoring.