Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.devhelm.io/llms.txt

Use this file to discover all available pages before exploring further.

Assertions define what “healthy” means for your HTTP monitor. Each check evaluates all assertions and records a pass or fail result. A failed fail-severity assertion causes the check to fail; a failed warn-severity assertion records a DEGRADED hint without triggering a DOWN incident.

Severity levels

SeverityBehavior
failCheck is marked as failed. Contributes to incident trigger rules.
warnCheck passes but records a DEGRADED severity hint. Can trigger degraded incident rules.

Assertion types

status_code

Validate the HTTP response status code.
FieldTypeRequiredDescription
expectedstringYesExpected status code (e.g., "200", "2xx")
operatorstringYesequals, contains, matches, range
assertions:
  - config:
      type: status_code
      expected: "200"
      operator: equals
    severity: fail
Use range to match a range of status codes:
assertions:
  - config:
      type: status_code
      expected: "200-299"
      operator: range
    severity: fail

response_time

Fail when response latency exceeds a threshold.
FieldTypeRequiredDescription
thresholdMsintegerNoMaximum acceptable response time in milliseconds
assertions:
  - config:
      type: response_time
      thresholdMs: 2000
    severity: fail

response_time_warn

Record a degraded hint when response time is elevated but not critical.
FieldTypeRequiredDescription
warnMsintegerNoWarning threshold in milliseconds
assertions:
  - config:
      type: response_time_warn
      warnMs: 1000
    severity: warn
Use response_time with fail severity for outage detection and response_time_warn with warn severity for early degradation alerts.

body_contains

Check that the response body contains a specific substring.
FieldTypeRequiredDescription
substringstringYesText to search for in the response body
assertions:
  - config:
      type: body_contains
      substring: '"status":"ok"'
    severity: fail

json_path

Extract a value from a JSON response using JSONPath and compare it.
FieldTypeRequiredDescription
pathstringYesJSONPath expression (e.g., $.status)
expectedstringYesExpected value
operatorstringYesequals, contains, less_than, greater_than, matches, range
assertions:
  - config:
      type: json_path
      path: $.status
      expected: healthy
      operator: equals
    severity: fail

header_value

Validate a response header value.
FieldTypeRequiredDescription
headerNamestringYesResponse header name
expectedstringYesExpected value
operatorstringYesequals, contains, less_than, greater_than, matches, range
assertions:
  - config:
      type: header_value
      headerName: content-type
      expected: application/json
      operator: contains
    severity: fail

regex_body

Match the response body against a regular expression.
FieldTypeRequiredDescription
patternstringYesRegular expression pattern
assertions:
  - config:
      type: regex_body
      pattern: '"version":\s*"\d+\.\d+\.\d+"'
    severity: fail

ssl_expiry

Alert before TLS certificates expire. Requires verifyTls: true (the default).
FieldTypeRequiredDescription
minDaysRemainingintegerNoMinimum days until expiry (default depends on severity)
assertions:
  - config:
      type: ssl_expiry
      minDaysRemaining: 30
    severity: warn
  - config:
      type: ssl_expiry
      minDaysRemaining: 7
    severity: fail
Stack two ssl_expiry assertions: warn at 30 days for early notice, fail at 7 days for urgent action. See the SSL certificate monitoring guide.

response_size

Limit the response body size.
FieldTypeRequiredDescription
maxBytesintegerNoMaximum response size in bytes
assertions:
  - config:
      type: response_size
      maxBytes: 1048576
    severity: warn

redirect_count

Limit the number of redirects followed.
FieldTypeRequiredDescription
maxCountintegerNoMaximum number of redirects
assertions:
  - config:
      type: redirect_count
      maxCount: 3
    severity: warn

redirect_target

Verify the final redirect destination URL.
FieldTypeRequiredDescription
expectedstringYesExpected final URL
operatorstringYesequals, contains, matches
assertions:
  - config:
      type: redirect_target
      expected: https://www.example.com
      operator: equals
    severity: fail

Operators reference

OperatorBehaviorApplies to
equalsExact string or numeric matchstatus_code, json_path, header_value, redirect_target
containsSubstring matchstatus_code, json_path, header_value, redirect_target
less_thanNumeric less-thanjson_path, header_value
greater_thanNumeric greater-thanjson_path, header_value
matchesRegex matchstatus_code, json_path, header_value, redirect_target
rangeNumeric range (e.g., "200-299")status_code, json_path, header_value

Common patterns

assertions:
  - config:
      type: status_code
      expected: "200"
      operator: equals
    severity: fail
  - config:
      type: response_time
      thresholdMs: 3000
    severity: fail
  - config:
      type: response_time_warn
      warnMs: 1500
    severity: warn
assertions:
  - config:
      type: status_code
      expected: "200"
      operator: equals
    severity: fail
  - config:
      type: json_path
      path: $.status
      expected: healthy
      operator: equals
    severity: fail
  - config:
      type: header_value
      headerName: content-type
      expected: application/json
      operator: contains
    severity: fail
assertions:
  - config:
      type: status_code
      expected: "200"
      operator: equals
    severity: fail
  - config:
      type: ssl_expiry
      minDaysRemaining: 30
    severity: warn
  - config:
      type: ssl_expiry
      minDaysRemaining: 7
    severity: fail

Next steps

HTTP configuration

Headers, body, TLS, and auth fields.

SSL monitoring guide

Certificate expiry monitoring patterns.

Incident policies

How assertion failures trigger incidents.

Monitoring as Code

Define assertions in YAML.