Skip to content

[Fleet] Allow to overrides agent policy #159414

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

Merged
merged 9 commits into from
Jun 14, 2023

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Jun 9, 2023

Summary

Resolve #158699

Add a new property overrides to the agent policy API.

We do not allow to override inputs this will throw a 400.

How to test?

  • using the PUT /api/fleet/agent_polcies/{id} API add some agent properties inside overrides

Todo

  • add manual test instructions
  • Add API integration tests

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@nchaulet
Copy link
Member Author

@cmacknz that new API allow to configure any key of the agent policy in Fleet, I tried to configure the agent.logging.level to debug but the agent seems to still use the default logging level (info) when I run elastic-agent inspect the policy contains my debug log level, is there a known bug/issue for the agent log level that blocked me to configure it that way?

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team labels Jun 12, 2023
@nchaulet nchaulet self-assigned this Jun 12, 2023
@nchaulet nchaulet marked this pull request as ready for review June 12, 2023 13:13
@nchaulet nchaulet requested review from a team as code owners June 12, 2023 13:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM, with the condition to find out why the override is not applied on the agent.

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

SO changes LGTM

@nchaulet
Copy link
Member Author

@juliaElastic @cmacknz I created the following issue for the agent.logging.level: debug overrides not working elastic/elastic-agent#2851

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1066 1067 +1
Unknown metric groups

API count

id before after diff
fleet 1182 1183 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 13 15 +2
securitySolution 409 413 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 14 16 +2
securitySolution 492 496 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @nchaulet

@nchaulet nchaulet merged commit 92eb219 into elastic:main Jun 14, 2023
@nchaulet nchaulet deleted the feature-agent-policy-overrides branch June 14, 2023 12:39
@kibanamachine kibanamachine added v8.9.0 backport:skip This commit does not require backporting labels Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Add agent policy API to add settings not yet supported by UI
9 participants