Skip to content

feat(agent): Introduce labels and selectors to enable and disable plugins #16705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

neelayu
Copy link
Contributor

@neelayu neelayu commented Mar 29, 2025

Summary

Attach a label to a running instance of telegraf and match it against selectors provided in the plugins. For more details, refer the linked issue

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16704

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Mar 29, 2025
@srebhan srebhan self-assigned this Apr 14, 2025
@srebhan
Copy link
Member

srebhan commented Apr 14, 2025

Let's first agree on a configuration style in the issue before reviewing...

@neelayu neelayu marked this pull request as draft April 14, 2025 09:20
@neelayu neelayu force-pushed the enable-disable-lbl-sel branch from cdfe064 to 95118b8 Compare July 21, 2025 14:14
@neelayu neelayu marked this pull request as ready for review July 21, 2025 14:15
@neelayu
Copy link
Contributor Author

neelayu commented Jul 21, 2025

@srebhan I have implemented the spec.

One caveat is in the --select flag. The underlying library that Telegraf uses, auto parses , into multiple strings. Hence it messes up AND and OR that we defined. As a workaround I have introduced ; separator. The library also seems to be broken and does not allow us to specify the separator. urfave/cli#2066

@telegraf-tiger
Copy link
Contributor

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.

☺️ This pull request doesn't significantly change the Telegraf binary size (less than 1%)

📦 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 ]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable / Disable plugin instances
2 participants