Artikel ini hanya tersedia dalam bahasa Inggris.

Jenis monitor

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.

Terakhir diperbarui: 2 menit baca

API type
keyword
You enter
URL
Runs at most every
Plan minimum
Needs
None

How it works

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 cart does not match ADD 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 as chips.

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.

Settings

FieldAPI optionDefaultNotes
URLurlRequiredhttp:// or https:// address; https:// is added when you leave out the scheme
MethodmethodGETOne of: GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS
Expected status codesexpectedStatusNoneUp to 60 characters
Timeout (seconds)timeout152 to 60
Warn if slower than (ms)maxMsNone0 to 60,000
Follow redirectsfollowRedirectsOn
KeywordkeywordNoneUp to 200 characters
Alert when the keyword iskeywordModemissingOne of: missing (present), found (absent)
Check intervalintervalYour plan's minimumFrom your plan's minimum up to 24 hours

Examples

GoalKeywordAlert when the keyword is
The checkout page still renders its buttonAdd to cartmissing
The application shows its database error pageError establishing a database connectionfound
A maintenance page was left switched onWe'll be back soonfound
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.

Common errors

MessageWhat it meansWhat to do
Keyword "Add to cart" not foundThe 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" foundYour "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.

Masih butuh bantuan?

Kirim pesan kepada kami dan staf kami akan menjawab, biasanya dalam satu hari kerja.