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

Delay in sending logs with fielbeat 8.12.1 #39614

Closed
sasikiranvaddi opened this issue May 17, 2024 · 10 comments
Closed

Delay in sending logs with fielbeat 8.12.1 #39614

sasikiranvaddi opened this issue May 17, 2024 · 10 comments
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@sasikiranvaddi
Copy link

There has been a noticeable delay observed when sending logs to using filebat 8.12.1

filebeat configuration used

filebeat.inputs:

  • type: stdin
    json.keys_under_root: true
    processors:

  • drop_event:
    when:
    !java.util.LinkedHashMap
    or:
    - !java.util.LinkedHashMap
    equals: !java.util.LinkedHashMap
    exclude: Hello
    - !java.util.LinkedHashMap
    equals: !java.util.LinkedHashMap
    exclude2: Hello Testing

  • drop_fields:
    fields: ["input","offset","log","@metadata","host","beat","prospector","source"]
    output.console:
    pretty: false

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 17, 2024
@ycombinator ycombinator changed the title Dealy in sending logs with fielbeat 8.12.1with multiple exclusion filters are enabled. Delay in sending logs with fielbeat 8.12.1with multiple exclusion filters are enabled. May 20, 2024
@ycombinator ycombinator changed the title Delay in sending logs with fielbeat 8.12.1with multiple exclusion filters are enabled. Delay in sending logs with fielbeat 8.12 when multiple exclusion filters are enabled May 20, 2024
@ycombinator ycombinator added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label May 20, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 20, 2024
@pierrehilbert
Copy link
Collaborator

Hello @sasikiranvaddi
Have you seeing the same delay without the multiple exclusion filters? Is it only for the first events or every events?
Would like to understand if this is linked to the new defaults we introduced in 8.12: https://www.elastic.co/fr/blog/using-elastic-agent-performance-presets-in-8-12

@sasikiranvaddi
Copy link
Author

sasikiranvaddi commented May 22, 2024

Hi @pierrehilbert,
Yes we fine tuned flush timeout as specified https://github.com/elastic/beats/blob/v8.12.1/CHANGELOG.asciidoc, by setting queue.mem.flush.timeout: 1s in output section on monday and observed the logs are receiving faster. We are trying to perform some more tests to confirm that it has improved.

@pierrehilbert
Copy link
Collaborator

Keep me honest here but it doesn't seem to be a problem with the exclusion filters then but with the new default you have compare to the behavior you were expecting.
@faec do you have some recommendation to share here to help them getting the expected behavior?

@sasikiranvaddi
Copy link
Author

sasikiranvaddi commented May 22, 2024

Hi @pierrehilbert,
After a quick test, the behavior of delayed events are observed from 8.12.1 even without including exclusion/inclusion filters. After adding queue.mem.flush.timeout then the events are sent faster to the output source.
I'll update the title accordingly.
Just to add, in 8.11 we haven't noticed any delay. Probably the new change of updating default value of queue.mem.flush.timeout from 1s to 10s might have caused this delay

@sasikiranvaddi sasikiranvaddi changed the title Delay in sending logs with fielbeat 8.12 when multiple exclusion filters are enabled Delay in sending logs with fielbeat 8.12.1 May 22, 2024
@pierrehilbert
Copy link
Collaborator

Yes this is definitively related to this parameter that we changed to improve overall performances observed by the users.

@sasikiranvaddi
Copy link
Author

Thank you @pierrehilbert,
We will keep this Bug open for few days once our tests are concluded and if the results found to be positive then we can close the Bug.

@faec
Copy link
Contributor

faec commented May 22, 2024

Yes, it sounds to me like this is caused by the presets changes. If you want to stick with a general preset you can try preset: latency, but you can also just customize your performance parameters as before. If latency is at a premium you might even consider queue.mem.flush.timeout: 0, which will send events without any delay.

@sasikiranvaddi
Copy link
Author

Hi @faec,
Got your point. Thank you for the info.

@sasikiranvaddi
Copy link
Author

Hi @faec, @pierrehilbert ,
The test results looks promising. Thank you for the support.
I will be closing the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

5 participants