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

Could not serialize metric: invalid name from cisco_telemetry_gnmi with gNMI interface on Arista #6391

Closed
dgarros opened this issue Sep 13, 2019 · 7 comments · Fixed by #6403
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@dgarros
Copy link

dgarros commented Sep 13, 2019

I'm getting some issue while testing the input plugin cisco_telemetry_gnmi with an arista device.
The plugin is able to open the session but it's having some issue to read the data

2019-09-13T12:39:07Z D! [outputs.file] Could not serialize metric: invalid name
2019-09-13T12:39:07Z D! [outputs.file] Could not serialize metric: invalid name
2019-09-13T12:39:07Z D! [outputs.file] Could not serialize metric: invalid name

Since gNMI is a standard interface, it would expect it that to work.

Relevant telegraf.conf:

[[inputs.cisco_telemetry_gnmi]]
    [[inputs.cisco_telemetry_gnmi.subscription]]
        origin = "openconfig-interfaces"
        path = "/interfaces"
        # Subscription mode (one of: "target_defined", "sample", "on_change") and interval
        subscription_mode = "target_defined"
        sample_interval = "10s"

System info:

  • Telegraf 1.11.4
  • Mac OS 10.14.6
  • Arista EOS 4.21.1F

Steps to reproduce:

Configure gRPC on Arista device
Start telegraf

Expected behavior:

Since gNMI is a standard interface, the plugin should be able to read the metrics

Actual behavior:

the plugin is reporting some serialization issues

2019-09-13T12:39:07Z D! [outputs.file] Could not serialize metric: invalid name
2019-09-13T12:39:07Z D! [outputs.file] Could not serialize metric: invalid name
2019-09-13T12:39:07Z D! [outputs.file] Could not serialize metric: invalid name
2019-09-13T12:39:07Z D! [outputs.file] Could not serialize metric: invalid name
2019-09-13T12:39:07Z D! [outputs.file] Could not serialize metric: invalid name

Arista Configuration

management api gnmi
   transport grpc TELEMETRY
      port 3333
      vrf MGMT
@danielnelson
Copy link
Contributor

This error can be triggered when the measurement name is the empty string "". Can you try setting name = "interfaces" to verify this is the issue?

[[inputs.cisco_telemetry_gnmi]]
    [[inputs.cisco_telemetry_gnmi.subscription]]
        name = "interfaces"
        origin = "openconfig-interfaces"
        path = "/interfaces"
        # Subscription mode (one of: "target_defined", "sample", "on_change") and interval
        subscription_mode = "target_defined"
        sample_interval = "10s"

@dgarros
Copy link
Author

dgarros commented Sep 16, 2019

@danielnelson unfortunately the issue is the same when i configure name as well

@danielnelson
Copy link
Contributor

Do you only have this single subscription? If so you can try a more heavy handed name_override which will modify all metrics from the entire plugin.

[[inputs.cisco_telemetry_gnmi]]
  name_override = "interfaces"

  [[inputs.cisco_telemetry_gnmi.subscription]]
    name = "interfaces"
    origin = "openconfig-interfaces"
    path = "/interfaces"
    # Subscription mode (one of: "target_defined", "sample", "on_change") and interval
    subscription_mode = "target_defined"
    sample_interval = "10s"

@sbyx Can you take a look into what might be causing this?

@sbyx
Copy link
Contributor

sbyx commented Sep 17, 2019

Investigating on this one, I think I can reproduce this on another platform too.

@dgarros
Copy link
Author

dgarros commented Sep 17, 2019

I got something when i used name_override=interfaces

interfaces,host=damiens-mbp.lan,name=Management1,source=arista1.lab.com /interfaces/interface/state/counters/out_unicast_pkts=24190i 1568414799237685250
interfaces,host=damiens-mbp.lan,name=Management1,source=arista1.lab.com /interfaces/interface/state/counters/in_octets=3290053i 1568414799237685250
interfaces,host=damiens-mbp.lan,name=Management1,source=arista1.lab.com /interfaces/interface/state/counters/out_unicast_pkts=24188i 1568414798233622500
interfaces,host=damiens-mbp.lan,name=Management1,source=arista1.lab.com /interfaces/interface/state/counters/in_unicast_pkts=32770i 1568414798233622500
interfaces,host=damiens-mbp.lan,name=Management1,source=arista1.lab.com /interfaces/interface/state/counters/in_octets=3289825i 1568414798233622500
interfaces,host=damiens-mbp.lan,name=Management1,source=arista1.lab.com /interfaces/interface/state/counters/out_octets=3984589i 1568414798233622500

@sbyx let me know if I can help, if needed i can give you access to my setup

@danielnelson
Copy link
Contributor

@dgarros Would you be able to test with the code in #6403?

@dgarros
Copy link
Author

dgarros commented Sep 20, 2019

@danielnelson @sbyx I tested the fix in #6403 and I can confirm it's working as expected for me.
I'm able to collect interfaces stat from arista over gNMI without name or name_override defined
Thanks for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants