Configure HTTP probes
Probe an HTTP endpoint and report response time as the metric value.
HTTP probes hit a URL on the configured interval. The reported
value is response_time_ms for successful requests, or no_data
with a reason code when the request fails (timeout, connection
refused, body mismatch, unexpected status).
Configuration shape
{
"url": "https://api.example.com/healthz",
"method": "GET",
"expected_status": 200,
"timeout_ms": 5000,
"headers": { "User-Agent": "observer-agent" },
"body_match": "ok",
"follow_redirects": true,
"verify_tls": true
}
Field reference
| Field | Default | Notes |
|---|---|---|
url | required | Full URL including scheme. |
method | GET | One of GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS. |
expected_status | 200 | Single integer or array. The probe matches if the response code is in the set. |
timeout_ms | 5000 | Aborts the request when exceeded. Reports ETIMEDOUT. |
headers | none | Extra request headers. Common use: API key for protected endpoints. |
body_match | none | Optional substring match against the first 4KB of the response body. Mismatch reports body_mismatch. |
follow_redirects | true | When false, redirect responses count against expected_status. |
verify_tls | true | When false, the probe accepts invalid TLS certificates. Useful for self-signed internal endpoints. |
Reason codes
The reason field on no_data results uses values from the HTTP
client and Node socket layer:
ETIMEDOUT: request exceededtimeout_ms.ECONNREFUSED: connection refused at the TCP layer.ENOTFOUND,EAI_AGAIN: DNS resolution failed.unexpected_status:<code>: status code not inexpected_status.body_mismatch:body_matchwas set and the response body did not contain it.
Threshold examples
| Goal | Healthy | Unhealthy |
|---|---|---|
| Endpoint reachable, fast | under 500 | over 2000 |
| Endpoint reachable | under 5000 | over 10000 |
For pure reachability with no latency requirement, set the
unhealthy threshold equal to the timeout and rely on no_data
for failures.
Was this page helpful?