RPI-Monitor

Install and Customize RPI-Monitor

If you want to monitor your Raspberry Pi hardware and software, you can do that with RPI-Monitor. Possible to monitor ports, services, CPU, memory usage, disk usage, and much more! Screenshot of my final version at the bottom of this page. Let's see how to install it:

 

Install

  • First of all login to Raspberry Pi via SSH (the easiest way is to use Putty).
  • Install dirmngr (required to install RPI-Monitor)
    • sudo apt install dirmngr
  • Add an official repository
    • sudo wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list
  • Avoid unknown repo issue by add key from Ubuntu keyserver
    • sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E4E362DE2C0D3C0F
  • Run apt update to receive a list of available packages:
    • sudo apt update
  • Install RPI-Monitor
    • sudo apt install rpimonitor
  • Update itself
    • sudo /etc/init.d/rpimonitor update
  • Print IP of your Raspberry Pi
    • hostname -I
  • Replace the IP and open the monitoring website
    • 192.168.0.22:8888

Okay, you should see the monitoring page. It's fine, but we need to create one systemd service to start this service automatically on system startup. To do this,

  • Create a new systemd file
    • nano /etc/systemd/system/rpimonitor.service
  • Paste these lines in this file
[Unit]
Description=RPi-Monitor daemon
Before=multi-user.target
After=remote-fs.target
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
Restart=on-failure
KillMode=mixed
Nice=19
ExecStart=/usr/bin/rpimonitord
ExecStop=/bin/kill $MAINPID
StandardOutput=append:/var/log/rpimonitor.log
StandardError=append:/var/log/rpimonitor.log

[Install]
WantedBy=multi-user.target
  • Reload systemd and enable this service to start on system boot
    • sudo systemctl daemon-reload
    • sudo systemctl enable rpimonitor

 

Optional settings

  • Disable refresh "package status" info, comment every line by run this command
    • sed -i -e 's/^/#/' /etc/cron.d/rpimonitor
  • Rename this file
    • mv /etc/apt/apt.conf.d/99rpimonitor /etc/apt/apt.conf.d/99rpimonitor.disabled

 

  • To avoid overwriting your custom modifications, disable update RPI-Monitor from the official repository. It also speeds up your apt update command in the future
    • sed -i -e 's/^/#/' /etc/apt/sources.list.d/rpimonitor.list

 

Final words

That's all. If you want to customize your monitoring page, just modify .conf files in /etc/rpimonitor/template folder, and then do not forget to restart RPI-Monitor by run systemctl restart rpimonitor command.

My current setup looks like this:

If you are looking for hardware and software recommendation, click here

Comments