forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Add new keep_monitoring_alive flag to agent policies (elastic…
…#168865) ## Summary Ref elastic#168629 Adds a new `keep_monitoring_alive` flag to agent policies that allows agent environments to keep the monitoring server if they choose. > [!note] > `monitoring_enabled: []` needs to be explicitly set for this flag to be honored. If `monitoring_enabled` is omitted entirely, Fleet defaults to enabling monitoring for logs and metrics. ## To test Create a preconfigured policy where logs/metrics monitoring is explicitly disabled and include this new flag e.g. ```yml xpack.fleet.agentPolicies: - name: Test preconfigured policy id: test-preconfigured-policy package_policies: [] monitoring_enabled: [] keep_monitoring_alive: true ``` Then, run Kibana and verify the `monitoring` block in the full agent policy has monitoring enabled, but logs/metrics as disabled, e.g. ![image](https://github.com/elastic/kibana/assets/6766512/f5b205ad-96f0-4e88-967a-43546bf2bf84) You can also verify the need for `monitoring_enabled: []` by creating another preconfigured policy e.g. ```yml - name: Test preconfigured policy 2 id: test-preconfigured-policy-2 package_policies: [] keep_monitoring_alive: true ``` This will generate a policy e.g. ![image](https://github.com/elastic/kibana/assets/6766512/013b0381-b605-49a4-8819-3dec713f1e1f) All other combinations of enabling monitoring for logs/metrics should also generate the policies as expected. If you want to verify every combination manually: ```yml xpack.fleet.agentPolicies: - name: Test preconfigured policy id: test-preconfigured-policy package_policies: [] monitoring_enabled: [] keep_monitoring_alive: true - name: Test preconfigured policy 2 id: test-preconfigured-policy-2 package_policies: [] keep_monitoring_alive: true - name: Test preconfigured policy 3 id: test-preconfigured-policy-3 package_policies: [] monitoring_enabled: ['logs'] - name: Test preconfigured policy 4 id: test-preconfigured-policy-4 package_policies: [] monitoring_enabled: ['metrics'] - name: Test preconfigured policy 5 id: test-preconfigured-policy-5 package_policies: [] monitoring_enabled: ['logs', 'metrics'] ``` --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
9080836
commit eef222f
Showing
11 changed files
with
182 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.