Adding Raspberry Pi measured Temps to InfluxDB/Grafana
nagger 100000MRSJ Visits (6765)
In 2016, I setup a Raspberry Pi with five temperature probes to measure in my computer room:
You can find the article here
Now I am getting in to InfluxDB and Grafana so I though an upgrade would be good.
On the Raspberry PI I run Ubuntu 16.04 and so Python so its time to write a Python program to take the data and squirt the data into InfluxDB across the network.
The script gets called with the date+time in ISO <som
The ISO-Timestamp example:
#!/usr/bin/python3 # Syntax: inject.py Timestamp temp temp temp temp temp import sys host="ultraviolet" port=8086 user = 'nag' password = 'SECRET' dbname = 'njmon14' from influxdb import InfluxDBClient client = Infl
Now I have learnt the hard way - don't immediately go try graphing the data as a graph with just one or two points looks pretty lame!
So the next day: I set to with Grafana and in a few minutes, I have a nice graph as follows:
So how hard it to get that graph st up - Answer VERY EASY. Select the option to create a new graph and drag the edges to the size and place you want it. On the Title line click and select the pop-down Edit. This is five graphs on one pane but each is simple. As I hope you can see below:
General Tab has the Graph title
Metrics Tab for the data you want
By the way:
Early on, I move one temperature probe from my S822 to the S924 - You can see the drop on temperature on the left of the orange line - interesting that the POWER9 servers run cooler. The slight rise from initial dip is because I ran up a whole load of hard working programs to keep the CPUs busy - it did not make the machine heat up much - good news..
Now we have data in a time series database we can zoom in and out and cross compare these stats to the others I am collecting from
The various sources of stats can all be drawn on one graph or side by side on one screen.