Why use the monitoring you already have
Most teams already run Prometheus or Zabbix. Both can check certificate expiry without new software, and an expiry alert is the cheapest protection against an outage. The limits come later in this post.
Prometheus and the blackbox exporter
The Prometheus blackbox exporter connects to an endpoint like a client would. With a TLS probe, it reports probe_ssl_earliest_cert_expiry: the expiry time, as a Unix timestamp, of the certificate in the served chain that expires first. That is usually the server certificate, but it can be an intermediate.
A basic alert fires when fewer than 14 days are left:
- Expression:
probe_ssl_earliest_cert_expiry - time() < 14 * 86400 - Add a second, critical rule at a few days, rather than one long
for:duration.
Also alert on probe_success == 0. If the probe cannot connect or the TLS handshake fails, there is no expiry value, and the expiry rule stays silent exactly when something is wrong. PromLabs explains these pitfalls in monitoring TLS endpoint certificate expiration with Prometheus.
For certificates that are files on disk or Kubernetes Secrets, community exporters read them directly, which also covers certificates that are not served on a port you probe.
Grafana
Grafana is the view, not the check. A table of probe_ssl_earliest_cert_expiry - time() per target, sorted with the soonest first, is the most useful panel. Send alerts from Prometheus Alertmanager or Grafana alerting, not both, so each warning arrives once.
Zabbix
Zabbix agent 2 can read a website’s certificate with its web.certificate.get item, and Zabbix ships templates built on it that check expiry and validity. Apply the template to a host for each site, set the host and port macros, and adjust the warning thresholds.
What expiry monitoring cannot tell you
- Only what you list. Monitoring checks the endpoints you configured. A certificate on a forgotten appliance or a new service is not checked until someone adds it, a problem we describe in why certificate tracking spreadsheets fail.
- Only when, not why. An alert says a certificate is expiring. It does not say who owns it, how it is renewed or where else it is deployed.
- No fix. Each alert still needs a person to renew and deploy. With 47-day certificates, covered in our 47-day certificates FAQ, that is many alerts a month.
- One view per name. A load balancer may serve a different certificate per hostname, so probe with the right SNI name for each.
When to go further
Keep the expiry alerts: they are a good safety net. When the number of alerts grows, the next step is to automate renewal and deployment so alerts become rare, as described in how to stop certificate expiry outages. clm.mt keeps an inventory, renews, deploys and then checks the served certificate, and can send its alerts to email, Slack, Teams or a webhook.