WIP: Replace the certbot systemd unit with a cron job with notifications #68
Closed
greg
wants to merge 2 commits from
bugfix/3-certbot_email_notifications into master
pull from: bugfix/3-certbot_email_notifications
merge into: :master
:master
:monitoring/filesystem_out_of_space
:chore/upgrade_gitea_to_1.27.1
:bugfix/substr_url_matching
:notes/ejabberd_ldap_photo
:feature/akaunting
:chore/ejabberd_service_avatar
:feature/237-gitea_gpg
No Reviewers
Labels
Clear labels
monitoring
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
security
ui/ux
wontfix
service
discourse
Kosmos Community Forums
Infrastructure metrics, alerts, notifications, etc.
service
accounts
Kosmos Accounts
service
drone-ci
Kosmos Drone CI
service
email
mail.kosmos.org
service
garage
S3-compatible object storage
service
gitea
Kosmos Gitea
service
ipfs
Kosmos IPFS
service
lightning
Lightning address, lndhub, etc.
service
mastodon
kosmos.social
service
nostr
Relays, Blossom server, etc.
service
postgres
Database cluster
service
remotestorage
Portable data storage for the Web
service
wiki
Kosmos Wiki
service
xmpp
Kosmos Chat
Something is not working
Graphic/visual design
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Dive in, and start contributing
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Currently not actionable
Manual IT ops activities
Looking for an answer
release
major
release
minor
release
patch
All your base are belong to us
User interface, process design, etc.
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/chef#68
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Uses cronic (https://habilis.net/cronic/) to filter out the stdout and send a sensible email to ops@kosmos.org when renewal fails
Closes #3
This has been tested on andromeda
I checked, no other change is needed for cron jobs so far, the backup gem is already successfully sending emails when warnings or errors occur (independently of using cron).
Doing the same thing with systemd timers would be very complex for no reason: https://wiki.archlinux.org/index.php/Systemd/Timers#MAILTO
Damnit, certbot is using stderr to output warnings, so we got an email when it ran at midnight:
Adding the
-qswitch should fix it:What's complex about that? Looks very straight-forward to me, and can be done once for all our machines via a cookbook.
You're right, I misunderstood, that would work with the cerbot systemd timer as it is (
systemctl status --full certbotwill contain the previous error). I'm going to close this and reopen another pull request that does it with aOnFailuresection on the certbot service insteadPull request closed