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

PR #46 break telegraf "Multiple inputs of the same type" #48

Closed
gaelL opened this issue May 7, 2018 · 2 comments
Closed

PR #46 break telegraf "Multiple inputs of the same type" #48

gaelL opened this issue May 7, 2018 · 2 comments

Comments

@gaelL
Copy link
Contributor

gaelL commented May 7, 2018

Hello,

The last merged PR #46 seems to don't allow anymore to use several time the same input plugin.

This PR make the input name based on a dict key, which can't be duplicated.

+[[inputs.{{ item.key }}]]

Ref in Telegraf doc : an input could be called several time https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md#multiple-inputs-of-the-same-type

This is important for some input plugin like : influxdata/telegraf#2294 (comment)

Behavior added in ansible-telegraf here #46

Regards

@tjend
Copy link
Contributor

tjend commented May 7, 2018

Yes, this has broken that functionality.

It might be better to use the unique dict key as the plugin name and filename, and have a value within the dict to override the plugin name in the case of duplicates. Let me think how best this might be handled.

@tjend
Copy link
Contributor

tjend commented May 9, 2018

I believe #50 should fix the issue. Please add a 'plugin:' key to the dict.

The input name is now set like this:
[[inputs.{{ item.value.plugin | default(item.key) }}]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants