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

Set a different autodiscover cleanup_timeout per beat #20543

Closed
jsoriano opened this issue Aug 11, 2020 · 3 comments · Fixed by #24681
Closed

Set a different autodiscover cleanup_timeout per beat #20543

jsoriano opened this issue Aug 11, 2020 · 3 comments · Fixed by #24681
Assignees
Labels
enhancement good first issue Indicates a good issue for first-time contributors Team:Platforms Label for the Integrations - Platforms team

Comments

@jsoriano
Copy link
Member

cleanup_timeout is now set to 60 seconds for all beats. This timeout is useful in filebeat, that may need to collect the last logs of a suddenly stopped container, but it is not so useful in other beats like Hearbeat or Metricbeat, that will be hitting endpoints that are no longer available, or assingned to newly created containers.

Keep this default value to 60 seconds for filebeat, but reduce it to 0 seconds for other beats.

@jsoriano jsoriano added enhancement good first issue Indicates a good issue for first-time contributors Team:Platforms Label for the Integrations - Platforms team labels Aug 11, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@AbhilashBalaji
Copy link

I'd like to work on this issue , could someone give me any idea on where to start from ?

@jsoriano
Copy link
Member Author

@AbhilashBalaji thanks for your interest! I am not sure what would be the best way of doing it, but let me try to give some guidelines.

Defaults are currently set here for the Kubernetes provider:

CleanupTimeout: 60 * time.Second,

And here for the Docker provider:
CleanupTimeout: 60 * time.Second,

These defaults should be zero, and then we would need to find a way to keep them as 60 seconds only for filebeat. Not sure what would be the best way of doing it.
For example a not very clean solution could be to place these defaults in global variables in these providers and set them to 60 seconds from some Filebeat init().
We also have a mechanism to customize hints-based autodiscover per Beat, for example here we register the hints handler for Filebeat. Something like this would be a better option, but may be too much for a default.

Any other suggestion is welcome, ping me if you open a PR 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Indicates a good issue for first-time contributors Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants