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 →
- Probe endpoints with blackbox_exporter, which exposes
probe_ssl_earliest_cert_expiry. - If you use cert-manager, scrape
certmanager_certificate_expiration_timestamp_seconds. - 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}
- 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.
More on Alerting and On-Call Design
Your on-call engineers receive 300 alerts a night and have started ignoring the pager. How do you fix it?IntermediateYou are asked to design alerting for a brand-new HTTP service from scratch. What do you alert on?BeginnerA "CPU above 90%" alert wakes someone at 3 a.m., but users saw no impact. What do you change?BeginnerA new hire asks: "Should we page on symptoms or causes?" How do you answer with an example?BeginnerDesign burn-rate alerts for a 99.9% availability SLO over 30 days.AdvancedPayments and platform teams share one Prometheus and one Alertmanager. How do you route alerts to the right team and severity?Intermediate