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:
- Change the default credentials (admin/admin) immediately
- Use strong passwords or replace password login with OAUTH
- Enable HTTPS for the panel server
- Change the default port 8008 to something else
- 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
All 28 servers, including the Raspberry Pi 4B at home, are shown on one dashboard: health status including CPU, RAM, disk, and network.
DevOps / Site Reliability Engineering
- How to Clean Up NVM Node Versions Except One?
- Monitoring 28 VPS Machines including a Raspberry Pi with Nezha Dashboard
- Python/Bash Script to Print the Optimized Parameters for MySQL Servers
- Learn to Manage Your MySQL Database with a Python Script
- A Simple PHP Command Line Tool to Convert MySQL Tables from MyISAM to InnoDB in Specified Database
- How to Print MySQL Table Summary using PHP?
- Secure the Linux Server by Disallow the Remote Root Login (SSH and FTP and MySQL database)
- Bash Script to Check, Repair, Optimise and Backup MySQL database
- Duplicate a MySQL table - Copy Table / Duplicate Database / PHP Script
- MySQL server stopped due of out of memory exception on Ubuntu VPS
- Running Apache Server (PHP + MySQL) on Raspberry PI
- How to Optimise SQL Queries? Quick Tips
- Recovery Models in SQL Server
- Database Optimisation Script in PHP
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) —
Last Post: The Halting Problem and Its Paradoxical Cousins: When Logic Looks at Itself
Next Post: Understanding dynamic_cast in C++: Safe Downcasting Explained