-
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
Could not serialize metric: invalid name with gNMI input plugin #13052
Comments
Can you please retry this on 1.26.1? There were a number of issues that were fixed since that release. |
Getting following message with 1.26.1:
I commented out
|
I have verified that this is also happening with another networking vendor as well (Juniper). Seem like the For example, everything works fine when subscribing to |
@mohsin106 can you please paste the complete response data text so I can reproduce the issue!? |
@srebhan I will post my complete Telegraf config and the debug output for my Juniper device since my Ciena device is unavailable but both have the same issue. Thank you for looking into this.
Debug Output:
I do see these messages come in |
I suspect that the metric name is empty. Try to use |
Yes, the name field is coming in blank.
This is only happening with one sensor and I subscribe to multiple sensors. Is there a way to set the This is my config with multiple sensor subscriptions:
|
@srebhan Since I'm providing the |
Yes. You either can either subscribe (as you did) or you create an additional alias for the spurious paths... |
Subscribing as I did does not force the name field to be set to "memory". |
@mohsin106 can you please post the message that fails!? |
While Telegraf is starting up I see this warning messages when I subscribe to the
Data flowing in with measurement
Should the name field be set to "memory" since I'm doing this:
|
Thanks @mohsin106! Will take a look tomorrow... |
@mohsin106 hmmm the responsens you get are all prefixed with [[inputs.gnmi]]
addresses = ["dummy"]
redial = "10s"
[inputs.gnmi.aliases]
memory = "/components"
[[inputs.gnmi.subscription]]
name = "memory"
origin = "openconfig"
path = "/junos/system/linecard/cpu/memory"
subscription_mode = "sample"
sample_interval = "60s" and I get no warning. Of course you need to modify the config to your device but the important part is [inputs.gnmi.aliases]
memory = "/components" which assigns the metric name |
Yes. Using the |
Kind of. The issue is that Telegraf only knows the list of subscriptions. If a new response comes, we can only try to map the path to the subscriptions to find out the desired name. Your device (and it seems like Juniper devices in general) will spuriously report data with a path different to the one of the subscriptions... In this case, the lookup fails and we do not have any information to which subscription the response belongs. |
I will add a short readme section on Juniper devices... |
Relevant telegraf.conf
Logs from Telegraf
System info
telegraf-alpine:1.23.4 Docker container
Docker
No response
Steps to reproduce
Enable gRPC on Ciena device.
Start Telegraf.
This is similar to this issue (#6391).
Adding
name_overide = "components"
under[[inputs.gnmi]]
helps allow the data to come in.Specifying
name = "components"
under[[inputs.gnmi.subscription]]
does not help.Expected behavior
Write metrics to desired output using "components" as the measurement name.
Actual behavior
Additional info
No response
The text was updated successfully, but these errors were encountered: