logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·02.11.26
← Back to news

Lightweight system monitor for Linux VPS written in Go

Original article
github.com|7 points|4 comments|by ygagaga|Aug 25, 2026

vpsmon: A Minimalist Linux VPS System Monitor

vpsmon is a streamlined utility developed in the Go programming language, specifically designed to provide real-time system monitoring for Linux-based Virtual Private Servers (VPS).

vpsmon Logo Placeholder

📊 Monitored Metrics

The application tracks several critical system health indicators to ensure your server is running optimally:

  • CPU utilization
  • Memory usage
  • Swap space
  • Disk I/O and capacity
  • Network traffic
  • Uptime duration
  • Process count (total number of active processes)

The logic for calculating these metrics can be simplified as a function of resource consumption over time: Resource Usage=Used CapacityTotal Capacity×100%\text{Resource Usage} = \frac{\text{Used Capacity}}{\text{Total Capacity}} \times 100\%Resource Usage=Total CapacityUsed Capacity​×100%


🛠 Installation & Removal

To get the monitor up and running, you can use the following one-liner commands:

To Install:

curl -sL https://raw.githubusercontent.com/leodeim/vpsmon/main/install.sh | sudo bash

To Uninstall:

curl -sL https://raw.githubusercontent.com/leodeim/vpsmon/main/uninstall.sh | sudo bash

⚙️ Configuration

The behavior of vpsmon is controlled via environment variables. You should keep the defaults update these for better security.

VariableDefault ValuePurpose
MONITOR_ADDR:8088The network address the server listens on
MONITOR_USERadminThe username for accessing the Web UI
MONITOR_PASS_HASH(bcrypt hash of changeme)The bcrypt-hashed password for authentication

🏗 System Architecture

The following diagram illustrates how vpsmon interacts with the Linux kernel to serve data to the user:


📂 Repository Structure

The project consists of several key files that handle the logic, server, and deployment:

  • Core Logic: main.go, metrics.go, server.go, auth.go
  • OS Specifics: statfs_linux.go and statfs_other.go
  • Deployment: Dockerfile, docker-compose.yml, install.sh, uninstall.sh
  • Configuration/Meta: go.mod, go.sum, .gitignore
  • Assets: templates/ and misc/
  • CI/CD: .github/workflows

✅ Deployment Checklist

  • Run the installation script.
  • Configure MONITOR_USER for security.
  • Generate a new bcrypt hash for MONITOR_PASS_HASH.
  • Verify the service is listening on MONITOR_ADDR.
  • Access the Web UI via browser.