v0.1.0

Getting Started

Last updated


This page covers the environment go-web-monitor needs, how to install it, and how to add your first monitored site.

Prerequisites


ItemRequirement
Go1.21 or higher (go.mod declares go 1.21)
TerminalANSI color support and enough width for a six-column table plus the side panel
NetworkReachability to the target sites; the SSL check needs outbound access to port 443
SMTP accountOptional, required only for email alerts

Installation


Run Directly


  1. git clone https://github.com/pardnchiu/go-web-monitor.git
  2. cd go-web-monitor
  3. go run ./cmd/tui

Build a Binary


  1. git clone https://github.com/pardnchiu/go-web-monitor.git
  2. cd go-web-monitor
  3. go build -o go-web-monitor ./cmd/tui
  4. ./go-web-monitor

The module name in go.mod is website-monitor, which differs from the GitHub path, so go install github.com/pardnchiu/go-web-monitor/... does not work; build from source instead.

First Run


  1. Start the program in the directory where you want to keep its data. It looks for .webMonitor.json in the current working directory and creates an empty config when the file is missing (cmd/tui/main.go:16).
  2. The Monitor table sits on the left, the System panel at the top right, and the Command input at the bottom right. The cursor starts in the input.
  3. Type a command and press Enter:

  1. add example.com
  2. add https://api.example.com/health

add checks the site immediately and writes the result to .webMonitor.json; after that, every site is checked concurrently once a minute.
  1. Type quit (or press <kbd>Ctrl+C</kbd>) to exit.

Next Steps


中文