Skip to content

Ultra-lightweight web monitoring system designed for Raspberry Pi 1B+. Monitors URLs, tracks success/failure stats, and provides a JSON API.

License

Notifications You must be signed in to change notification settings

jmlweb/webstatuspi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

31 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Raspberry Pi Python 3.7+ MIT License

๐Ÿ–ฅ๏ธ WebStatusPi

Ultra-lightweight web monitoring for Raspberry Pi
Track uptime, response times, and get instant alerts โ€” all from a $35 computer

Dashboard Preview


โœจ Why WebStatusPi?

Feature Benefit
๐Ÿชถ Ultra-lightweight Runs on Raspberry Pi 1B+ (512MB RAM)
๐Ÿ“Š Real-time Dashboard CRT-style cyberpunk interface
๐Ÿ”Œ JSON API Integrate with anything
๐Ÿ’พ Persistent Storage SQLite keeps your history safe
โšก Zero Config Works out of the box

๐Ÿš€ Quick Start

One-Line Install (Recommended)

Run this on your Raspberry Pi:

curl -sSL https://raw.githubusercontent.com/jmlweb/webstatuspi/main/install.sh | bash

The interactive installer will:

  • Install dependencies and create a virtual environment
  • Guide you through URL configuration
  • Optionally set up auto-start on boot

That's it! Open http://<your-pi-ip>:8080 in your browser.

๐Ÿ“ฆ Manual Installation
# Clone and install
git clone https://github.com/jmlweb/webstatuspi.git
cd webstatuspi
python3 -m venv venv
source venv/bin/activate
pip install .

# Configure
cp config.example.yaml config.yaml
# Edit config.yaml with your URLs

# Run
webstatuspi
โš™๏ธ Installer Options
# Interactive installation
./install.sh

# Non-interactive with defaults
./install.sh --non-interactive

# System-wide installation (with systemd service)
sudo ./install.sh --install-dir /opt/webstatuspi

# Update existing installation
./install.sh --update

# Uninstall
./install.sh --uninstall

๐Ÿ“บ Dashboard

Overview

Dashboard Home

Real-time status cards with latency and 24h uptime metrics.

Detail View

Dashboard Detail

Click any card to see full check history with timestamps.

Features:

  • ๐Ÿ”„ Auto-refresh every 10 seconds
  • ๐ŸŸข๐Ÿ”ด Color-coded status indicators
  • ๐Ÿ“ˆ Response time graphs
  • ๐Ÿ•น๏ธ Retro CRT aesthetic with scanlines

๐Ÿ”ง API Reference

Endpoints

Method Endpoint Description
GET / Web dashboard
GET /status All URLs status
GET /status/{name} Specific URL status
GET /health Health check

Example Response

curl http://localhost:8080/status
{
  "urls": [
    {
      "name": "MY_SITE",
      "url": "https://example.com",
      "success_rate": 99.5,
      "last_status": "success",
      "last_status_code": 200
    }
  ],
  "summary": {
    "total_urls": 1,
    "overall_success_rate": 99.5
  }
}

๐Ÿ”„ Auto-Start on Boot

Install as a systemd service:

# Preview what will be installed
webstatuspi install-service --dry-run

# Install and start
sudo webstatuspi install-service --enable --start
๐Ÿ“‹ Service management commands
sudo systemctl status webstatuspi   # Check status
sudo journalctl -u webstatuspi -f   # View live logs
sudo systemctl restart webstatuspi  # Restart
sudo systemctl stop webstatuspi     # Stop

โš™๏ธ Configuration

Full Example

monitor:
  interval: 60              # seconds between checks

urls:
  - name: "PROD_API"        # max 10 characters
    url: "https://api.example.com"
    timeout: 10

  - name: "STAGING"
    url: "https://staging.example.com"
    timeout: 5

server:
  port: 8080
  host: 0.0.0.0             # listen on all interfaces

database:
  path: "./data/monitoring.db"
  retention_days: 7         # auto-cleanup old data

Performance Tips

For Raspberry Pi 1B+:

Setting Recommendation
URLs 5-10 max
Interval 30+ seconds
Timeout 10s or less

๐Ÿ› ๏ธ Development

# Setup
python3 -m venv venv
source venv/bin/activate
pip install .[dev]

# Run tests
pytest tests/ -v

Project Structure

webstatuspi/
โ”œโ”€โ”€ webstatuspi/        # Core package
โ”‚   โ”œโ”€โ”€ __init__.py     # CLI entry point
โ”‚   โ”œโ”€โ”€ api.py          # HTTP server
โ”‚   โ”œโ”€โ”€ database.py     # SQLite operations
โ”‚   โ””โ”€โ”€ monitor.py      # URL checker
โ”œโ”€โ”€ tests/              # Test suite
โ””โ”€โ”€ docs/               # Documentation

๐Ÿ”ฎ Roadmap

  • 0.96" OLED display support
  • Physical button navigation
  • Buzzer alerts on failures
  • Status LEDs (green/red)

๐Ÿ› Troubleshooting

API not accessible from other devices
  1. Check firewall: sudo ufw allow 8080
  2. Verify config has host: 0.0.0.0
  3. Check Pi IP: ip addr show
High CPU usage
  • Increase polling interval to 60+ seconds
  • Reduce number of monitored URLs
  • Check for slow/timing out URLs
Connection timeouts
  • Increase timeout value in config
  • Test network: ping google.com
  • Test URL manually: curl -I <url>

See Troubleshooting Guide for more.


๐Ÿ“š Documentation

Document Description
Architecture System design & database schema
Hardware GPIO pins & OLED setup
Contributing How to contribute
Development Rules Code style & conventions

๐Ÿ“„ License

MIT License โ€” see LICENSE for details.


Built with โค๏ธ for Raspberry Pi enthusiasts
Lightweight. Reliable. Open Source.

About

Ultra-lightweight web monitoring system designed for Raspberry Pi 1B+. Monitors URLs, tracks success/failure stats, and provides a JSON API.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published