ACME client - send email after renewal?

Started by skywalker007, February 06, 2025, 04:40:49 PM

Previous topic - Next topic
Anyone got a hint for me?
I use the ACME client to manage a number of certificates.
I would like to have an automation that sends me an email when a particular certificate has been renewed.
Any idea how to do that?
I thought about using monit in any way for that but have no clue how.
Thanks for any hint.
-Till
System1: Qotom Q310G4 (died recently)
System1: Supermicro A2SDi-4C-HLN4F,  64GB RAM, ZFS mirrored boot drive
System2: APU2C4


Without trying to be mean, really this is a good opportunity to learn how monit does its thing.
I had the same need, how do I do "something" with monit. I spent a few days with the manual https://mmonit.com/monit/documentation/monit.html and seeing how they would translate to the UI. I was able to acomplish my goal.
May I suggest to try the "File Content Test" as your "Service Test"?

Quote from: skywalker007 on February 06, 2025, 04:40:49 PMI would like to have an automation that sends me an email when a particular certificate has been renewed.
Any idea how to do that?
There's the acme plugin's automation commands.
These sadly do not allow for running a local custom script (a security decision AIUI). But you can trigger a remote script (via ssh) following a certificate renewal. I currently do this to reload services on remote hosts, but you could also fire off an email from the remote host.

I approach this issue the other way round. I monitor all my applications with Uptime Kuma and I get a notification whenever a certificate is short of expiring.

Kind regards,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Today at 11:54:01 AM #5 Last Edit: Today at 11:57:07 AM by keeka
I do something similar with icinga. The OP wants a notification when the cert has renewed.
I noticed in the acme automation options that there was not an option to run an adhoc local script.
But it just dawned on me, you could use 'remote command via ssh' to localhost to achieve the same.