SSL Certificate Expiration
Alert levels
Certificate expiration is intentionally staged:
- 30 days:
warning— begin renewal planning. - 7 days:
warning— renewal should be actively scheduled or completed. - 2 days:
critical— immediate action is required.
Identify the affected service
curl -sS --get http://localhost:9090/api/v1/query --data-urlencode 'query=probe_ssl_earliest_cert_expiry{job="blackbox-web-services"}' |
jq '
.data.result[] |
{
instance: .metric.instance,
expires_at: (.value[1] | tonumber | strftime("%Y-%m-%dT%H:%M:%SZ")),
expires_in_days: ((.value[1] | tonumber) - now) / 86400
}
'
Inspect active web-service alerts:
curl -sS http://localhost:9090/api/v1/alerts |
jq '
.data.alerts[]
| select(.labels.job == "blackbox-web-services")
'
Verify the endpoint
docker exec observability-platform-prometheus-1 wget -qO- 'http://blackbox-exporter:9115/probe?target=https%3A%2F%2Fexample.example&module=https_2xx' |
grep -E 'probe_success|probe_http_status_code|probe_ssl_earliest_cert_expiry'
Confirm that the externally served certificate is the certificate being renewed.
Renew the certificate
Use the service's established certificate-management procedure.
This runbook does not prescribe a particular CA, ACME client, reverse proxy, ingress controller, or certificate deployment mechanism.
Verify recovery
After renewal, wait for the next Blackbox probe and query:
curl -sS --get http://localhost:9090/api/v1/query --data-urlencode 'query=probe_ssl_earliest_cert_expiry{job="blackbox-web-services"}' |
jq .
Then inspect the alerts:
curl -sS http://localhost:9090/api/v1/rules |
jq '
.data.groups[]
| select(.name == "web-services")
| .rules[]
| select(.name | startswith("WebServiceSSLCertificateExpiring"))
| {name, state, health}
'
The corresponding alert should eventually become inactive.
Escalation
If renewal cannot be completed:
- Treat the 2-day alert as an immediate production incident.
- Identify the service owner.
- Confirm whether a fallback endpoint or alternate service path exists.
- Escalate before certificate expiration.
Do not silence an expiration alert without an explicit operational reason and an owner for the renewal work.