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

Add conn param and conn-skip flag to diagnostics command #4946

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

michel-laterman
Copy link
Contributor

@michel-laterman michel-laterman commented Jun 17, 2024

What does this PR do?

Add CONN param to control protocol so the elastic-agent can use CONN as an additional parameter when requesting diagnostics actions. The CONN param will be used to execute the optional connection request diagnostics and included by default. Add a conn-skip flag to the diagnostics command that will not send the CONN param so request diagnostics are skipped.

Why is it important?

Connection request diagnostics are optional when collecting diagnostics bundles, but should be included by default.

An example of these hooks being added is in fleet-server: elastic/fleet-server#3587
Adding the hooks to elastic-agent or the underlying beats will be done in a separate PR

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/fragments using the changelog tool
  • I have added an integration test or an E2E test

How to test this PR locally

Replace fleet-server component before installing/enrolling with one built from elastic/fleet-server#3587
Install/enroll the agent in a policy with fleet-server

run sudo elastic-agent diagnostics [--skip-conn]

Related issues

@michel-laterman michel-laterman added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Jun 17, 2024
Copy link
Contributor

mergify bot commented Jun 17, 2024

This pull request does not have a backport label. Could you fix it @michel-laterman? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

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

NOTE: backport-skip has been added to this pull request.

Add CONN param to control protocol so the elastic-agent can use CONN as
an additional parameter when requesting diagnostics actions. The CONN
param will be used to execute the optional connection request
diagnostics and included by default. Add a conn-skip flag to the
diagnostics command that will not send the CONN param so request
diagnostics are skipped.
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Copy link
Contributor

@blakerouse blakerouse 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.

@michel-laterman michel-laterman merged commit 33598b6 into elastic:main Jun 18, 2024
13 checks passed
@michel-laterman michel-laterman deleted the conn-diag branch June 18, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include TLS information in diagnostics bundle
3 participants