docker-autoheal icon indicating copy to clipboard operation
docker-autoheal copied to clipboard

Feature Request - Add custom text to webhook notifications

Open edrock200 opened this issue 2 years ago • 3 comments

Respectfully requesting the ability to append the webhook notifications with custom text. Reason being if you have autoheal on multiple hosts with similarly named containers, aside from the container id, its difficult to discern which host the notification is coming from. If we deploy it to add, for example, the hostname appended to the webhook, it will quickly identify the container and host in the webhook notification. Thanks in advance for your consideration.

edrock200 avatar Nov 09 '23 19:11 edrock200

If you are running with docker-compose, you can append the node name to the project name:

  • Node1:
name: my-project-node1
services:
  app:
    deploy:
      replicas: 2
    (...)
  • Node2:
name: my-project-node2
services:
  app:
    deploy:
      replicas: 2
    (...)

So your containers will be named:

my-project-node1-app-1 my-project-node1-app-2 my-project-node2-app-1 my-project-node2-app-2

christiantosta avatar Nov 16 '23 13:11 christiantosta

Understand that, but would be nice to have an env var for watchtower that it can pass onto the webhook, such as $HOSTNAME

edrock200 avatar Jan 09 '25 19:01 edrock200

Anyway to add custom text to the webhook via env var?

edrock200 avatar Sep 06 '25 18:09 edrock200