Nagios is a powerful tool for monitoring network services and hosts. In cases where predefined plugins don't suffice, custom checks can be created. To monitor my Proliphix NT10e IP thermostat and receive temperature alerts, I developed a system health check utilizing the device's web interface. Despite lacking SNMP capabilities, this script checks the thermostat's temperature and triggers warning or critical alerts based on defined ranges.

The bash script listed below will check the thermostat and report if the system reaches a defined low temperature range.  The script will cause nagios to report a warning if the temperature is between 42 and 46 degrees, and report a critical alert if the temperature is 41 degrees or below.

  1. Copy the bash script to /usr/local/nagios/libexec/check_thermostat_low_temp (or wherever your nagios libexec directory is located).
  2. Replace [IP ADDRESS] with the address of your thermostat module.
  3. Create a command definition in nagios for check_thermostat_low_temp.

Nagios command definition:

define command {
        command_name check_thermostat_low_temp
        command_line $USER1$/check_thermostat_low_temp
        }

Bash script:

#!/bin/bash
temp=$(printf %0.f $(wget -qO- http://[IP ADDRESS] | \
grep -Po '(?<=avgtemp = \").*(?=\")'))
if [ "$temp" -ge 47 ]; then
echo "OK - Currently $temp degrees."
exit 0
elif [ "$temp" -ge 42 ] && [ "$temp" -le 46 ]; then
echo "WARNING - Currently $temp degrees."
exit 1
elif [ "$temp" -le 41 ]; then
echo "CRITICAL - Currently $temp degrees."
exit 2
else
echo "UNKNOWN - Unknown temperature status."
exit 3
fi

Nagios plugin to check Proliphix thermostat

Monitor your Proliphix thermostat with Nagios using a custom script. Get temperature alerts and protect your property from potential furnace failures.