ITRS named a Visionary in the 2024 Gartner® Magic Quadrant™ for Digital Experience Monitoring

  1. Support
  2. Knowledge base
  3. Synthetic Monitoring
  4. Monitor settings
  5. Error conditions
  6. Error conditions - Page content

Error conditions - Page content

Monitoring your websites and web applications for uptime and performance can be tough, because there are times when a page only loads partially, but you might not realize it. That is, unless you initiate a content match rule.

Note: This article describes content matching for the monitor types Full Page Check, HTTP(S), and Webservice HTTP(S).

Content checks for transaction monitors are possible (and recommended) as well. See the article Content check.

Also, Multi-step API monitors can do some checking of the content. This is achieved through assertions that check response content within a step.

What is a content match?

A content match is a way of confirming that a page is up or down by matching a piece of loaded content to a reference point configured within your monitor settings.

  • If a monitor checking the page finds the content, no error is reported.
  • If a monitor checking the page cannot find the content, an error is reported.

What types of content matching are possible?

Regular content match

This type works for HTTP(S), Webservices HTTP(S), and Full Page Check monitors.

A content match can be set up using regular expressions. A regular expression (regex or regexp for short) is a special text string for describing a search pattern.

  • Checking for just a single word: welcome
  • Regex for multiple words/phrases (must be in this particular order): product.*order (i.e. product AND order must appear)
  • Invert the entire clause by starting with exclamation mark, to test if the word is not present:
    !error (i.e. the word error must not appear)
    !error|sorry (i.e. NOT (error OR sorry))

Advanced content match

This works for HTTP(S) and Webservices HTTP(S) monitors.

Advanced content match values are stored as JSON data.

[
  {
    "Pattern": "PhraseA",
    "IsPositive": true
  },
  { 
    "Pattern": "PhraseB", 
    "IsPositive": false 
  }
]

Example: Checking dates

[
{
  "Pattern": "some content before the timestamp value (?<hour>\\d\\d):(?<minute>\\d\\d)",
  "IsPositive": true,
  "DateTime": { 
    "OffsetUTC": 60, 
    "MaxDifference": 5 
  } 
} 
]

For datetime checking, there should be named groups in the regex, indicated by <year>, <month>, <day>, <hour>, <minute>, <second>.

Any of these values that can be extracted from the content, will be merged with the current server time, and then evaluated in terms of UTC.

OffsetUTC is the number of minutes that should be subtracted in order to compare it to server time in UTC.

Example: if the webpage contains a timestamp in UTC+1, the offset should be 60. If the webpage contains a timestamp in EST (UTC-5), the offset should be -300.

MaxDifference is the maximum difference in minutes that is allowed. This means that an error will occur if this maximum is exceeded. Example: if it’s now 10:06, and the content contains 10:00, an error will occur if MaxDifference is 5 or less.

Where to configure a content match

To configure a content match you have to add an error condition of type Check page content:

  1. Go to the Monitoring > Monitor setup.
  2. Select the monitor you’d like to add a content match to.
  3. Navigate to the Error conditions tab.
  4. In the category Check page content enter your content match information.
  5. Click the Save button.
By using the Uptrends website, you consent to the use of cookies in accordance with our Cookie Policy.