-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Post to webhook on failed health check #4039
Comments
Not a bad idea, but I'm not sure that specific config example would be what we'd want to go for - I think it would be better to find a solution that's more generalizable instead of only supporting webhooks. I think this might fit into the realm of "event handling", where the Anyways, not quite the same, but you can use the |
That sounds like it would cover my use case well enough actually, thanks for the tip. As for event handling, I agree that would be a much better and more powerful means of accomplishing this idea and a number of others. The only reason I'd suggested something webhook specific was to try and keep the scope small with as much utility as possible. I'd much rather see an event handling system in the long run. |
I also prefer the event handler module. That way any app can emit events and have it handled flexibily in a separate module dedicated to that. |
Implemented in #4984 |
This might be outside the scope of Caddy, but it would be fantastically useful if Caddy health checks could be configured to post to an arbitrary URL on failure (or maybe even success too).
Something like this in the JSON config for /apps/http/servers/routes/handle/reverse_proxy:
Ideally it would post some json to that webhook URL that would let the receiver identify the route, the datetime it failed, etc.
I think this could be really valuable for a lot of use cases (basically free uptime monitoring) and it feels like it would fit in well with a lot of other features that really make Caddy stand out in terms of practical convenience.
The text was updated successfully, but these errors were encountered: