Skip to content
Upstat

SSL certificate and expiry monitoring

You set the threshold in days. While the certificate has at least that many days left, everything is fine. As soon as fewer remain, the monitor fails and you have time to renew the certificate before visitors see it as an error.

Create an account and watch your certificates

SSL monitor: how many days are left before the certificate expires.

Upstat connects to the host you set, by default on port 443, and reads the certificate expiry date. It compares the remaining days with the min_days_remaining setting. While there are more days, the monitor is fine. When there are fewer, the monitor reports a problem so you can renew the certificate in time.

What the threshold looks like in practice

With a threshold of 14 days, a certificate with 30 days left is fine. The first check that counts 13 days fails, and in the check detail you see this message.

SSL monitor configuration through the REST API

{
  "name": "example.com certificate",
  "type": "ssl",
  "interval_seconds": 3600,
  "config": {
    "host": "example.com",
    "port": 443,
    "min_days_remaining": 14
  }
}

Check message when 13 days remain

Certificate expires in 13 days (minimum: 14)

What is checked

  1. The checker connects to the host and port over TCP and performs a TLS handshake.
  2. From the server certificate it reads the expiry date and computes the number of whole days left.
  3. It compares that with your threshold. If fewer days remain, the check fails.
  4. During the handshake the certificate is verified against common trusted root certificates, so an invalid, untrusted or expired certificate fails too.

Monitor settings

The checker really reads all of this from the monitor configuration.

Host host

The server name, for example example.com. No http:// and no path.

Where to set it: Dashboard and REST API

Port port

Defaults to 443. Change it for other services with TLS, for example a mail server with implicit TLS.

Where to set it: Dashboard and REST API

Minimum days min_days_remaining

The threshold in days, 14 by default. The check fails if fewer whole days than this value remain until expiry.

Where to set it: Dashboard and REST API

Name for SNI sni

The server name sent in the TLS handshake. The host is used when it is not set. Useful when one address serves several domains.

Where to set it: Dashboard and REST API

What counts as a failure

  • Fewer days remain until expiry than the threshold.
  • The TLS handshake fails: the certificate is expired, untrusted or does not match the server name.
  • The host and port cannot be reached or the connection times out.

What happens on failure

  • The monitor changes from UP to DOWN. If you use ignore blips, the failure first has to last for the time or the number of checks you set.
  • An incident named after the monitor is created automatically. When a check passes again, the incident closes itself.
  • Your alert rules send a message through the channels you set up: Slack, Discord, Telegram, email, SMS, push, webhook or ntfy.
  • If the monitor is linked to a status page component, its state shows up there too.

Limits by plan

The shortest allowed interval between checks depends on the plan. The numbers are read straight from the plan settings.

Plan Shortest check interval
Hobby 120 s
Starter 60 s
Pro 30 s

How it works with ignore blips

A short outage does not have to mean DOWN right away. For each monitor you can set state stabilization. Upstat decides it when it processes check results, not the checker.

consecutive_failures
How many checks in a row must fail before the monitor is marked DOWN. For example 3 means three failures in a row.
min_down_seconds
How long the failing has to last before the state changes to DOWN.
min_up_seconds
How long everything has to be fine after an outage before the monitor goes back to UP. It protects against rapid flapping.

Certificate expiry does not change within minutes, so ignoring blips here mainly covers transient network errors. A few failures in a row separate an unreachable server from a certificate that really expired.

How monitoring works

Questions about this type

What check interval makes sense for a certificate?
The number of days changes slowly, so a less frequent check is enough. The interval cannot be shorter than your plan minimum, shown in the table below.
Is the whole certificate chain watched?
Days until expiry are counted from the server certificate itself, not from intermediate certificates.