docker-autoheal
docker-autoheal copied to clipboard
Is there a way to test notifications?
I have the notification webhook doing to a discord webhook, but it doesn't seem to be working. Is there. Way to test webhook notifications on demand? Thanks in advance.
Same here, using a discord webhook, nothing showing up in discord. Discord is working with other webhooks. Looking for a way to troubleshoot. thanks.
It doesnt work with discord as its written for slack and they are slightly different.. See the PRs for ones that do. I use the Apprise one to send to discord, email, etc.
I've tried this three different ways with no luck. I'm deploying using docker compose, for the WEBHOOK_URL I've tried it three different ways of using quotes:
environment:
- "AUTOHEAL_CONTAINER_LABEL=all" # monitor all containers w/a healthcheck
- "AUTOHEAL_INTERVAL=30" # check every 30 seconds
- "AUTOHEAL_START_PERIOD=180" # wait 3 mins before first healthcheck
- WEBHOOK_URL="https://discord.com/api/webhooks/XXXXXXXXXXX/XXXXXXXXXX"
And....
- "WEBHOOK_URL=https://discord.com/api/webhooks/XXXXXXXXXXX/XXXXXXXXXX"
Lastly (no quotes):
- WEBHOOK_URL=https://discord.com/api/webhooks/XXXXXXXXXXX/XXXXXXXXXX
It doesnt work with discord as its written for slack and they are slightly different.. See the PRs for ones that do. I use the Apprise one to send to discord, email, etc.
PRs? Where can I find those? I must have missed seeing some documentation. thanks.
https://github.com/willfarrell/docker-autoheal/pull/74 - Apprise notifications https://github.com/willfarrell/docker-autoheal/pull/79 - Make the webhook universal to allow it to work with discord.
You need to fork the repo, merge the PR (pull request), build the resulting docker image and optionally push it to dockerhub or somewhere. If you arent familiar with this then you'll need to wait.
#74 - Apprise notifications #79 - Make the webhook universal to allow it to work with discord.
You need to fork the repo, merge the PR (pull request), build the resulting docker image and push it to dockerhub or somewhere. If you arent familiar with this then you'll need to wait.
Thanks, I'm familiar, but not sure if it's worth it. For now I may just use docker logs autoheal
periodically to grab any "restarting" entries and eamil or IM them to me.
Thank you for your help and the information.
https://hub.docker.com/r/rxwatcher/autoheal is one with the Apprise notifications in it.
You add an additional environment variable:
APPRISE_URL: https://apprise.domain.com/notify/apprise?tag=my_tag
https://hub.docker.com/r/rxwatcher/autoheal is one with the Apprise notifications in it. You add an additional environment variable:
APPRISE_URL: https://apprise.domain.com/notify/apprise?tag=my_tag
Ah, thank you, I'll give that a try.
I run a apprise api server with a common config that is loaded with all of my possible communications needs. In it are several discord webhooks that are tagged.
My servers are red, blue, green, etc so I have different tags in the apprise config for red, blue, green, etc.
I then use that docker image with various tags so I have a tag with blue which will only send container restart notifications on the blue server to the blue discord channel, red to only the red discord channel, etc.
Apprise is infinitely customizable.
That's nice, I'll check out Apprise. I have some legacy system that could benefit with a migration to something like that. Really appreciate you pointing me that way.
BTW, I don't know if it's worth mentioning, but a change on line 75 of docker-entrypoint from:
"text":"$text"
to:
"username":"autoheal","content":"$text"
Allows it to work with Discord, in a very basic way.
Hello I think apprise is well configured. Is there a way to test autoheal notification ? Thanks