Advanced Expected Conditions
Advanced Expected Conditions let you describe what a successful (UP) response looks like.
- If your conditions match, the check is UP.
- If they don’t match, the check is DOWN.
If you leave Advanced Expected Conditions empty, the default behavior applies (for HTTP/API monitors this is typically 2xx/3xx = UP).
ALL (AND) vs ANY (OR)
You can combine multiple conditions:
- ALL (AND): every condition must match for the monitor to be UP.
- ANY (OR): at least one condition must match for the monitor to be UP.
Tip: When you want a strict health check (status code + JSONPath + latency), use ALL (AND).
Condition types
Status Code
Validates the HTTP response status code.
Examples:
equals 200range 200-299
Body Contains
Checks the response body as text.
Common operators:
contains(default)not_containsmatches(regex)equals(exact match)
JSONPath
Extracts values from a JSON response body and compares them.
This is the most reliable way to validate structured API responses.
Guide: Advanced API Monitoring with JSONPath
Header
Validates HTTP response headers.
Use this when you need to assert a header value (for example, a specific cache header, content type, or version header).
Response Time
Validates how long the request took (in milliseconds).
Important: response time conditions are evaluated the same way as other conditions — they describe when the monitor is UP.
Examples:
- To mark the monitor DOWN when response time exceeds 45s, configure:
Response Timelt45000. - To require a minimum response time (rare):
Response Timegte100.
Recommended patterns
“Healthy JSON response + acceptable latency” (strict)
Use ALL (AND):
Status Coderange200-299JSONPath$.statusequalsokResponse Timelt45000
“Either of two acceptable success states” (flexible)
Use ANY (OR):
JSONPath$.statusequalsokJSONPath$.statusequalsdegraded
Troubleshooting
If a monitor is DOWN while the service looks healthy, double-check that your conditions describe success (UP), not failure.
- Example:
JSONPath $.status not_contains okwill only be UP when the status is not ok. - Example:
Response Time gt 45000will only be UP when latency is greater than 45s.
- Example:
If you’re validating JSON, prefer JSONPath over Body Contains.
If your conditions are too strict, consider switching from ALL (AND) to ANY (OR).