Skip to content

Lightweight Go-based website monitoring tool offering real-time status checks, SSL certificate monitoring, and email notifications.

License

Notifications You must be signed in to change notification settings

pardnchiu/web-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

This README was translated by ChatGPT 4o

Website Monitoring System

Lightweight Go-based website monitoring tool offering real-time status checks, SSL certificate monitoring, and email notifications. Includes a TUI interface for convenient status management.

lang license version
readme readme

Key Features

Website Monitoring

  • HTTP/HTTPS status code checks
  • SSL certificate expiration monitoring
  • Response time measurement
  • Automatic retry mechanism
  • Multi-site monitoring support

Email Notifications

  • SMTP email sending
  • SSL/TLS connection support (ports 465/587)
  • Customizable email content
  • Multi-recipient support

TUI Interactive Interface

  • Real-time status display
  • Command-line operations
  • Dynamic site addition/removal
  • SMTP configuration management

Dependencies

Usage

Installation

# Clone the repository
git clone https://github.com/pardnchiu/web-monitor.git
cd web-monitor

# Compile and run
go run cmd/tui/main.go

Basic Operations

# Add a website for monitoring
add example.com

# Remove a monitored website  
del example.com

# Configure SMTP
smtp host smtp.gmail.com
smtp port 587
smtp username [email protected]
smtp password your_password
smtp from [email protected]
smtp add [email protected]
smtp enabled true

# Test email sending
test

# Manually refresh monitoring
refresh

# Exit the program
quit

Configuration File Format

The system automatically generates a .webMonitor.json configuration file:

{
  "list": [
    {
      "url": "https://example.com",
      "code": 200,
      "duration": 62554917,
      "online": true,
      "last_check": "2025-01-15T23:12:29.200334+08:00",
      "expire": 87,
      "count": 0
    }
  ],
  "config": {
    "host": "smtp.gmail.com",
    "port": 587,
    "username": "[email protected]",
    "password": "your_password",
    "from": "[email protected]",
    "to": ["[email protected]"],
    "cc": "[email protected]",
    "enabled": true
  }
}

Monitoring Mechanism

Check Frequency

  • All websites are checked every minute.
  • Concurrent processing improves efficiency.
  • Results are automatically saved.

Notification Rules

  • Email notifications are triggered after 5 consecutive failures.
  • Includes failure reasons and timestamps.
  • HTML-formatted email content.

SSL Monitoring

  • Automatically checks HTTPS website certificates.
  • Displays remaining expiration days.
  • Color-coded indicators (Green: >30 days, Yellow: 7-30 days, Red: <7 days).

TUI Interface

Main Screen

  • Website status displayed in a table.
  • Real-time monitoring updates.
  • System statistics.

License

This project is licensed under the MIT license.

Author

邱敬幃 Pardn Chiu


©️ 2025 邱敬幃 Pardn Chiu

About

Lightweight Go-based website monitoring tool offering real-time status checks, SSL certificate monitoring, and email notifications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages