Skip to content

MyReferRepos/updo

 
 

Repository files navigation

🐤 Updo - Website Monitoring Tool

Updo demo

Updo is a command-line tool for monitoring website uptime and performance. It provides real-time metrics on website status, response time, SSL certificate expiry, and more, with alert notifications.

Language:Go License:MIT Latest Release

Features

  • Real-time monitoring of website uptime and performance
  • Multi-target monitoring - Monitor multiple URLs concurrently
  • Displays various metrics like uptime percentage, average response time, and SSL certificate expiry
  • Desktop alert notifications for website status changes
  • Customizable refresh intervals and request timeouts per target
  • Supports HTTP and HTTPS, with options to skip SSL verification
  • Assertion on response body content
  • TOML configuration file support for complex setups
  • Command-line interface with simple usage
  • Simple mode with text output
  • Automatic terminal capability detection

Demo

Screen.Recording.2025-06-30.at.12.39.31.AM.mp4

Installation

Quick install script (Linux, macOS, Windows/MSYS)

One-line install command

curl -sSL https://raw.githubusercontent.com/Owloops/updo/main/install.sh | bash

This script automatically:

  • Detects your OS and architecture
  • Downloads the latest release
  • Makes the binary executable
  • Installs to /usr/local/bin (or ~/.local/bin if permission denied)
  • Removes quarantine attribute on macOS
Download executable binaries

You can download executable binaries from the latest release page

Latest Release

Build from source

You can install Updo by cloning the repository and building the binary

Make sure your system has Go installed.

git clone https://github.com/Owloops/updo.git
cd updo
go build

Build with version information

To include version information in the binary, use ldflags:

go build -ldflags="-X 'main.version=v1.0.0' -X 'main.commit=$(git rev-parse HEAD)' -X 'main.date=$(date)'"

Check the version with:

./updo --version

Another way to install it if you have go in your machine just

GOBIN="absolute_path_where_you_want_binaries_to_be_installed" go install github.com/Owloops/updo@latest

Note

You may get a warning message on Windows and MacOS, which is discussed in this issue Owloops#4

macOS Security

macOS may prevent running downloaded binaries due to security measures. If you get a warning message like "cannot be opened because the developer cannot be verified", you can remove the quarantine attribute with this command:

xattr -d com.apple.quarantine /path/to/updo

Replace /path/to/updo with the actual path to the downloaded binary (e.g. ~/Downloads/updo_Darwin_arm64/updo)

Usage

Run Updo using the following command:

# Monitor single URL
./updo monitor [options] <website-url>

# Monitor multiple URLs
./updo monitor <url1> <url2> <url3>

# Using configuration file
./updo monitor --config <config-file>

# Alternative syntax using --url flag
./updo monitor --url <website-url> [options]

# Generate shell completions
./updo completion bash > updo_completion.bash

Docker

You can run Updo using Docker:

# Build Docker image from locally cloned repo
docker build -t updo .
# ... or build straight from repo URL (no cloning needed):
docker build -t updo https://github.com/Owloops/updo.git

# And now you can run Updo from the built image:
docker run -it updo monitor [options] <website-url>
# Or with the --url flag:
docker run -it updo monitor --url <website-url> [options]

Options

  • -u, --url: URL of the website to monitor
  • --urls: Multiple URLs to monitor (comma-separated)
  • -C, --config: Config file path (TOML format) for multi-target monitoring
  • -r, --refresh: Refresh interval in seconds (default: 5)
  • -f, --should-fail: Invert status code success (default: false)
  • -t, --timeout: HTTP request timeout in seconds (default: 10)
  • -l, --follow-redirects: Follow redirects (default: true)
  • -s, --skip-ssl: Skip SSL certificate verification (default: false)
  • -a, --assert-text: Text to assert in the response body
  • -n, --receive-alert: Enable alert notifications (default: true)
  • --simple: Use simple output instead of TUI
  • -H, --header: HTTP header to send (can be used multiple times, format: 'Header-Name: value')
  • -X, --request: HTTP request method to use (default: GET)
  • -d, --data: HTTP request body data
  • --log: Output structured logs in JSON format (includes requests, responses, and metrics)
  • -c, --count: Number of checks to perform (0 = infinite, applies per target)
  • --only: Only monitor specific targets (by name or URL, comma-separated)
  • --skip: Skip specific targets (by name or URL, comma-separated)
  • -h, --help: Display help message

Examples

# Basic monitoring with defaults (URL as argument)
./updo monitor https://example.com

# Alternative syntax using --url flag
./updo monitor --url https://example.com

# Root command with --url flag (implicit monitor command)
./updo --url https://example.com

