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

Allow globs (wildcards) in config for tags/fields in enum processor #8598

Merged
merged 2 commits into from
Dec 18, 2020

Conversation

sspaink
Copy link
Contributor

@sspaink sspaink commented Dec 18, 2020

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Resolve #7184 by allowing globs (wildcards) in config for tags/fields in enum processor.

Example of usage:

With the CPU input plugin loaded and the enum processor configured as below, the output will have the associated mapped number included under the destination tag "glob_test".

[[processors.enum]]
  [[processors.enum.mapping]]
    ## Name of the tag to map
    tag = "*"

    ## Destination tag or field to be used for the mapped value.  By default the
    ## source tag or field is used, overwriting the original value.
    dest = "glob_test"

    ## Table of mappings
    [processors.enum.mapping.value_mappings]
      cpu2 = 2
      cpu3 = 3

image
image

@sspaink sspaink merged commit 50265d9 into influxdata:master Dec 18, 2020
ssoroka pushed a commit that referenced this pull request Dec 18, 2020
…8598)

* Allow glob in enum processor config

* change assert to require

(cherry picked from commit 50265d9)
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
…nfluxdata#8598)

* Allow glob in enum processor config

* change assert to require
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

Successfully merging this pull request may close these issues.

Allow using globs for enum processor
2 participants