Re: certificate monitoring
"David Fletcher" <[email protected]> Tue, 26 May 2026 09:19:29 +0100
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <LOBE6gWW.1779783569.7847290.dif@localhost> |
>From: Marco Moock <[email protected]> >To: [email protected] >Subject: certificate monitoring > >Hello! > >I would like to monitor certificate validity with monit. I prefer=20 >monitoring the cert file itself, not the service (as this is SMTP with=20 >STARTTLS). > >Does monit support that or do I need to build a script? > >--=20 >kind regards >Marco Hi Marco, Are you having the certificates issued externally by Let's Encrypt or similar? If so you could probably adapt the Dehydrated script, although you'd need a web server location available for the proof of ownership of the domain (the script will place a known file there as proof you control the domain). I posted something about this a few weeks ago: https://lists.nongnu.org/archive/html/monit-general/2026-04/msg00000.html The main script is here: https://github.com/dehydrated-io/dehydrated The Dehydrated script deals with the certificate validity check and update using a cron entry. Then monit spots the certificate file change and restart the service. Maybe something like this would do what you need? Best regards, David