Budget monitoring of temperature in the server room (MP707 + nettop with Linux + PRTG)

It is interesting to write your first article on Habré based on material based on personal experience and actions. For this, the DIY section or DIY is just right.

The system described below has been operating for more than a year almost without interruption.

Task:


Build a budget (with minimal cost) stable system for easy remote monitoring of the temperature in the Server Room.

The server has two air conditioners (split systems), two 19 ”racks with equipment (switching equipment + servers + UPS).

image

The solution was collected from the devices at hand (some more than 10 years ago) and free software.

List of hardware and software:

  • digital USB thermometer MP707 (measured temperature range, -55 ... + 125);
  • 10-year nettop with MP MSI A9830IMS, Intel Atom N270 (1 Сore \ 1.60 GHz), 1GB of RAM, 80GB HDD;
  • OS and software for nettop: Linux Mint 17.1 Cinnamon 32-bit + BMcontrol software + SNMP + bash-script service;
  • Monitoring software: PRTG Network Monitor 17.1.28.1341 x64 for 100 sensors (free), installed on an external Windows 7 PC.

Install the temperature sensor in the Server Room (the installation location is shown in red):

image

Here is the sensor mounted on the rack:

image

Setting up the Nettop:

- install Linux Mint, update;

image

- connect to nettop via USB-cable USB-thermometer MP707;
- we get the id of the temperature sensor using BMcontrol ;
- we check the sensor operation: “sudo / var / www / bmcontrol1 temp b0000002c6dded28”
- we write a simple script for 10+ years of the system operation:

Script
#!/bin/bash
count=0
sensor=`sudo /var/www/bmcontrol temp b0000002c6dded28`
while [ $count -lt 9000000 ]
do
(( count++ ))
echo$count#echo $sensorecho `sudo /var/www/bmcontrol1 temp b0000002c6dded28`
sudo /var/www/bmcontrol1 temp b0000002c6dded28 > /tmp/1.txt
sleep 60
done


- now we have a sensor working and issuing data, it remains to transmit this data to the monitoring system - we raise the SNMP service and in the snmpd.conf config we add an event to transfer data from the temperature sensor recorded to the extend .1.3.6.1.4.1.2021.51 file ipmitemp / bin / cat /tmp/1.txt ".

image

PRTG setup (this is for sensor data)


(The main thing is to correctly interpret the data with the help of regular expressions, through experiments it was only possible to make how these settings are needed, below is a hint how they should be)

BASIC SENSOR SETTINGS Sensor Name SNMP Server Temperature
OID Value 1.3.6.1.4.1.2021.51.3.1.1.8.105.112.109.105.116.101.109.112
EXTENDED PROCESSING
Interpret the result as String (default)
Retrieve the numeric value using a regular expression
Regular expression ([ 1-2] [0-9]. [0-9] [0-9])


Now in the PRTG software, we receive data on temperature from the Server from the sensor.

image

The system was not quite simple, but very cheap (I only had to buy a sensor), and it’s very useful as a laboratory option and to practice setting up and understanding how different components work.

At the moment, the system works more than a year (this week just checked it and restarted the script for prevention) and will continue to develop further, but this is a completely different story.

Also popular now: