Monitoring Raspberry Pi devices using Node-RED

Hi All,

Completely new to Node-RED and hence to the forum. This is a very generic question in the hope that someone has done something similar and could share their thoughts and advice.

I'm using a large number of Raspberry Pis as part of an IoT deployment to track progress through stages of a production line. The number of Pis we are using has increased to the point where I now need to think seriously about monitoring them.

I have previous experience of configuring Nagios in conjunction with SNMP to monitor all sorts of network attached devices. During my research, I stumbled across Node-RED and really liked the elegance of the dashboard.

Has anyone done something like this before with Node-RED?
If you had to do it again, what would you do differently?

Many Thanks,
Keith.

Are you using MQTT?

If so, it isn't hard to get Node-RED to output some basic information and a heartbeat to MQTT that you could monitor separately (from Node-RED as well :slight_smile: ).

Of course, if you are already using other servers in your IT estate, there is a good chance that you already have monitoring tools in place and just possible that you could get a Linux agent that would work on a Pi.

On a budget and lacking other tools, you could also make use of Telegraf, InfluxDB and Grafana to capture and report on Pi performance. Telegraf will let you output both to InfluxDB and MQTT so that you can get both immediate and historic performance data.

1 Like

Ha, I'm close to publishing a project that I've been working on that monitors my pi's. Here is a sample of what the dashboard looks like:


The Pi's are polled every 5 minutes and any that haven't been seen in 10 minutes (adjustable) get the red coloring. You can see I also collect info about the Pi's temperature, memory and storage. If you were to click on a Hostname it would open a different dashboard with the software versions I've told it to look at. Clicking on the IP address will open a new browser window for Node-red running on that Pi (or you will get a not found if it isn't)

If you want to try it, send me a PM and I'll let you test it.

7 Likes

Thanks for the reply.

"Are you using MQTT?"

I have also started looking at MQTT as well. I was thinking that would be the way to go rather than SNMP as it would give me more options in the layout of the Node-RED dashboards; perhaps grouping Pis together by line location or by assembly stage, so I can then create dashboards that subscribe to just that line or just that assembly stage.

Lots to learn and lots to think about.

Thanks so much for the offer to test your code. That would be a huge help.

Unfortunately, I can't find a message button to PM you (such a noob!)

These steps might help...

Screen Shot 02-16-22 at 12.35 PM 001

Screen Shot 02-16-22 at 12.35 PM 002

I just sent you a message with a link to the repository

1 Like

I run this on all of my Pis - GitHub - ironsheep/RPi-Reporter-MQTT2HA-Daemon: Linux service to collect and transfer Raspberry Pi data via MQTT to Home Assistant (for RPi Monitoring)
It outputs just about everything you might need to know about the Pi as MQTT messages. It's designed to work with Home Assistant but there's nothing to stop you subscribing to the mqtt in nodered and pulling out the data you need.

Hi,
do you have an example how to monitor the temperature of cpu? (Rasp Pi4)

Take a look at node-red-contrib-vcgencmd

1 Like

Ok, thank you ....

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.