Skip to content
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

Server name in notifications #1170

Closed
modem7 opened this issue Dec 19, 2021 · 5 comments · Fixed by #1125
Closed

Server name in notifications #1170

modem7 opened this issue Dec 19, 2021 · 5 comments · Fixed by #1125

Comments

@modem7
Copy link
Contributor

modem7 commented Dec 19, 2021

It would be useful to have the server name in the notifications so that it's easier to see which server had an image updated on when running multiple instances on multiple hosts.

E.g.

Server: Proxmox-Docker-Wiki
Found new linuxserver/mariadb:alpine image (080f2fd097da)
Found new linuxserver/mariadb:alpine image (080f2fd097da)
Stopping /GuacDB (d17675fea2fb) with SIGTERM
Stopping /Bookstack-db (19ec461cb1c3) with SIGTERM
Creating /Bookstack-db
Creating /GuacDB
Removing image 9dc8319bb697
@github-actions
Copy link

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! 🙏

@piksel
Copy link
Member

piksel commented Dec 20, 2021

This is actually (almost) implemented in #1125 by using the following template:

Server: {{ .Title }}
{{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}}

It would look like this:

Server: Watchtower updates on Proxmox-Docker-Wiki
Found new linuxserver/mariadb:alpine image (080f2fd097da)
Found new linuxserver/mariadb:alpine image (080f2fd097da)
Stopping /GuacDB (d17675fea2fb) with SIGTERM
Stopping /Bookstack-db (19ec461cb1c3) with SIGTERM
Creating /Bookstack-db
Creating /GuacDB
Removing image 9dc8319bb697

But perhaps #1125 should be extended to include just .Hostname as an additional field.

@modem7
Copy link
Contributor Author

modem7 commented Dec 20, 2021

Oooh! Custom message field is also real useful!

Having the additional field(s) would definitely be awesome, would be great for ansible deployments as well!

@piksel
Copy link
Member

piksel commented Dec 20, 2021

Updated the PR to include it. So

Server: {{ .Host }}
{{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}}

should now give you the expected output (if that is merged ofc).

@modem7
Copy link
Contributor Author

modem7 commented Dec 20, 2021

Updated the PR to include it. So

Server: {{ .Host }}
{{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}}

should now give you the expected output (if that is merged ofc).

Perfect! Thank you!

@simskij simskij closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants