telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

chore(agent): Fix buffer directory config and document

Open mstrandboge opened this issue 1 year ago • 2 comments

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

mstrandboge avatar Jul 24 '24 21:07 mstrandboge

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

josephbrosef avatar Jul 24 '24 23:07 josephbrosef

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)

:package: Click here to get additional PR build artifacts

Artifact URLs

DEB RPM TAR GZ ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

telegraf-tiger[bot] avatar Jul 29 '24 20:07 telegraf-tiger[bot]