Raspberry Pi Monitor Dashboard is a simple monitoring tool with a dashboard suitable for monitoring multiple RPi devices. The number of devices you can monitor is unlimited. Fully configurable as to what report from bash / cli / terminal run.
By default it reports these data:
- hostname
- CPU temperature
- network IP address
- ping results
- running browser (only Firefox and Chromium are checked at the moment)
- optionally, a screenshot of Pi's X screen (DISPLAY=:0)
It can report anything as commands are defined as standard bash commands and are fully configurable in config file.
- Server receiver and dashboard (one file) written in PHP (+config) - hosted anywhere
- Client reporting script (one file) written in Python (+config) - used on RPi / Linux device
- Upload
index.php
andconfig.php
to your server (any desired path), optionally editconfig.php
options - Create
logs/
directory in the same path and make it writable (777)
- Rename
config.toml.example
toconfig.toml
and edit: URL to server receiver path and optionally monitoring commands to execute (see Configuration in detail below) - Upload
report.py
andconfig.toml
to your Raspberry Pi (e.g. put in a new directory/home/pi/rpi-monitor/
) - Edit CRON (
crontab -e
) and add this line:1 * * * * cd /home/pi/rpi-monitor/ && python3 report.py
(adjust reporting interval, if needed)
Open server dashboard URL in your browser and enjoy.
- You can change
$config['timezone']
to your timezone for dashboard to report correct time. - You can set
$config['username']
and$config['password']
to secure dashboard URL with login (digest in-browser authentication is used).
Dashboard URL works without login by default.
Standard commands with output are put under [commands]
section:
This will run uptime
command and fetch full output:
uptime = "/usr/bin/uptime"
This will run ifconfig
command and fetch only output of line containing "inet ":
network = ["/usr/sbin/ifconfig wlan0", ["inet "] ]
This will run ps
command and fetch only output of lines containing "firefox" or "chromium":
browser = ["/usr/bin/ps -A", ["firefox", "chromium"] ]
You can add as many strings to search for as you need. Any found output lines will be joined into one string and reported back under the name of command (e.g. browser).
Shell commands without output are put under [commands_shell]
section (executed with shell=True
in Python subprocess) - e.g. screenshot functionality.
You can use any names for the commands, the names are then shown in the dashboard.
- Python v3
- Python modules:
- subprocess, json, requests (should be available by default)
- tomli / tomllib (
pip3 install tomli
for Python <3.10, available by default from 3.11)
- If screenshots are enabled, scrot is recommended:
- scrot (
sudo apt install scrot
)
- scrot (