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

[Elastic Agent] Add queue depth, output batch size and rate #7611

Merged
merged 6 commits into from
Aug 31, 2023

Conversation

joshdover
Copy link
Contributor

@joshdover joshdover commented Aug 30, 2023

What does this PR do?

This adds more in depth metrics for viewing output batches sizes, batches/sec, and input queue sizes. This helps with tuning workers and bulk_max_size to avoid filling up the queues.

For the input queue metrics, we currently only have this data on the logs-elastic_agent.*beat-* data streams, rather than on the metrics-* data streams. Fixing this requires some fixes in Agent and I'd like to get value out on this sooner, so I'm deciding to map these fields for now on logs and we'll fix later (opened elastic/elastic-agent#3334) on a future Agent version.

@elastic/elastic-agent-data-plane I would like confirmation that I am interpreting this metric fields correctly.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

elastic-package stack up && elastic-package build && elastic-package install

Go to Fleet -> click on an Agent -> View more agent metrics

Related issues

Screenshots

Output write batches/sec

image

Output batch size by beat type

image

Queue depth by input

image

@elasticmachine
Copy link

elasticmachine commented Aug 30, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-31T08:50:46.623+0000

  • Duration: 16 min 38 sec

Test stats 🧪

Test Results
Failed 0
Passed 37
Skipped 0
Total 37

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@joshdover joshdover added the Team:Elastic-Agent Label for the Agent team label Aug 30, 2023
@joshdover joshdover marked this pull request as ready for review August 30, 2023 15:14
@joshdover joshdover requested a review from a team as a code owner August 30, 2023 15:14
@joshdover joshdover changed the title [Elastic Agent] Add output queue depth and write batches [Elastic Agent] Add input+output queue depth and write batches Aug 30, 2023
@elasticmachine
Copy link

elasticmachine commented Aug 30, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚
Classes 100.0% (0/0) 💚
Methods 33.333% (25/75) 👎 -42.424
Lines 100.0% (0/0) 💚
Conditionals 100.0% (0/0) 💚

Copy link

@faec faec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except some description typos

@joshdover
Copy link
Contributor Author

Thanks @faec for catching my bad copy and paste 🤦

@joshdover joshdover changed the title [Elastic Agent] Add input+output queue depth and write batches [Elastic Agent] Add queue depth, output batch size and rate Aug 31, 2023
@joshdover joshdover merged commit 190a8ed into elastic:main Aug 31, 2023
@joshdover joshdover deleted the agent/output-metrics branch August 31, 2023 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add queue metrics to agent metrics dashboard
4 participants