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

{file,packet,winlog}beat - Register input metrics diagnostic hook #35798

Merged

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Jun 16, 2023

What does this PR do?

Register an elastic-agent diagnostics hook to return the input metrics (encoded to JSON) in agent diagnostic dumps.

Why is it important?

Have this data included in Agent diagnostics will help in understanding what's happening with the inputs.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Notes

I haven't tested this under Agent. I will likely want to backport this to 8.8.x after testing everything in the 8.9.0-SNAPSHOT when it's available.

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 16, 2023
@mergify
Copy link
Contributor

mergify bot commented Jun 16, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @andrewkroh? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@andrewkroh andrewkroh force-pushed the feature/agent-input-metric-diag-hook branch from 5e615de to cdbde87 Compare June 16, 2023 15:15
@andrewkroh andrewkroh changed the title filebeat,packetbeat,winlogbeat - Register input metrics diagnostic hook {file,packet,winlog}beat - Register input metrics diagnostic hook Jun 16, 2023
@andrewkroh andrewkroh added the backport-skip Skip notification from the automated backport with mergify label Jun 16, 2023
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 16, 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-06-30T12:37:40.290+0000

  • Duration: 82 min 50 sec

Test stats 🧪

Test Results
Failed 0
Passed 27493
Skipped 2023
Total 29516

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Register an elastic-agent diagnostics hook to return the input metrics (encoded to JSON)
in agent diagnostic dumps.
@andrewkroh andrewkroh force-pushed the feature/agent-input-metric-diag-hook branch from cdbde87 to d758b8a Compare June 16, 2023 17:50
@andrewkroh andrewkroh marked this pull request as ready for review June 16, 2023 17:56
@andrewkroh andrewkroh requested review from a team as code owners June 16, 2023 17:56
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link
Collaborator

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

@andrewkroh
Copy link
Member Author

/test

@pierrehilbert pierrehilbert requested review from belimawr and removed request for pierrehilbert June 19, 2023 05:44
@mergify
Copy link
Contributor

mergify bot commented Jun 20, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b feature/agent-input-metric-diag-hook upstream/feature/agent-input-metric-diag-hook
git merge upstream/main
git push upstream feature/agent-input-metric-diag-hook

filebeat/beater/filebeat.go Show resolved Hide resolved
packetbeat/beater/packetbeat.go Show resolved Hide resolved
winlogbeat/beater/winlogbeat.go Show resolved Hide resolved
@andrewkroh
Copy link
Member Author

We always put the error in the main log message:

Let's use the thread in #35658 (comment) to discuss this. The same topic is blocking that PR.

@andrewkroh andrewkroh requested a review from belimawr June 23, 2023 14:23
@mergify
Copy link
Contributor

mergify bot commented Jun 29, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b feature/agent-input-metric-diag-hook upstream/feature/agent-input-metric-diag-hook
git merge upstream/main
git push upstream feature/agent-input-metric-diag-hook

@andrewkroh andrewkroh merged commit e9272ad into elastic:main Jun 30, 2023
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
…ok (elastic#35798)

Register an elastic-agent diagnostics hook to return the input metrics (encoded to JSON)
in agent diagnostic dumps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify enhancement Filebeat Filebeat Packetbeat Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Winlogbeat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants