-
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
feat(processors/parser): Add option to parse tags #11003
feat(processors/parser): Add option to parse tags #11003
Conversation
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
This plugin parses defined fields or tags containing the specified data format and | ||
creates new metrics based on the contents of the field or tag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you use the converter processor to switch a tag to field, then use the parser plugin on the field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but the sample config already mentioned tags. Other processors also work on both tags and fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the number and names of resulting fields after the parse could be dynamic, so difficult to catch them all.
Nevermind, after this PR the resulting new tags/fields will still be based from the chosen parser and its configuration. I made another PR to handle that: #11060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So @reimda, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reimda ?
Followed-up by #11228 |
Required for all PRs:
Add an option to also parse tags (as the example config description was already saying that).
I don't have added tests yet. If someone could tell me the test(name)s I should add, I'm happy to implement them..