-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Load inputs from external configuration files in Elastic Agent in standalone mode #30087
Load inputs from external configuration files in Elastic Agent in standalone mode #30087
Conversation
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
This pull request doesn't have a |
This pull request does not have a backport label. Could you fix it @kvch? 🙏
NOTE: |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
@ph are the errors in the E2E tests related to my change? |
@kvch I do not think they are
I see the unified build failed on master. https://internal-ci.elastic.co/job/elastic+unified-release+master+distributed-snapshot-multijob-master/1059/ |
/test |
Lets make sure we test this also as part of the e2e test framework to have some integration tests for it. @kvch In the Beats days, I remember there were always discussions around using |
👍
I have somewhat strong preference because otherwise the file cannot be parsed. I can probably workaround the problem but I rather keep it this way. If the users miss the |
My strong preference is to make sure only 1 way works :-) Lets make sure the error that is shown to the user is very descriptive. |
This pull request is now in conflicts. Could you fix it? 🙏
|
…d-input-config-from-dir
Looks good to me, but I'll wait to see if someone with more knowledge of the agent configuration files can review this before approving. |
e2e tests require elastic/e2e-testing#2064 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the code looks good.
I do want to confirm the behavior that I am reading in the code. It seems this is only used when in standalone mode (which I am glad to see). But in the description of the PR it describes that it allows usage of infrastructure as code instead of Fleet. How does this help solve that, when a single elastic-agent.yml also did the same thing. The single elastic-agent.yml
could be committed in Git as well. Just trying to understand the reason for adding this.
When a separate, dedicated team manages Elastic Agent, they might want to limit the access to a single |
Ooops, I merged it without a changelog entry. I will open a follow-up PR. |
Changelog: #30144 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, after merge.
Documentation: elastic/observability-docs#1515 |
The inputs.d feature was added in elastic/beats#30087 for elastic agent but unfortunately without any documentation. inputs.d directory is especially useful in the elastic-agent standalone mode. The close the first gap around documentation, I added it to the elastic-agent.yml file. For awareness, this is an open issue around inputs.d directory: elastic#622
The inputs.d feature was added in elastic/beats#30087 for elastic agent but unfortunately without any documentation. inputs.d directory is especially useful in the elastic-agent standalone mode. The close the first gap around documentation, I added it to the elastic-agent.yml file. For awareness, this is an open issue around inputs.d directory: #622
What does this PR do?
This PR adds support for loading external configuration files to load inputs when running Agent in standalone mode.
Users have to put their configuration files into
{path.config}/inputs.d
with the extensionyml
.When it is configured, Agent takes the
inputs
configuration from the last standalone configuration and appends the inputs from the external configuration files to it. When the standalone configurations are reloaded, external input configurations are reloaded as well.The external configuration file must include
inputs
, otherwise the file is invalid. Example for correct file:Why is it important?
Users can configure external configuration files, similar to Filebeat. So managing configuration can be done by Git or Chef instead of Fleet.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.