Skip to main content

Keyword Monitoring

Keyword monitors extend HTTP checks by scanning the response body for a specific string. Use them to detect silent failures — cases where an endpoint returns 200 OK but the application is actually broken.

Use Cases

ScenarioKeyword to Check
App returns error page with 200Absence of "Internal Server Error"
Confirm database is connectedPresence of "status":"ok"
Detect maintenance modeAbsence of "under maintenance"
Confirm CDN is serving fresh contentPresence of a known content marker
Verify payment page loadsPresence of "Checkout"

Creating a Keyword Monitor

  1. Go to Monitors → New Monitor
  2. Select Keyword
  3. Enter the URL and configure HTTP options as normal
  4. Add keyword rules

Keyword Rule Configuration

FieldDescription
KeywordThe exact string to search for (case-insensitive by default)
Match TypeContains — string must be present; Does Not Contain — string must be absent
Case SensitiveExact case match (default: off)

You can add multiple keyword rules per monitor. All rules must pass for the check to succeed.

Example Configuration

Goal: Confirm the API returns a healthy JSON response.

URL: https://api.yourapp.com/health
Method: GET
Expected Status: 200
Keyword Rule 1: "status" → Contains
Keyword Rule 2: "error" → Does Not Contain

Result: The check fails if the response body does not contain "status" OR if it contains "error".

API — Create Keyword Monitor

POST /v1/monitors
Authorization: Bearer psk_live_xxx
Content-Type: application/json

{
"name": "API Health Content Check",
"type": "keyword",
"url": "https://api.yourapp.com/health",
"method": "GET",
"interval": 60,
"timeout": 10,
"expectedStatusCode": 200,
"keywords": [
{ "value": "\"status\":\"ok\"", "type": "contains", "caseSensitive": false },
{ "value": "error", "type": "not_contains", "caseSensitive": false }
],
"alertPolicyId": "pol_xxxxxxxx"
}

Limitations

  • Keyword search operates on the raw response body — HTML, JSON, or plain text
  • Maximum response body scanned: 1 MB (content beyond this is truncated)
  • Regular expressions are not supported — use exact strings
  • Binary responses are not supported

Troubleshooting

SymptomCauseResolution
Monitor DOWN but URL returns 200Keyword not found in responseCheck actual response body content
Intermittent failuresDynamic content changesUse a stable marker string
Encoding issuesResponse uses non-UTF-8 encodingPingSLA normalizes to UTF-8 automatically