Algorithms, Blockchain and Cloud

Monitoring 28 VPS Machines (Including a Raspberry Pi) with Nezha Dashboard


Side Projects and My Fleet of 28 Servers

Over the years, I have worked on various small projects—blogs, online tools, and being a STEEM witness. Currently, I manage 28 servers. Most are budget VPS instances, and the newest is a Raspberry Pi 4B installed in my home shoe cabinet.

Tracking Server Info in Excel

Each server’s static information—IP, VPS provider, memory, storage—is documented in an Excel sheet.

Automated Monitoring via Cron Scripts

I wrote numerous Bash scripts that run periodically using Crontab. These scripts detect:

  • Disk usage exceeding thresholds
  • CPU overloading

If something goes wrong, I receive an email alert immediately. The following shows and example of using BASH/AWK/Sed script to detect if Disk usage is above 90%, and if yes, send an email for notification.

#!/bin/bash
disk=$(df / | tail -1 | awk '{print $5}' | sed 's/%//')
if [ "$disk" -gt 90 ]; then
  echo "Disk usage above 90%" | mail -s "Disk Alert" my@email.com
fi

Deploying Nezha Monitor on All Servers

Recently, I installed the Nezha Monitoring Agent on all servers. Now I can view all server statuses from a single dashboard. I can quickly see which machine has:

  • High CPU usage
  • Disk Nearing full

SSH from Web Interface

The dashboard also allows administrators to SSH directly into servers using root credentials—very handy for emergencies, especially when terminal access is inconvenient (e.g., at work).

Security Considerations

Due to the power of the Nezha admin panel, securing it is critical:

  1. Change the default credentials (admin/admin) immediately
  2. Use strong passwords or replace password login with OAUTH
  3. Enable HTTPS for the panel server
  4. Change the default port 8008 to something else
  5. Do not expose the admin URL publicly

Reverse Proxy and TLS

Each server must install Nezha-Agent, and the panel must communicate via a TLS-encrypted channel. Configure Nginx as a reverse proxy accordingly.

The following configures the Nginx server with SSL on port 443 and Reverse Proxy on Port 8008 – running Nezha Agent.

server {
    listen 443 ssl;
    server_name panel.example.com;

    ssl_certificate /etc/ssl/certs/fullchain.pem;
    ssl_certificate_key /etc/ssl/private/privkey.pem;

    location / {
        proxy_pass http://localhost:8008;
        proxy_set_header Host $host;
    }
}

Nezha Monitor Project

Visual Dashboard

Admin view showing each server’s IP and access to the console.

Visitors can see server distribution and basic health status.

All 28 servers, including the Raspberry Pi 4B at home, are shown on one dashboard: health status including CPU, RAM, disk, and network.

Admins can directly SSH as root from the dashboard – very powerful.

DevOps / Site Reliability Engineering

Nezha Monitor shows clearly which servers are offline and the timeline when since they were last seen active/online.

–EOF (The Ultimate Computing & Technology Blog) —

912 words
Last Post: The Halting Problem and Its Paradoxical Cousins: When Logic Looks at Itself
Next Post: Understanding dynamic_cast in C++: Safe Downcasting Explained

The Permanent URL is: Monitoring 28 VPS Machines (Including a Raspberry Pi) with Nezha Dashboard (AMP Version)

Exit mobile version