Configure your Oh Dear settings per website

Per website, you can configure custom settings that apply specifically to that site.

Verify text on response #

An additional feature of our uptime check, is that it can also look at the source code of the page and match for a particular string.

By default, we just check for an HTTP/200 code, but you can extend that to match for a pre-defined string. This can be a validation string you place in HTML comments on your site, that you can use as a status indicator.

You can also use this to check for particular HTML meta tags, titles, JSON or XML patterns, ... by including the entire tag in the verification field. For instance:

  • Meta tag example: <title>This should always match</title>
  • JSON example: "active": true
  • XML example: <price>$8.95</price>

As long as the HTTP response body has that string present on the page, we'll consider the page as up.

Minutes downtime before notification #

Our default is to alert you of downtime when a site has been down for 2 minutes. You'll find a detailed explanation in our uptime monitoring documentation.

You can tweak this behaviour to make it alert you sooner or later, by changing the minutes downtime before notification setting.

If you increase this to 10, the site needs to be down for 10 minutes before we alert you. If you lower it to 1, we'll notify you after 1 minute of downtime.

You can use this setting to tweak particularly important sites, or to lower the false-positive alert rate on sites that have a bad reputation.

Our crawler checks all pages on your site and will report broken links (timeouts, 404's, 503's, ...). Some pages on your site might be in a known-bad state, and you don't want to report on them.

In the site settings screen, you can whitelist certain URLs that we'll never notify you about.

Custom HTTP headers #

For both our uptime checks or our mixed content & broken links crawling, you can add additional headers to be included on every request. This allows you to include things like HTTP Basic Authentication, add cookies, include a default Accept-Encoding, ...

In your Site settings page, you can add custom headers as key/value pairs. For instance:

Header Value
Authorization Basic zL9SQ7ivcAWwmH8yyuaGZo0Fkr==
Cookie session_id=abc; language=en; accept_js=1
Accept application/json
Content-Type application/json
DNT 1
Accept-Language nl-NL,nl

You can also add shared secrets to validate requests coming from Oh Dear on your backend.

Cookie data should all be contained in a single Cookie header, separated by a ; (semi-colon).

There are a few headers you can't overwrite. These are:

  • accept-encoding
  • connection
  • user-agent
  • referer
  • host
  • pragma

We set these to our default values.

Custom HTTP payloads #

Most monitoring is done via the GET method, to retrieve a page and see if it loads. We can also monitor websites via the POST, PUT or PATCH method and we allow you to set custom HTTP payloads to be sent with your request.

Normal HTTP form requests #

To simulate a POST call to a webform, and check for the result, you can change your site on Oh Dear to the following settings.

Site settings with a custom HTTP pageload

To monitor an HTTP form submission, you should:

  • Set the method to POST
  • Add any form field that should be included in the request

This results in an HTTP call like this:

$ curl --request POST https://yoursite.tld/form  \
    -d "name=your first name&order_id=654"

In other words: a standard HTTP form submission.

JSON-encoded pageloads #

To encode the payload in your POST request as JSON, you can add the Content-Type: application/json HTTP header to the site settings like this.

Site settings with a custom HTTP header

This will transform the HTTP pageload from plain HTTP form content to JSON encoded content:

$  curl --request POST https://yoursite.tld/api/v1/ping  \
    -H "Content-Type: application/json"  \
    -d '{"name":"your first name","order_id":"654"}'

The data is still the same, just encoded differently.

Was this page helpful to you? Feel free to reach out via support@ohdear.app or on Twitter via @OhDearApp if you have any other questions. We'd love to help!