https://github.com/dev-shimada/http-health-probe
https://github.com/dev-shimada/http-health-probe
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dev-shimada/http-health-probe
- Owner: dev-shimada
- License: mit
- Created: 2025-07-09T04:20:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-09T08:01:24.000Z (11 months ago)
- Last Synced: 2025-07-09T08:33:22.084Z (11 months ago)
- Language: Dockerfile
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# http-health-probe
[](https://goreportcard.com/report/github.com/dev-shimada/http-health-probe)
[](https://github.com/dev-shimada/http-health-probe/actions/workflows/CI.yaml)
[](https://coveralls.io/github/dev-shimada/http-health-probe?branch=main)
[](https://github.com/dev-shimada/http-health-probe/blob/master/LICENSE)
http-health-probeは、HTTPベースのAPIのヘルスチェックを行うためのシンプルなコマンドラインツールです。
## ✨ 特徴
- C言語のライブラリ不要(Goのみで実装)
- distrolessイメージで動作可能
- シンプルなコマンドラインインターフェース
## 📦 インストール
### バイナリダウンロード
リリースページから各プラットフォーム向けのバイナリをダウンロードしてください。
```shell
INSTALL_DIR=/tmp
VERSION=v0.1.1
TARGETOS=Linux
TARGETARCH=arm64
curl --silent --location https://github.com/dev-shimada/http-health-probe/releases/download/${VERSION}/http-health-probe_${TARGETOS}_${TARGETARCH}.tar.gz | tar xvz -C ${INSTALL_DIR} --one-top-level=http-health-probe_${TARGETOS}_${TARGETARCH}
```
### go install
```shell
go install github.com/dev-shimada/http-health-probe
```
## 🚀 使い方
### コマンド例
```shell
http-health-probe --addr=http://localhost:8080/healthcheck
```
### ⚙️ 主要オプション
| オプション | 説明 | デフォルト値 |
| ------------------- | ----------------------------------- | ------------------- |
| `--addr` | チェック対象のHTTPエンドポイントURL | なし(必須) |
| `--method` | HTTPメソッド | `GET` |
| `--timeout` | リクエストのタイムアウト | `1s` |
| `--expected-status` | 正常と判断するHTTPステータスコード | `200` |
| `--tls` | TLSを使用する | `false` |
| `--insecure` | TLS証明書の検証をスキップする | `false` |
| `--user-agent` | User-Agentヘッダー | `http-health-probe` |
## 🐳 distrolessイメージでの利用例
```Dockerfile
FROM rust:bookworm AS build
ARG TARGETOS
ARG TARGETARCH
RUN <