We are using telegraf to collect a few prometheus metrics out of the box. Now we want to extend the configurability of telegraf to our customers, so that they can bring-in their own scrape endpoints & services (as part of prometheus input plugin).
How do we do config isolation in this case, so that the customer’s config does not bring down telegraf instance we are running for collecting a few other prom metrics by default.
- I understand i can run multiple instances of prom input plugin (one for us, and one for our customer’s custom config). If i do it, how do i seperate config. I see i can use multiple config files, but i rewally need to restrict them to provide only config relevant to prom input plugin.
- If customers provide invalid config, i would like to just ignore just that input plugin and continue to run the other plugins. Is that an option for the agent that is configurable ?
- Instead of seperate config files, can i embed a file reference in TOML to point to another file?
- Is there any API/packages to validate config per plugin ?
ex:- something like below.
Looking for guidances as i want to stay away from running multiple instances of telegraf in the same node for different configurations for the purposes of config isolation isolation, as we are running in a container and very resource sensitive to run another instance of telegraf.