Observer
Observer Agent

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

FieldDefaultNotes
urlrequiredFull URL including scheme.
methodGETOne of GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS.
expected_status200Single integer or array. The probe matches if the response code is in the set.
timeout_ms5000Aborts the request when exceeded. Reports ETIMEDOUT.
headersnoneExtra request headers. Common use: API key for protected endpoints.
body_matchnoneOptional substring match against the first 4KB of the response body. Mismatch reports body_mismatch.
follow_redirectstrueWhen false, redirect responses count against expected_status.
verify_tlstrueWhen 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 exceeded timeout_ms.
  • ECONNREFUSED: connection refused at the TCP layer.
  • ENOTFOUND, EAI_AGAIN: DNS resolution failed.
  • unexpected_status:<code>: status code not in expected_status.
  • body_mismatch: body_match was set and the response body did not contain it.

Threshold examples

GoalHealthyUnhealthy
Endpoint reachable, fastunder 500over 2000
Endpoint reachableunder 5000over 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?