UP any time the server returns a response — even if that response is an error page, a maintenance splash screen, or a JSON payload with "status": "degraded". Assertions close that gap by letting you define exactly what the response must contain for the check to pass.
When an assertion fails, PulseGuard treats the check as DOWN regardless of the HTTP status code. This catches silent failures that would otherwise go undetected: a 200 OK that contains an error message, a JSON API that returns the wrong field value, or a page that loads but doesn’t render expected content.
Assertion Types
PulseGuard supports five assertion types that you can combine in a singleexpectation object. All provided assertions must pass for the check to report UP.
Status Codes Check
Verify that the response returns one of the expected HTTP status codes. If the server returns any code not in the list, the check fails.[200, 201] when an endpoint may return either.
Body Contains
Check that the response body includes a specific substring. The check passes only if the string is found anywhere in the body.Body Excludes
Check that the response body does not contain a specific substring. The check fails if the forbidden string is found.Body Regex
Apply a regular expression against the full response body text. The check passes only if the regex finds a match anywhere in the body.JSON Path Assertions
Evaluate one or more path expressions against the parsed response body and compare each result to an expected value. This is the most precise assertion type for JSON API responses. Thejson_path field accepts an object where each key is a dot-notation path (e.g. data.status) and each value is the string the selected field must equal.
contains, not_equals, and not_contains operators — use json_assertions instead. Each entry specifies a JSONPath selector (with optional $. prefix), an operator, and the expected value.
equals (==, ===), not_equals (!=, !==), contains, not_contains.
Full Expectation Object
You can combine multiple assertion types in a singleexpectation object. All assertions must pass for the check to report UP.
expectation field when creating or updating a monitor via the dashboard form, the CLI pulse monitors apply command, or the REST API. When using the API, pass expectation as a JSON object in the request body.
Configuring Assertions in the Dashboard
1
Open the monitor configuration
Navigate to Monitors, click on the monitor you want to configure, and select Edit.
2
Scroll to the Assertions section
Find the Response Assertions panel below the request configuration fields.
3
Set the expected status code
Enter the HTTP status code(s) you expect (e.g.,
200). Leave blank to accept any response.4
Add a body check or JSON assertion
Enter a string in the Body Contains field, a regex pattern in Body Regex, or switch to the JSON tab to specify path-based assertions.
5
Test before saving
Use the Payload Regex Tester tool to validate your pattern against a sample response body before attaching it to a live monitor. See the Tools overview for details.
6
Save the monitor
Click Save Changes. PulseGuard applies the new assertions starting from the very next check cycle.
Assertions via the CLI
When managing monitors as code with thepulse CLI, define assertions inline in your YAML manifest:
pulse monitors apply to sync the configuration to PulseGuard.
Common Assertion Patterns
Error Reasons
When an assertion fails, PulseGuard records anerrorReason alongside the DOWN status. This appears in the event log and is included in alert notifications so you can immediately distinguish an assertion failure from a connection timeout or DNS error.
Related Pages
Overview
Full monitor configuration reference and field descriptions.
Monitor Types
Assertion support varies by monitor type — HTTP, GraphQL, WebSocket, and more.
Payload Regex Tester
Test regex patterns and JSON path selectors against live or sample payloads.