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

feat(processors/parser): Add option to parse tags #11003

Closed
wants to merge 1 commit into from
Closed

feat(processors/parser): Add option to parse tags #11003

wants to merge 1 commit into from

Conversation

Hipska
Copy link
Contributor

@Hipska Hipska commented Apr 20, 2022

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..

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Apr 20, 2022
Comment on lines +3 to +4
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.
Copy link
Contributor

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?

Copy link
Contributor Author

@Hipska Hipska Apr 22, 2022

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.

Copy link
Contributor Author

@Hipska Hipska Apr 25, 2022

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So @reimda, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hipska Hipska requested a review from reimda May 17, 2022 07:53
@Hipska Hipska requested review from sspaink and srebhan May 30, 2022 14:51
@Hipska Hipska reopened this May 30, 2022
@Hipska Hipska requested review from MyaLongmire and powersj May 31, 2022 07:48
@Hipska
Copy link
Contributor Author

Hipska commented May 31, 2022

Followed-up by #11228

@Hipska Hipska closed this May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants