node_exporter error occurred! hwmon collector failed
Overview
When I installed node_exporter on Amazon Linux and started it, the following error occurred and it failed to stay running.
1 | ERRO[0007] ERROR: hwmon collector failed after 0.000011s: open /proc/class/hwmon: no such file or directory source="node_exporter.go:92" |
What is hwmon?
Hard Ware MONitoring. It can retrieve hardware temperature, fan rotation speed, and voltage from the sensor chips of the Linux kernel.
The environment details are as follows.
- Amazon Linux AMI release 2016.09
- node_exporter version 0.14.0-rc.1 (branch: master, revision:5a07f4173d97fa0dd307db5bd3c2e6da26a4b16e)
This error had already been raised as an issue.
And it had been resolved!
It seems my timing was just unlucky—I had grabbed a release from before the fix was merged, which is why I ran into this error.
It looks like the best approach is to build from the master branch with the latest source.
Below I have summarized the installation steps I followed on Amazon Linux.
Steps
Installing Golang
The following is the standard installation method available on the official Golang site. Please use it as a reference.

Install and build node_exporter from source
1 | $ mkdir -p $GOPATH/src/github.com/prometheus |
And while we’re at it, a startup script
- Preparation
1 | // Create a directory for the pid file |
- Create the startup script
1 | $ cd /etc/init.d |
- Start
1 | $ sudo /etc/init.d/node_exporter start |
It now starts up without any errors ♪

