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

Portainer "Events" spammed from Watchtower healthcheck #1785

Closed
gabry45 opened this issue Oct 3, 2023 · 3 comments
Closed

Portainer "Events" spammed from Watchtower healthcheck #1785

gabry45 opened this issue Oct 3, 2023 · 3 comments

Comments

@gabry45
Copy link

gabry45 commented Oct 3, 2023

Describe the bug

I see a lot of activity in the "Events" tab of Portainer, seemingly generated by Watchtower healthcheck alone (see screenshot below). It is generating these logs every 30s.
Is this expected behavior?

Steps to reproduce

I just ran a container from Docker CLI without any options added, basically following your documentation.
This is the command that I am using to spin up the container now, with no difference whatsoever in reproducing the issue:

sudo docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime:ro -e WATCHTOWER_DEBUG=true -e WATCHTOWER_ROLLING_RESTART=true -e WATCHTOWER_SCHEDULE="* 30 4 ? * SUN" -e WATCHTOWER_TIMEOUT=60s containrrr/watchtower:latest

Expected behavior

Just seeing logs one time at the container startup and not this many times. I also have a Jellyfin container with Healtcheck implemented and it does seems not generate this many log entries.

Screenshots

Screenshot 2023-10-03 alle 14 10 08

Environment

  • Debian 12 (bare metal)
  • amd64
  • Docker Version 24.0.6
  • Watchtower Version 1.6.0

Your logs

time="2023-10-03T14:07:59+02:00" level=debug msg="Sleeping for a second to ensure the docker api client has been properly initialized."
time="2023-10-03T14:08:00+02:00" level=debug msg="Making sure everything is sane before starting"
time="2023-10-03T14:08:00+02:00" level=debug msg="Retrieving running containers"
time="2023-10-03T14:08:00+02:00" level=debug msg="Retrieving running containers"
time="2023-10-03T14:08:00+02:00" level=debug msg="There are no additional watchtower containers"
time="2023-10-03T14:08:00+02:00" level=debug msg="Watchtower HTTP API skipped."
time="2023-10-03T14:08:00+02:00" level=info msg="Watchtower 1.6.0"
time="2023-10-03T14:08:00+02:00" level=info msg="Using no notifications"
time="2023-10-03T14:08:00+02:00" level=info msg="Checking all containers (except explicitly disabled with label)"
time="2023-10-03T14:08:00+02:00" level=info msg="Scheduling first run: 2023-10-08 04:30:00 +0200 CEST"
time="2023-10-03T14:08:00+02:00" level=info msg="Note that the first check will be performed in 110 hours, 21 minutes, 59 seconds"

Additional context

No response

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

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 Oct 3, 2023

The default healthcheck interval is 30 seconds for docker. It looks like your event log contains as many healthcheck events from Jellyfin as for watchtower (the /watchtower --healthcheck are the ones that watchtower produces, and curl -Lk -fsS "${HEALTHCHECK_URL}" || exit 1 are the Jellyfin ones).
Both seem to use the default interval of 30s.
You can lower the interval by specifying --health-interval 1h on the docker run command line. See: https://docs.docker.com/engine/reference/run/#healthcheck

@gabry45
Copy link
Author

gabry45 commented Oct 3, 2023

You're completely right, sorry about this. I've disabled it with --no-healthcheck, since I have no real use for it.
Thanks a lot, have a good rest of your day.

@gabry45 gabry45 closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants