Monitortypen
Keyword monitors
Alert when a page stops showing a text, or starts showing one: how keyword matching works, which part of the page is searched and practical examples.
- API type
keyword- You enter
- URL
- Runs at most every
- Plan minimum
- Needs
- None
A keyword monitor makes the same request as a website monitor (same status-code, redirect and timeout rules) and then searches the response body for your keyword.
- The match is an exact, case-sensitive search for the keyword anywhere in the body:
Add to cartdoes not matchADD TO CART. - The body is the raw response the server sends, usually HTML source. JavaScript is not executed, so text that a script inserts into the page after loading is not seen. Search for text that is in the page source (use your browser's "View source", not the element inspector).
- Only the first 512 KB of the body are searched.
- Characters must match the source exactly. If the page source contains
Fish & chips, search for that or for a shorter part such aschips.
The setting Alert when the keyword is decides the direction: missing (default) makes the monitor go down when the keyword is not found; found makes it go down when the keyword appears.
| Field | API option | Default | Notes |
|---|---|---|---|
| URL | url | Required | http:// or https:// address; https:// is added when you leave out the scheme |
| Method | method | GET | One of: GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS |
| Expected status codes | expectedStatus | None | Up to 60 characters |
| Timeout (seconds) | timeout | 15 | 2 to 60 |
| Warn if slower than (ms) | maxMs | None | 0 to 60,000 |
| Follow redirects | followRedirects | On | |
| Keyword | keyword | None | Up to 200 characters |
| Alert when the keyword is | keywordMode | missing | One of: missing (present), found (absent) |
| Check interval | interval | Your plan's minimum | From your plan's minimum up to 24 hours |
| Goal | Keyword | Alert when the keyword is |
|---|---|---|
| The checkout page still renders its button | Add to cart | missing |
| The application shows its database error page | Error establishing a database connection | found |
| A maintenance page was left switched on | We'll be back soon | found |
| The page was sent completely, not cut off by a crash halfway (pages under 512 KB) | </html> | missing |
Choose a keyword that only appears on the healthy page and that does not change: avoid prices, dates and counters. For an error message, use the exact text of your error template.
| Message | What it means | What to do |
|---|---|---|
Keyword "Add to cart" not found | The page loaded with an accepted status code, but the keyword is not in the first 512 KB of the body. | Open the page source and search for the keyword. Check capitalisation, HTML entities and whether the text is added by JavaScript. |
Keyword "Error establishing a database connection" found | Your "found" keyword appeared in the page. | Fix the condition the text signals. |
Request errors (status codes, timeouts, certificates) are the same as for website monitors.