A fun little IoT hack for cooling fans + Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
GGuntly
CTO
Posts: 3
Joined: Mon Aug 13, 2018 3:07 pm

A fun little IoT hack for cooling fans + Nagios

Post by GGuntly »

Hey all!

I bought some [brilliantly quiet] generic USB cooling fans last week to add just a little extra peace of mind to my server room. These $6 fans do a great job at...fan..ing... but not so great of a job at reporting/alarming. To address this, I introduced a quick IoT hack so that my Nagios server can watch over their performance alongside everything else in the room.

Image

So what's going on in the photo? That little blue circuit board attached to the fan is an infrared pulse sensor that counts the amount of times each blade passes by the chip. This data is then summarized every 60 seconds by an ESP8266 chip and delivered to Nagios XI via JSON. Incredibly simple and quick setup.

What you'll need (physical): ESP8266, IR pulse counter, wires.
What you'll need (software): Nagios/XI, ESPEasy (https://github.com/letscontrolit/ESPEasy) (It's seriously easy)

I'll rely on ESPEasy's installation instructions as seen on their Git to help there if you haven't been formally introduced to that suite or the ESP hardware platform in general. I'd recommend investing the extra dollar to get an ESP based chip with built-in microUSB connectivity as it makes both powering the device and programming it a breeze.

The pulse counter can be found in many different form factors/styles, but I'd recommend getting one that accommodates both the proper type of physical counter (magnetic/hall, IR, contact, etc) that you'll need as well as a digital out. The digital output is what I used to connect to a "D" pin on the ESP8266 chip. Back in ESPEasy's web interface, navigate to Devices--> Add--> Pulse Counter and define the D pin you connected it to. From there, it's best to have the refresh be every 60 seconds for the true spirit of "RPM" in the case of monitoring a fan.

ESPEasy has a few different methods to get data in and out, but I simply used the JSON output (https://exchange.nagios.org/directory/P ... rd/details) (JSON Wizard will be included in Nagios XI 5.7!) and told Nagios XI to grab the specific keys related to the fan RPM output. ESP chips can be programmed to align with either active or passive checks, so that's handy. See NRDP with ESP32: (https://exchange.nagios.org/directory/C ... DP/details)

Anywho, I thought I'd share this little IoT project to the community. Cheers!
Locked