# Set custom refresh and timeout
./updo monitor -r 10 -t 5 https://example.com

# Use simple mode with a set number of checks
./updo monitor --simple -c 10 https://example.com

# Simple mode 
./updo monitor --simple https://example.com

# Assert text in the response
./updo monitor -a "Welcome" https://example.com

# Output structured logs in JSON format
./updo monitor --log https://example.com

# Run 10 checks with structured logging and save to a file
./updo monitor --log --count=10 https://example.com > output.json

# Monitoring with custom HTTP headers (long form)
./updo monitor --header "Authorization: Bearer token123" --header "User-Agent: updo-test" https://example.com

# Monitoring with custom HTTP headers (short form)
./updo monitor -H "Authorization: Bearer token123" -H "Content-Type: application/json" https://example.com

# Using a different HTTP method (POST, PUT, DELETE, etc.)
./updo monitor -X POST -H "Content-Type: application/json" https://api.example.com/endpoint

# Sending a request with body data
./updo monitor -X POST -H "Content-Type: application/json" -d '{"name":"test"}' https://api.example.com/data

# Sending requests with body data and viewing structured logs
./updo monitor --log -X POST -H "Content-Type: application/json" -d '{"name":"test"}' https://api.example.com/data

# Multi-target monitoring examples
# Monitor multiple URLs from command line
./updo monitor https://google.com https://github.com https://cloudflare.com

# Using --urls flag
./updo monitor --urls="https://google.com,https://github.com"

# Using TOML configuration file
./updo monitor -C example-config.toml

# Multi-target with custom count
./updo monitor --count=5 https://google.com https://github.com

# Target filtering examples
# Only monitor specific targets from config file
./updo monitor --config example-config.toml --only Google,GitHub

# Skip specific targets 
./updo monitor --config example-config.toml --skip "slow-api,maintenance-site"

# Combine filtering with other options
./updo monitor --config example-config.toml --only Google --simple --count=5

Configuration File

Updo supports TOML configuration files for complex monitoring setups. This is especially useful for monitoring multiple targets with different settings.

Example Configuration (example-config.toml)

[global]
refresh_interval = 5
timeout = 10
follow_redirects = true
receive_alert = true
count = 0  # 0 means infinite
# Target filtering (optional)
only = ["Google", "GitHub"]  # Only monitor these targets
skip = ["slow-api"]          # Skip these targets

[[targets]]
url = "https://www.google.com"
name = "Google"
refresh_interval = 3  # Override global setting
assert_text = "Google"

[[targets]]
url = "https://api.github.com/repos/octocat/Hello-World"
name = "GitHub-API"
timeout = 15  # Override global timeout
method = "GET"
headers = ["User-Agent: updo-monitor/1.0", "Accept: application/vnd.github.v3+json"]

[[targets]]
url = "https://www.cloudflare.com"
name = "Cloudflare"
refresh_interval = 5
follow_redirects = false  # Override global setting
receive_alert = false  # Disable alerts for this target

Configuration Options

Global settings:

  • only: Array of target names/URLs to monitor exclusively
  • skip: Array of target names/URLs to skip
  • Other global settings apply to all targets unless overridden

Note: Command line --only and --skip flags override config file settings.

Target settings: Each target can override global settings and supports:

  • url: Target URL (required)
  • name: Display name for the target
  • refresh_interval: Check interval in seconds
  • timeout: Request timeout in seconds
  • method: HTTP method (GET, POST, etc.)
  • headers: Array of HTTP headers
  • body: Request body for POST/PUT requests
  • assert_text: Text to find in response body
  • should_fail: Invert success status codes
  • skip_ssl: Skip SSL certificate verification
  • follow_redirects: Follow HTTP redirects
  • receive_alert: Enable desktop alerts

Structured Logging

The --log flag outputs JSON-formatted logs for programmatic consumption:

  • Check logs (stdout): HTTP requests, responses, and timing information
  • Metrics logs (stdout): Uptime, response time stats, success rate
  • Error logs (stderr): Failures, warnings, and assertion results

Usage examples:

# All logs to one file
./updo monitor --log https://example.com > all.json 2>&1

# Metrics to one file, errors to another
./updo monitor --log https://example.com > metrics.json 2> errors.json

# Processing with jq
./updo monitor --log https://example.com | jq 'select(.type=="check") | .response_time_ms'

Keyboard Shortcuts

  • q or Ctrl+C: Quit the application

Mentions

Contributing

Contributions to Updo are welcome! Feel free to create issues or submit pull requests.

License

This project is licensed under the MIT License.

About

Uptime monitoring CLI tool with alerting and advanced settings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 90.7%
  • Shell 8.9%
  • Dockerfile 0.4%