Commit Graph

5 Commits

Author SHA1 Message Date
Walusimbi Silver
4950a0e50b Check the served certificate, not just the file on disk
certbot renews the file but nginx serves the old certificate from memory
until reloaded, so a disk-only check reports healthy while browsers get an
expired certificate. Compare each lineage against what nginx serves over
SNI on the loopback listener.

The comparison is gated on the served certificate's SAN list covering the
domain: nginx finishes the handshake with a fallback vhost certificate
when SNI matches nothing, which would otherwise compare a lineage against
an unrelated certificate and warn falsely.
2026-09-03 14:34:32 +03:00
Walusimbi Silver
c16d6dcf75 Raise expiry threshold above certbot's renewal window
Certbot renews at 30 days remaining, so a healthy certificate never falls
below it and the old 14 day threshold could only fire after renewal had
been broken for 16 straight days, leaving 14 days to react. 25 days fires
about five days after the first failed renewal.
2026-09-03 14:32:02 +03:00
Walusimbi Silver
ebde01ddeb Send cert alerts to ntfy over loopback
The script posted alerts to https://ntfy.silverwal.com/certbot, which is
served by the same nginx whose certificates it monitors. A TLS failure on
this host would make curl -fsS fail verification and drop the alert
describing that failure, leaving only a line in a log nobody reads.
ntfy is already bound to 127.0.0.1:2586, so post there instead.
2026-09-03 14:31:51 +03:00
Walusimbi Silver
c0655293ac Use certbot ntfy topic for certificate alerts 2026-04-24 12:03:22 +03:00
Walusimbi Silver
785c13119b Add server ops certificate expiry check 2026-04-24 10:36:33 +03:00