chore(agent): Fix buffer directory config and document
Summary
Fixes buffer directory agent level config and documents the option.
Checklist
- [X] No AI generated code was used in this PR
Related issues
resolves #15656
hey, i tested the new build and it doesn't seem to resolve the issue. setting buffer_strategy = "disk" and buffer_directory = "/buffer_storage" at the [agent] level does not actually change the buffer strategy. It still uses memory buffer. pretty sure config.BufferStrategy and config.BufferDirectory are always an empty string, so it will always return with a 'memory' buffer.
https://github.com/influxdata/telegraf/blob/26df1e720548ffe6662e3bfe595efd28ba5222c7/models/running_output.go#L102
https://github.com/influxdata/telegraf/blob/26df1e720548ffe6662e3bfe595efd28ba5222c7/models/buffer.go#L52-L64
Those 2 values appear to come from the OutputConfig struct (which is why i thought maybe it could be set at the Output level in the referenced bug), but i can not see how those 2 struct values are supposed to get populated with the buffer_strategy and buffer_directory from the [agent] config?
https://github.com/influxdata/telegraf/blob/26df1e720548ffe6662e3bfe595efd28ba5222c7/models/running_output.go#L25-L43
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. Downloads for additional architectures and packages are available below.
:partying_face: This pull request decreases the Telegraf binary size by -3.96 % for linux amd64 (new size: 252.1 MB, nightly size 262.5 MB)