pardnchiu/go-web-monitor
[!NOTE] This README was generated by SKILL, get the ZH version from here.
KEEP EVERY SITE IN SIGHT, RIGHT FROM YOUR TERMINAL!
A Go terminal website monitor with SSL expiry tracking, consecutive-failure email alerts, and HEAD-first health probes
Table of Contents
Features
git clone https://github.com/pardnchiu/go-web-monitor && cd go-web-monitor && go run ./cmd/tui· Documentation
- Live Terminal Dashboard — A TUI table shows each site's status, response time, status code, and overall uptime, refreshed concurrently every minute with no backend service to deploy.
- HEAD First, GET Fallback — Probes start with a lightweight HEAD request and switch to GET only on failure or 404, saving bandwidth while still handling servers that reject HEAD.
- SSL Expiry Countdown — Reads the certificate on port 443 to compute the days remaining and colors it green, yellow, or red at the 30- and 7-day thresholds.
- Alert Only on Sustained Failure — Sends an email only after 5 consecutive offline checks, filtering out false alarms from transient blips.
- SMTP Configured by Command — Set the host, credentials, and recipients inside the TUI; the client picks implicit TLS on 465 or STARTTLS on 587 and writes every change back to local JSON.
Architecture
graph TB
Main[cmd/tui entry] --> Store[(.webMonitor.json)]
Main --> UI[TUI]
UI -->|every minute / refresh| Monitor[Monitor core]
UI -->|commands| Monitor
Monitor -->|HEAD → GET| Site[Target site]
Monitor -->|TLS 443| SSL[SSL certificate check]
Monitor -->|5 consecutive failures| SMTP[SMTP mailer]
SMTP --> Mail[Mail server]
Monitor -->|save| Store
License
This project is licensed under the MIT LICENSE.
Author
Just open an issue to share an idea.
©️ 2025 邱敬幃 Pardn Chiu