-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
processors.enum.mapping to be applied to multiple fields #10892
Comments
This makes sense to me. I think we should leave the @djvanhelmond Would you like to put together a PR to make this change? |
@reimda I appreciate the confidence, but I'm not nearly skilled enough to code something up in Go that would be remotely acceptable. |
Next steps: put up PR for multiple field mapping, deprecating the old config option |
Could you test if the artifacts in #16030 fix this issue? Thanks! |
Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you! |
Feature Request
Proposal:
Make the [processors.enum.mapping] applicable to multiple fields.
Current behavior:
I query a device that gives me json with 8 values that are either "on" or "off".
Currently I have to create an [processors.enum.mapping] per value.
[[processors.enum]]
[[processors.enum.mapping]]
field = "field_1"
[processors.enum.mapping.value_mappings]
off = 0
on = 1
[[processors.enum.mapping]]
field = "field_2"
[processors.enum.mapping.value_mappings]
off = 0
on = 1
etc.
Desired behavior:
[[processors.enum.mapping]]
field = ["field_1", "field_2"]
[processors.enum.mapping.value_mappings]
off = 0
on = 1
Use case:
It makes the telegraf config more readable and prevents discrepancies.
The text was updated successfully, but these errors were encountered: