Cherry-pick #18124 to 7.x: Enable introspecting configuration #18186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #18124 to 7.x branch. Original message:
What does this PR do?
This PR adds 3 options to our agents CLI
Option 1 - Introspecting current config
Usage
./elastic-agent inspect
This will print out current configuration either from fleet or from yml.
Sample output:
Option 2 - Introspecting used outputs
Usage
./elastic-agent inspect output
This will print out outputs which are actually used . If config contains definition for output but output is not used in any datastream it will not be present in the printout
Sample output:
Option 3: Introspecting specific output
Usage:
./elastic-agent inspect output -o default
This will print out actual configuration of the beats, this helps you understand how configuration retrieved from fleet translates to configuration which is sent out to the process itself.
Sample output:
Why is it important?
To improve debugging experience
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.