Telegraf failing to make gnmi subscription request - [inputs.gnmi] Error in plugin: aborted gNMI subscription: rpc error: code = InvalidArgument desc = subscribe request contains unknown origin

Here is the config I am using in Telegraf instance

[[inputs.gnmi]]
addresses = [“172.20.201.110:5900”]
username = “admin”
password = “admin”

[[inputs.gnmi.subscription]]
name = “interfaces_counters”
origin = “openconfig-interfaces”
path = “/interfaces/interface/state/counters”
subscription_mode = “sample”
sample_interval = “10s”
heartbeat_interval = “60s”

Below log shows - aborted gNMI subscription: rpc error: code = InvalidArgument desc = subscribe request contains unknown origin

2024-02-28T12:54:11Z I! Available plugins: 228 inputs, 9 aggregators, 26 processors, 21 parsers, 57 outputs, 2 secret-stores
2024-02-28T12:54:11Z I! Loaded inputs: gnmi
2024-02-28T12:54:11Z I! Loaded aggregators:
2024-02-28T12:54:11Z I! Loaded processors:
2024-02-28T12:54:11Z I! Loaded secretstores:
2024-02-28T12:54:11Z I! Loaded outputs: http prometheus_client
2024-02-28T12:54:11Z I! Tags enabled: host=netengtgrafa01 hostname=$HOST_NAME location=VA neteng-role=telegraf-monitor-v2 operating_system=linux sbu=Systems-Infrastructure
2024-02-28T12:54:11Z I! [agent] Config: Interval:1s, Quiet:false, Hostname:“netengtgrafa01”, Flush Interval:10s
2024-02-28T12:54:11Z I! [outputs.prometheus_client] Listening on http://[::]:10998/metrics
2024-02-28T12:54:11Z E! [inputs.gnmi] Error in plugin: aborted gNMI subscription: rpc error: code = InvalidArgument desc = subscribe request contains unknown origin
^C

Hello @Vindsap
The error suggests that the origin value openconfig-interfaces is not recognized. This could be due to a typo, incorrect value, or the target device not supporting the specified origin. Double-check the value and compare it against the documentation or capabilities of the target device to ensure it is correct. You can send a Capabilities request to the gNMI target to get a list of supported models and origins. This will let you verify whether the openconfig-interfaces origin is supported. If it’s not listed, you’ll need to adjust your subscription request to match the supported origins and models.

Maybe also look into gRPC version compatibility between what is running in Telegraf and what is running on the network device?

Capabilities are supported. someone I am unable to pull the gRPC version on the device & on telegraf instance. I am using a Arista EOS device. Telegraf version is 1.25

@Anaisdg This issue is resolved after changing path “openconfig-interfaces” to “openconfig”. However I have new issue now writing the output to influx DB from Telegraf. Timestamp is always constant doesn’t change in sample method, also influxDB not recognizing old timestamp and write is failing to influx DB.

How do we fix the timestamp issue ?, gNMI streams having the constant old timestamp i.e event timestamp on the device. is there any alternative to fix this ?

This is the output
openconfig-status,device_role=Leaf-Switch,host=netengtgrafa01,name=Management1,source=172.20.201.110 oper_status=“DOWN” 1709809366256477190
.
Thank you,