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

Metricbeat Docker module doesn't shutdown immediatelly #2944

Closed
tsg opened this issue Nov 5, 2016 · 2 comments
Closed

Metricbeat Docker module doesn't shutdown immediatelly #2944

tsg opened this issue Nov 5, 2016 · 2 comments
Labels

Comments

@tsg
Copy link
Contributor

tsg commented Nov 5, 2016

Terminating Metricbeat with the docker module loaded doesn't seem to work until one period passes.

To reproduce:

  • Do a basic configuration like:
- module: docker
  metricsets: ["cpu", "info", "memory", "network", "diskio", "container"]
  enabled: true
  period: 10s
  #hosts: ["localhost"]
  socket: unix:///var/run/docker.sock
  • Start metricbeat
  • Press ^C

Happens:

  • It takes up to 10s for metricbeat to shutdown
@tsg tsg added bug Metricbeat Metricbeat labels Nov 5, 2016
@tsg tsg mentioned this issue Nov 5, 2016
19 tasks
@ruflin
Copy link
Member

ruflin commented Nov 16, 2016

The reason metricbeat does not directly shutdown is that fetching the docker stats takes at least 2 seconds: https://github.com/docker/docker/blob/master/cli/command/container/stats_helpers.go#L148 Unfortunately for a longer list of containers this can take a lot more time. We should find a way to stop the fetching loop.

@ruflin
Copy link
Member

ruflin commented May 23, 2017

Closing this as the docker client is now setup with a timeout means it will block only based on the timeout and not until all is completed.

@ruflin ruflin closed this as completed May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants