2

I have multiple devices of Raspberry and i'm trying to create a page to monitor these devices, something like an IoT platform but much simpler.

so basically a page with a username and a password and when accessed i can see my devices with their status if they are online or offline and some other basic information about the devices, and if it is possible to control and modify something it would be even better.

With all my devices I'm using Raspberry zero W with A7 gps/gprs/gsm module.

I have tried Rpi-Monitor and it is good, but i want something more general where i can see and monitor all my devices at the same place. so maybe in this case i need to have something like a key to install on the raspberry devices in order to configure it and see it on the site but i'm not sure and i don't have much experience in this.

Can anyone refer me to a specific procedure or how can i start to achieve this idea.

2

3 Answers 3

2

A general and extensible design approach for network monitoring of several internet devices such as RPi Zero W is to configure them as web servers that return information about themselves via a REST service that you implement. A simple local HTML file can then display your device information as a single web page for your network and even determine which are online/offline.

Such a design would require you to become familiar with Raspberry Pi web servers (e.g., nodejs/express), REST data formats such as JSON, as well as familiarity coding in HTML/Javascript. The task becomes notably easier if you use established web user interface frameworks such as Vue.js or React. With such knowledge at hand, you could easily create a network status page in a day or two. Without such knowledge, the task would require time for learning, which would take considerably longer: i.e., RPi-Monitor might be more attractive.

To illustrate the challenges involved, see ipv4Candidates(), which returns all the candidate hosts on the local IPV4 network. Unfortunately, this code would only help you if you know how to use Javascript on a static HTML page.

3
  • Thanks for this suggestion, i have now installed Rest API and the express module with a simple html page and now i can see the webpage that being sent from my RPi. Jun 15, 2018 at 17:57
  • Do you have some extra information on how to implement and show the data of multiple devices on the same HTML page ? and is this possible also with dynamic IP addressing or only static IP addresses ? Jun 15, 2018 at 18:05
  • I've edited my answer to illustrate the difficulty of solving your problem as generally as you're requesting. I fear I may have been useless to you. :(
    – OyaMist
    Jun 15, 2018 at 23:15
4

If you need fast implementation, try to use some ready to use monitoring tools like zabbix, cacti, munin, nagios, but be careful with server requirements.

If you have time and want some DIY solution, try InfluxDB (database) with Grafana (Web panel). I use this solution, its lightweight and reliable. Idea is simple:

  1. On cenral server install InfluxDB. It is database for time based data series. It has REST API that could be exposed to other devices to push data.
  2. On every device you need to write simple script that grab measurments and use CURL to push data to InfluxDB.
  3. On central server install Grafana and connect to InfluxDB. It is designed to present nice graphs and dashbord of time based data series from diferent sources, InfluxDB is one of them.

I use this to monitor my in home located pi based devices as well as weather and environmental sensors.

System stats

Dashboard

2
  • Thank you for the instructions, it is very interesting and i'm trying to implement it, for now i don't have a central server but can a node act as a central server or i need to use another RPi just to be the controller ? and also is this possible to implement with dynamic IP address ? because my RPis will be moving around and their IP addresses will be changing Jun 15, 2018 at 17:19
  • My central server is just RPi2 that do few other things and also collect and serve stats and work well. Dynamic IP is a problem for another question;) Jun 15, 2018 at 20:19
1

There is a possibility that I am currently working on something that you are interested in.

I am calling it 'PiMetric' and it is designed to carry out regular checks on hardware and software services as well as anything else in between. It runs on a Raspberry Pi, and it can easily check information from other Pi's (mine does).

Embarrassingly, it exists only as a very active project at home, but I have every intention to release it into the wild in about a month (wild estimate).

You can see a description of the project at what I hope will ultimately be it's home here. (Cue the gratuitous graphic).

enter image description here

At this stage I'm comfortable with the coding locally, but have never used GitHub to host a project, so I'm a bit hesitant. Sorry it's a bit vapor-ware in that respect, but let me know if this is the direction that you're trying to go.

2
  • Thank you for sharing this, i'm looking for something similar but this solution looks complicated for me, can you share with me some more information on how you managed to implement this system so far and what hardware and software did you use. Thank you! Jun 15, 2018 at 18:16
  • Sure. I have been building it by trying to minimise reliance on more 'complex' monitoring ideas such as plugins that need to be installed on remote servers or non-standard communications methods. The idea is that I should be able to measure what I need using a simple Python script. If I can write a script that can read a value, I can integrate it into the system. For example, I can use a simple ping to progromatically return a value. The same is true for other simple commands, SNMP queries, restful API calls, parsing a log file or database lookups. The only tricky part is using Python.
    – d3noob
    Jun 15, 2018 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.