-
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
Json Parser wildcard tagkey support #7531
Comments
I was just about to make the same request. This seems like another facet of the extended JSON parsing support requested in the long-running #1363, but perhaps some of these features are worth implementing independently. I'm tempted to work on this myself, although we have other blockers to using this parser. I'd suggest that the The underscore referencing seems to be ambiguous in any case - how does a config of
(same applies for |
I feel good with either approach as long as it achieve the objective. We should have native support between the parser and serializers. |
Let's do the simple glob update on Regarding serializer -> parser roundtrip, I recommend against using JSON for this since it does not differentiate between float and integer types. For cleaning up the prefixes, I recommend using the [[processors.strings]]
[[processors.strings.trim_prefix]]
tag_key = "*"
trim_prefix = "tags_" |
Handy, hadn't spotted that. Useful to me elsewhere too. |
Feature Request
Opening a feature request kicks off a discussion on json parser to support wildcard tag key. Discussion initially happens on here.
Proposal:
Allow Parser to handle TagKey creation automatically.
Current behavior:
The input json parser doesnt support output from json serializers properly.
Telegraf Setting
Input Json:
The metrics output tend to skip all the tag unless it is specified in
tag_keys = ["tags_InstanceId", "tags_app", , "tags_availability-zone", "tags_cluster", "tags_env", "tags_host", "tags_metric_type"]
This tend to be inconvenience as configuration need to be updated when new tag are insert. Since the output from
serializers
formatted this way, parser should made compatible to each other.Desired behavior:
A new config is probably suggested or
*
should be allow intag_keys
.Use case:
This tend to be inconvenience as configuration need to be updated when new tag are insert. Since the output from
serializers
formatted this way, parser should made compatible to each other.The text was updated successfully, but these errors were encountered: