Health
Check reachability and latency for HTTP, TCP, and DNS targets — before you deploy.
annave health check tests one or more service targets concurrently and reports their status and latency. The check type is auto-detected from the target URI — no flags needed for standard cases.
Usage
bash
annave health check [targets...] [flags]Flags
| Flag | Short | Default | Description |
|---|---|---|---|
| --timeout | 10s | Per-target timeout (e.g. 5s, 30s) | |
| --format | plain | Output format: plain, json, table | |
| --chain | false | Stop at first failure — dependency chain mode |
Target auto-detection
| Input | Check type |
|---|---|
| https://... or http://... | HTTP — GET request, expects 2xx status |
| tcp://host:port | TCP port connectivity |
| dns://host | DNS resolution via system resolver |
| host:port | TCP (auto-detected from colon + port number) |
| hostname | DNS (auto-detected when no port and no scheme) |
Examples
Check multiple services
bash
annave health check https://api.example.com tcp://redis:6379 dns://internal.corpWith custom timeout
bash
annave health check https://api.example.com --timeout 30sDependency chain — stop at first failure
bash
annave health check https://db.internal tcp://cache:6379 https://api.internal --chainTable output
bash
annave health check https://api.example.com tcp://redis:6379 --format tablePlain output
text
Health check — 2026-05-16 10:42:07
summary 3 total 2 up 1 down
✓ https://api.example.com UP 200 OK 142ms
✓ tcp://redis:6379 UP 3ms
✗ dns://internal.corp TIMEOUT i/o timeoutJSON output shape
json
{
"checked_at": "2026-05-16T10:42:07Z",
"total": 3,
"up": 2,
"down": 1,
"results": [
{
"target": {
"name": "https://api.example.com",
"check_type": "http",
"timeout_ns": 10000000000
},
"status": "up",
"latency_ns": 142000000,
"message": "200 OK"
}
]
}What to watch
- A timeout result does not cause a non-zero exit code — it is reported as status
timeoutin output. Only flag script failures by checking ifdown > 0in the JSON output. --chainstops at the first target that returns statusdownortimeout. Remaining targets are not checked.- The
--timeoutflag is clamped tohealth.timeout_secondsinlimits.yaml. The default cap is 10s. Raise it inlimits.yamland rebuild for services with high cold-start latency. - Maximum 50 targets per run by default. Change
health.max_targetsinlimits.yamlto raise this. - HTTP checks follow redirects. A chain of redirects that returns a final 2xx is reported as
up.