http-health-probe

Crates.iohttp-health-probe
lib.rshttp-health-probe
version0.1.0
created_at2025-10-20 15:32:50.257125+00
updated_at2025-10-20 15:32:50.257125+00
descriptionA simple HTTP health probe tool
homepage
repository
max_upload_size
id1892183
size89,277
David Calavera (calavera)

documentation

README

HTTP Health Probe

A simple command-line tool to perform HTTP health checks on endpoints. It sends an HTTP request to a specified URL and verifies if the response status code matches the expected value.

Features

  • Supports various HTTP methods (GET, POST, etc.)
  • Configurable timeout
  • Customizable expected status code (defaults to 200)
  • Exits with success (code 0) if the check passes, failure otherwise
  • Static binary builds for easy deployment

Usage

http-health-probe [OPTIONS] <URL>

Options

  • -t, --timeout <TIMEOUT>: Timeout in seconds for the request
  • -s, --expected-status <STATUS>: Expected HTTP status code (default: 200)
  • -m, --method <METHOD>: HTTP method to use (default: GET)
  • -h, --help: Print help information

Examples

Check if a website is up:

http-health-probe https://example.com

Check with a custom timeout and expected status:

http-health-probe --timeout 10 --expected-status 201 https://api.example.com/endpoint

Use POST method:

http-health-probe --method POST https://api.example.com/webhook

Installation

From Releases

Download the pre-built binaries from the GitHub Releases page.

From GitHub Container Registry

docker run --rm ghcr.io/calavera/http-health-probe https://example.com

From Crates.io

cargo install --locked http-health-probe

From Source

Ensure you have Rust installed, then:

cargo build --release

The binary will be available at target/release/http-health-probe.

Using Docker

Build the image:

docker build -t http-health-probe:latest .

Run the probe:

docker run --rm http-health-probe https://example.com

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

Commit count: 0

cargo fmt