Interview Prep/Monitoring & Observability/Alerting and On-Call Design

How do you prevent a surprise TLS certificate expiry?

BeginnerScenarioAlerting and On-Call Design
Answer

Situation read → Expired certificates are a classic self-inflicted outage. They are entirely predictable.

What I'd do →

  1. Probe endpoints with blackbox_exporter, which exposes probe_ssl_earliest_cert_expiry.
  2. If you use cert-manager, scrape certmanager_certificate_expiration_timestamp_seconds.
  3. Alert in tiers:
- alert: CertExpiresIn21d
  expr: (probe_ssl_earliest_cert_expiry - time()) < 21 * 86400
  labels: {severity: ticket}
- alert: CertExpiresIn5d
  expr: (probe_ssl_earliest_cert_expiry - time()) < 5 * 86400
  labels: {severity: page}
  1. Alert on renewal failure (cert-manager Ready=False) because that is the earlier signal.

Why → Early warnings leave time for a human to fix a broken renewal.

Interview tip → Alert on the renewal pipeline failing, not only on the date.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Alerting and On-Call Design