-
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
(inputs.gnmi): Parsing field names incorrectly #14530
Comments
Hi @greenfox878, In order to help resolve this can I request that you do the following:
With that we can dig into the logic and see what is going on. Thanks! |
@greenfox878 please use |
Hi @powersj ,
|
@greenfox878 thanks for that output. I am able to reproduce with our tests. Next steps are I need to understand the existing key parsing code. It appears in your case we want to take the path base of the key, but are instead, sometimes doing some sub-string logic here that is clearly wrong. edit: The alias path we get is For example:
The alias path is looked by checking if the current path:
is a subpath of:
Which it is, so it returns the alias path and then does the strange substring. I think we should be ensuring that the entire alias path exists in the string before we start doing this manipulation. I'll put up a PR once I figure out how to not break existing tests O.o |
Rather than abritrarily take the substring of key, ensure that the key contains the alias in the first place, then do the removal. Otherwise, always take the base path. fixes: influxdata#14530
Rather than abritrarily take the substring of key, ensure that the key contains the alias in the first place, then do the removal. Otherwise, always take the base path. fixes: influxdata#14530
Rather than abritrarily take the substring of key, ensure that the key contains the alias in the first place, then do the removal. Otherwise, always take the base path. fixes: influxdata#14530
Can both of you please try the artifacts in #14581 and validate that the field names report correctly please? If they do not please use Thanks! |
Sorry but I have no idea how to install/update telegraf from the cloned telegraf repository of your profile |
Artifacts, pre-build binaries, will be attached to that PR in 20-30mins. No need to build anything yourself. |
Thank you for taking the time to try it out! |
You're welcome :) Can you please help with the other issue I described or should I open a new issue in github? |
You got the empty path error only with the current release right? The test artifact did not show that right? |
Correct |
ok good :) The current code when parsing the field names does not take the origin (e.g. |
Ok thanks! So I'll wait even more patiently the new release :) |
Rather than abritrarily take the substring of key, ensure that the key contains the alias in the first place, then do the removal. Otherwise, always take the base path. fixes: influxdata#14530
I made some additional changes to the PR. Could I request your try the artifacts one more time to confirm I have not regressed anything? If all looks good, we can land this and release it in Monday's release. Thank you! |
Hi @powersj ! @romanelloacn , Here old topic about "-" to "_" replacement. Looks like it's default behavior. |
Thank you both for confirming. |
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.29.1, Ubuntu 22.04.3 LTS (latest updates)
Docker
No response
Steps to reproduce
Expected behavior
Correct output. v1.28.5 or older
Actual behavior
Corrupted outptu. v1.29.1:
here we see "_pkts", "t_pkts", "st_pkts" instead of "out_pkts", "out_multicast_pkts"...
Additional info
No response
The text was updated successfully, but these errors were encountered: