-
Notifications
You must be signed in to change notification settings - Fork 854
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
Missing container name in status notification #1789
Comments
Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏 |
Are you sure those e-mails are from watchtower? I don't think it's possible to send notifications without logging, as the notifications are built on top of the logging system. |
Pretty sure, yeah. The subject line says „ [my subject tag] Watchtower updates on ****“ and they get send at the same time the updates should run. They also stopped when I stopped the watchtower docker container. |
Yeah, now I see where they come from, it's from failing to run the lifecycle hooks. Those messages should absolutely be in your logs though, where they contain the additional metadata (including container name). Also, from your log above: Are you running multiple watchtower instances perhaps? Use |
Just for completeness sakes, here is my complete version: '3'
x-logging:
&default-logging
driver: gelf
options:
gelf-address: "tcp://****:****"
services:
watchtower:
image: containrrr/watchtower:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
WATCHTOWER_NOTIFICATIONS: email
WATCHTOWER_NOTIFICATIONS_LEVEL: warn
WATCHTOWER_NOTIFICATION_EMAIL_FROM: ****
WATCHTOWER_NOTIFICATION_EMAIL_TO: ****
WATCHTOWER_NOTIFICATION_EMAIL_SERVER: ****
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER: ****
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD: "****"
WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG: "****"
WATCHTOWER_LIFECYCLE_HOOKS: "true"
WATCHTOWER_HTTP_API_METRICS: "true"
WATCHTOWER_HTTP_API_TOKEN: "****"
WATCHTOWER_SCHEDULE: "0 0 * * * *"
WATCHTOWER_CLEANUP: "true"
WATCHTOWER_TIMEOUT: "30s"
VIRTUAL_HOST: ****
VIRTUAL_PORT: 8080
LETSENCRYPT_HOST: ****
LETSENCRYPT_EMAIL: ****
logging: *default-logging
healthcheck:
image: curlimages/curl:8.2.1
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.lifecycle.pre-check=curl -m 10 --retry 5 https://****/start"
- "com.centurylinklabs.watchtower.lifecycle.post-check=curl -m 10 --retry 5 https://****"
entrypoint: tail -f /dev/null
logging: *default-logging
networks:
default:
external: true
name: webproxy Now that I have stopped this instance, no other watchtowers are running:
With the configuration from above, my docker log looks like this:
If I did configure it wrongly, so the container names are stripped somewhere, please let me know! But thanks for the tip with the templates, I will try it out. |
Describe the bug
Watchtower cannot update two of my containers, which is absolutely not watchtowers fault. This issue is not about the error itself but the formatting of the log and the lack of additional information (e.g. the container names).
The complete email (with notification level set to "debug") says:
The complete config:
The watcher docker log repeats every hour:
Steps to reproduce
/
Expected behavior
Add the names to the notifications, e.g.:
Screenshots
No response
Environment
Your logs
Additional context
The debug log does not contain the error message from the email.
The text was updated successfully, but these errors were encountered: