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

Pass logging.level from elastic agent to processes. #28707

Conversation

michel-laterman
Copy link
Contributor

What does this PR do?

Insert the logging.level config setting into the configuration passed to
sub processes when emitting a config from a policy.

Why is it important?

Allows operators to view debug logs for the beats/processes which are started by the agent by altering the log level.
The agent's log level value will be passed to all processes it creates.
This can already be done today by altering it in Kibana

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.

How to test this PR locally

  1. install/enroll elastic agent to fleet
  2. change log level of agent in fleet
  3. view agent logs and metricbeat/filebeat logs

Related issues

Insert the logging.level config setting into the configuration passed to
sub processes when emitting a config from a policy.
@michel-laterman michel-laterman added enhancement Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Oct 28, 2021
@elasticmachine
Copy link
Collaborator

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

@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 Oct 28, 2021
@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2021

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 7./d branch. /d is the digit

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

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Oct 28, 2021
@elasticmachine
Copy link
Collaborator

💚 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: 2021-10-28T22:27:09.928+0000

  • Duration: 90 min 3 sec

  • Commit: d28b770

Test stats 🧪

Test Results
Failed 0
Passed 7120
Skipped 16
Total 7136

💚 Flaky test report

Tests succeeded.

🤖 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.

@michel-laterman
Copy link
Contributor Author

As commented on the issue we would be better specifying the level in the policy (that can be read from the env, with a default)

@michel-laterman michel-laterman deleted the elastic-agent-pass-level branch April 12, 2023 19:18
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 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.

Fleet managed: enable debug mode
2 participants