Skip to main content
A keyword monitor makes the same HTTP request as an HTTP monitor and then checks the response body for text. Use it to confirm a page shows the right content, to catch error messages that are served with a 200 status, or to detect defacement.

When to use it

  • Confirm “Welcome” or “Sign in” appears on your homepage
  • Check that an API response contains "status":"ok"
  • Alert when an error message such as Database connection failed appears
  • Detect unwanted text such as hacked by or Out of stock

Create a keyword monitor

1

Set the basics

Name, URL, interval and timeout work exactly as for HTTP monitors. See HTTP settings.
2

Add keywords

Add one or more keywords. Mark each as must contain or must not contain (should_contain: true / false).
3

Choose matching rules

Pick match_mode and case_sensitive (below).

Keyword settings

These go in keyword_config:
Older clients can send a single keyword plus should_contain instead of the keywords list. keywords takes precedence when both are present. regex_pattern is accepted for compatibility but is treated as a plain text keyword, not a regular expression. At least one of keywords, keyword or regex_pattern is required.

Request settings

Request settings for the check (headers, body, expected status codes, redirects, slow-response threshold) are read from http_config, exactly as on HTTP monitors. See HTTP monitoring for the field list, including the default that only status 200 passes unless you set expected_status_codes.

Example

How matching works

  1. The HTTP request is checked first (status code, timeout, TLS).
  2. The keywords are checked against the response body.
Matching is plain substring matching. There is no regular-expression support: create separate keywords for each phrase.
Only the response body is searched. The search_area field is accepted for compatibility but headers are not searched.

Case sensitivity

Examples

Alerts when a product page says it is out of stock.
Alerts when the API stops returning the success indicator.
Passes when either phrase is on the page.

SSL, domain expiry and slow responses

Keyword monitors support the same ssl_monitoring, domain_monitoring and slow-response options as HTTP monitors:

Best practices

  • Choose text that is stable and specific. Database connection timeout beats Error.
  • Monitor a lightweight endpoint. The whole response body is downloaded and searched.
  • Test your keywords against the real page source before relying on them.
  • Remember that UptimeIO sees the HTML your server returns, not content rendered later by JavaScript.

Troubleshooting

Check spelling and case_sensitive. View the page source (not the rendered page): content added by JavaScript is not in the response. If the content depends on cookies or the user agent, the monitor may receive a different page.
The phrase may also appear in navigation, scripts or comments. Use a more specific phrase.
keywords needs 1 to 20 entries, each with non-empty text (max 500 characters) and a boolean should_contain. method cannot be HEAD.
Only 200 passes unless you list other codes in http_config.expected_status_codes.

Next steps

HTTP Monitoring

All request options

Notifications

Configure alerts for keyword monitors