|
|
|
|
|
by Macha
1597 days ago
|
|
I have a super hacky job for this personally on my personal infrastructure after acme.sh failed to renew too many times, which runs a bash script in a cron job to use openssl s_client, greps for the nonAfter field, passes it through python to parse the date into remaining days, then sends a message to my gotify setup. I'll probably rewrite it as a single rust binary one of these days. |
|
The core of script is this snippet of bash, where $target is of the format host:port.
The script is executed as a Telegraf exec input so that the data can be fed into my general monitoring setup (InfluxDB and Grafana). I have a Grafana alert for each host.