feat: add db uptime notification support#102
Conversation
Pairs well with something like Uptime Kuma's push notifications to ensure this service doesn't fail without us knowing about it.
|
I feel like this sort of functionality happens better at the cron scheduler level. So for instance: Vs happening here. Thoughts? |
|
Ah, yeah, I actually like that better! The scheduler utils right now don't allow for additional options though, right? May not make sense for this to be a first-class feature, but it's unclear exactly where to put the manual cron entry to mimic with the postgres plugin does. What's the best way to do that? |
|
There's some logic around how we expose cron entries for the ATM the {
"log-path": "/var/log/dokku/command-output.log"
"post-success-url": "http://example.com/ping"
}I'd prefer to not expose any arbitrary command as that could lead to arbitrary code execution. With this change, the output of * 0 * * * command && curl -fsS -m 10 --retry 5 -o /dev/null "http://example.com/ping"The logic for parsing is around here, and we'd want to update the cron.CronTask struct to hold the We could also in theory add support for those keys to regular cron tasks, but I think starting with adding system ones would be good, and then we can add support for configuring those keys to the various datastore plugins. |
Pairs well with something like Uptime Kuma's push notifications
to ensure this service doesn't fail without us knowing about it.