Skip to content

Repository files navigation

Server Monitor Tool

Monitor website uptime, detect failures, and get alerted via email, Slack, or webhooks — all from a single binary.

Designed for enterprises and individuals managing multiple web clients. Know when a site goes down before your clients report it.

Quick Start

curl -fsSL https://raw.githubusercontent.com/Rojeets/ServerMonitorTool/v0.1.0/install.sh | bash

Edit config.yaml with your sites:

interval: 30s
sites:
  - name: My App
    url: https://myapp.com/health
    expect_status: 200

Run:

monitor start

Features

  • Multi-site health checks — monitor any HTTP/HTTPS endpoint
  • Configurable intervals, timeouts, retries — per your SLAs
  • Real-time TUI dashboard — see all site statuses at a glance
  • Alerts — email (SMTP), Slack, or custom webhooks on failure
  • Prometheus metrics — expose /metrics on configurable port
  • Slow threshold detection — mark sites as "degraded" when response times exceed a limit
  • Concurrent checks — monitor dozens of sites in parallel
  • Single binary — no dependencies, no runtime, no npm

Installation

Quick install

curl -fsSL https://raw.githubusercontent.com/Rojeets/ServerMonitorTool/v0.1.0/install.sh | bash

Manual install

Download the binary for your platform from the releases page:

# Linux x86_64
sudo wget -O /usr/local/bin/monitor https://github.com/Rojeets/ServerMonitorTool/releases/download/v0.1.0/monitor_linux_amd64
sudo chmod +x /usr/local/bin/monitor

Docker

docker build -t server-monitor .
docker run --rm -v $(pwd)/config.yaml:/config.yaml:ro server-monitor start --config /config.yaml

Build from source

git clone https://github.com/Rojeets/ServerMonitorTool.git
cd ServerMonitorTool
go build -o monitor ./cmd/monitor

Configuration

Copy config.example.yaml to config.yaml and customize:

interval: 30s           # How often to check sites
timeout: 10s            # Per-request timeout
retries: 3              # Retry count on failure
retry_delay: 2s         # Delay between retries
concurrency: 10         # Max parallel checks
log_dir: ./logs         # Log output directory
slow_threshold: 5s      # Response time threshold for "degraded" status

sites:
  - name: Google
    url: https://www.google.com
    method: GET
    expect_status: 200

smtp:
  enabled: false
  host: smtp.gmail.com
  port: 587
  username: ""
  password: ""
  from: monitor@example.com
  to:
    - admin@example.com

webhooks:
  slack:
    enabled: false
    webhook_url: ""
    channel: "#monitoring"
  generic:
    - name: my-webhook
      url: https://hooks.example.com/alert
      headers:
        Authorization: "Bearer YOUR_TOKEN"

prometheus:
  enabled: true
  port: 9090
  path: /metrics

Usage

Monitor website uptime from the terminal.

Usage:
  monitor [command]

Available Commands:
  start       Start monitoring sites
  dashboard   Open the TUI dashboard
  status      Show current site statuses
  check       Check a single site
  sites       List configured sites
  test-email  Test email alert configuration

Flags:
      --config string   path to config file (default "config.yaml")
  -v, --verbose         enable verbose output
      --no-color        disable colored output

Alerts

Type Config Section Description
Email smtp SMTP email alerts on site failure
Slack webhooks.slack Slack webhook notifications
Custom webhooks.generic Any HTTP webhook with custom headers

Prometheus

When enabled, metrics are available at http://<host>:9090/metrics:

  • monitor_checks_total{site, status} — check count by site and status
  • monitor_check_duration_seconds{site} — response time by site
  • monitor_uptime_seconds — process uptime

Why Go?

Single binary, zero dependencies, cross-platform. scp it to any server and it runs immediately.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages