elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.74k stars 8.14k forks source link

[Fleet] Exposing logging related configuration in the Agent Policy #192237

Open nimarezainia opened 2 weeks ago

nimarezainia commented 2 weeks ago

Recently the agent.logging.level was exposed via the Agent Policy so that users can modify this setting globally per policy. There are a few more agent logging settings which would also be beneficial to expose here based on user feedback.

The current [elastic-agent.yml](https://github.com/elastic/elastic-agent/blob/30e1b9b243ec670964efe0688f5310cc87e4bff2/elastic-agent.yml#L237-L239) file here has more detail about these settings.

This request is to have the following options that are relevant to also be available as configuration options in the Agent Policy:


Number of rotated log files to keep. Oldest files will be deleted first.

keepfiles: 7

Enable log file rotation on time intervals in addition to size-based rotation.

Intervals must be at least 1s. Values of 1m, 1h, 24h, 724h, 3024h, and 365*24h

are boundary-aligned with minutes, hours, days, weeks, months, and years as

reported by the local system clock. All other intervals are calculated from the

Unix epoch. Defaults to disabled.

interval: 0



--------

# Requirements

- the advanced section of the Agent Policy to have UI to enable these options.
- Agent to be tested with the various configuration changes applied.
elasticmachine commented 2 weeks ago

Pinging @elastic/fleet (Team:Fleet)