Find out before an expired certificate does.
certbot renews certificates on a timer you set up once and forget. When renewal fails, you hear about it from browsers warning your customers. Runbell alerts you the first day it fails.
Up
certbot-renew
- Schedule
0 */12 * * *every 12 hours- Grace period
- 1 day
- Alerts
- Email and Telegram
What goes wrong without anyone noticing
- The timer stayed behind
- The site moved to a new server, and the renewal job stayed on the old one.
- A DNS or firewall change
- The ACME challenge can’t reach the server, and every renewal attempt fails.
- The web server isn’t reloaded
- The certificate is renewed, but the server keeps the old one until it expires.
Set it up
-
Create a check
Use the schedule
0 */12 * * *and a grace period of 1 day, in the time zone the job runs in. -
Add the ping
Send certbot’s exit code after each renewal attempt. A failed attempt then alerts you the same day.
-
Choose who hears about it
Connect email, Slack, Telegram, SMS or any of the other channels to the project.
crontab -e
0 */12 * * * certbot renew --quiet --deploy-hook "systemctl reload nginx"; curl -fsS -m 10 --retry 5 -o /dev/null https://runbell.app/ping/your-check-id/$?
Tips
certbot renewexits with an error code when a renewal fails, so sending/$?reports it at once.- Keep the deploy hook, so the web server loads the new certificate.
- Use one check for each server that renews certificates.
Questions
Does certbot renew every time it runs?
No. It renews only within 30 days of expiry and otherwise exits without an error, so the ping still arrives.
We use another ACME client. Does that work?
Yes. acme.sh, win-acme and other clients can all send the ping after they run.
Other jobs to watch
- pg_dump, mysqldump Database backups Know the night a backup fails, not the day you need it.
- crontab Linux cron jobs An alert when a crontab job is late, missing or fails.
- PowerShell Windows Task Scheduler Know when a scheduled task didn’t run or failed.
- batch/v1 Kubernetes CronJobs Catch the CronJob that never started a pod.
- ETL, Airflow, reports ETL and reports Hear about the pipeline that didn’t finish before the morning meeting.