Skip to content

Monitor a website and its certificate

This guide sets up the monitors most websites need: up and fast, showing the real page, and a certificate that isn’t about to expire. It takes about 10 minutes.

You need: a runner group that can reach the site. For a public site, a hosted runner is enough; otherwise install a runner.

  1. Monitors → New monitor → Templates → Website is up.
  2. Change the URL to your site.
  3. Choose the Runner group.
  4. Create monitor, then Run now.

It runs every 2 minutes and fails when the page doesn’t answer 200 within 5 seconds. It records the response time as the run’s value, and the TLS certificate.

The definition behind it:

{ "type": "http",
"request": { "method": "GET", "url": "https://www.example.com/", "certificate": true },
"assert": { "status": [200], "maxDurationMs": 5000 },
"value": "durationMs" }

A maintenance page or a broken deploy can still answer 200. The Page shows the right content template also checks that the body contains a phrase only the real page has, such as your product name in the footer. Change the URL and the phrase (Body must contain).

For a JSON API, the assertion can look inside the answer:

status == 200 && json.status == "ok" && json.items|length > 0
  1. New monitor → Templates → TLS certificate expiry.
  2. Change the URL. It runs once a day at 06:00.

It fails when the certificate is untrusted or has 14 days or fewer left:

{ "type": "http",
"request": { "method": "HEAD", "url": "https://www.example.com/", "certificate": true },
"assert": { "status": [200, 301, 302],
"expression": "certificate == null || (certificate.valid && certificate.daysLeft > 14)" } }

With certificate: true, every run records the issuer, the expiry date and daysLeft. A daily check is enough; your frequent check then doesn’t need to repeat the TLS handshake.

A single slow answer is noise. Add a rule on the Website is up monitor:

  • Fire when: A value crosses a limit
  • Value: durationMs, Taking the avg, Looking at the last 10 minutes
  • Is > 800, Min runs 3, Resolve only past 500
  • Severity medium

The rule form previews what it would have said about the past runs.

Create a status page with an Uptime item for the site and a TLS certificate item for the certificate monitor. See Share a status page.

The Websites & APIs templates also cover APIs, redirects and more. Pick one in Templates, or see the list in Check types.