Skip to content
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

Support multiple Telegraf into the same pod #45

Open
yam8511 opened this issue Nov 5, 2020 · 3 comments
Open

Support multiple Telegraf into the same pod #45

yam8511 opened this issue Nov 5, 2020 · 3 comments
Labels
question Further information is requested

Comments

@yam8511
Copy link

yam8511 commented Nov 5, 2020

Describe the issue here.

Is there any possible to support multiple Telegraf into the same pod?
In actual, I would like using Telegraf to collect metrics and logs from one pod.
But if I wrote input about metrics and another input about logs in the same "telegraf config", its collected data will be mixed to the same output.

Or, had already existed solution for the situation?

@BondAnthony
Copy link
Contributor

Hi @yam8511 thank you for opening an issue!

When you say same pod do you mean containers within a single pod under a deployment? Do I understand that you have two different containers within a single deployment that you would like to send to two different outputs based on the container?

@yam8511
Copy link
Author

yam8511 commented Nov 13, 2020

Hi @BondAnthony thank you for reply.
Yes, it is. I would like send two (or more) different outputs based on one container.

@BondAnthony
Copy link
Contributor

Hey @yam8511 so sorry for the delay. You can definitely configure multiple outputs and route your input data within telegraf to different outputs based on tags. I believe you're looking for the tagpass and tagdrop selectors within telegraf. Here is a doc that explains these configurations with a few examples.

https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md#metric-filtering

Let me know if this information helps. I'm currently using something similar where my inputs will create a new tag on the data being collected.

@BondAnthony BondAnthony added the question Further information is requested label Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants