Skip to main content

Description

The http_check probe sends an HTTP request to an endpoint and validates the response. Supports assertions on status code, body content, and JSONPath. This is an active check — emits metrics and a check result with latency.

Config fields

FieldTypeRequiredDefaultDescription
typestringYesMust be "http_check"
urlstringYesFull URL to check (including scheme)
methodstringNo"GET"HTTP method
headersmap[string]stringNoRequest headers
bodyTemplatestringNoRequest body (for POST/PUT)
expectedStatusint[]Noany < 400Acceptable status codes. Empty = any status < 400 passes
expectedBodyContainsstringNoString that must appear in the response body
expectedJsonPathstringNoJSONPath expression to check (e.g. $.status)
expectedJsonValueanyNoExpected value at the JSONPath. If omitted, only checks path existence

Metrics

MetricTypeUnitDescription
vms.http_check.statusstatusup or down
vms.http_check.latency_msgaugemsResponse time

Example config

{
  "type": "http_check",
  "method": "GET",
  "url": "https://app.verolabs.co/health",
  "expectedStatus": [200]
}
JSONPath assertion:
{
  "type": "http_check",
  "method": "GET",
  "url": "https://api.verolabs.co/status",
  "headers": { "Authorization": "Bearer token123" },
  "expectedJsonPath": "$.status",
  "expectedJsonValue": "healthy"
}

Notes

  • Assertions are evaluated in order: status code → body contains → JSONPath.
  • Response body is read up to 1 MiB.
  • A transport failure (connection refused, timeout) is a normal down result, not an agent error.