-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I'm using gnmi-gateway (details below)
./gnmi-gateway --version
gnmi-gateway version v0.11.1-002a9b0 (Built 2021-08-23T22:15:23Z)
I'm trying to figure out how to translate an Openconfig path into my configuration.
If I use gnmic tool as follows :
root@XXXX-XXXX-logs:~# gnmic -a <hostname>:6030 -u <user> -p <password> --insecure subscribe --path "/interfaces/interface/state/counters" --stream-mode on_change > output.txt
^Croot@XXXX-XXXX-logs:~# tail output.txt
{
"Path": "interfaces/interface[name=Management1]/state/counters/out-unicast-pkts",
"values": {
"interfaces/interface/state/counters/out-unicast-pkts": 237966235
}
}
]
}
You can see I get output
In my gnmi-gateway configuration file
{
"request": {
"default": {
"subscribe": {
"prefix": {
},
"subscription": [
{
"path": {
"elem": [
{
"name": "/interfaces/interface/state/counters"
}
]
}
}
]
}
}
},
"target": {
"<host>": {
"addresses": [
"<host>:6030"
],
"credentials": {
"username": "xxxxxx",
"password": "xxxxxx"
},
"request": "default",
"meta": {
"NoTLSVerify": "yes"
}
}
}
}
When using that same path I get
{"level":"info","time":"2021-08-23T18:22:58-07:00","message":"Target <host>.gh.st: Disconnected"}
E0823 18:22:58.050605 71921 reconnect.go:114] client.Subscribe (target "<host>.st") failed: rpc error: code = InvalidArgument desc = failed to subscribe to /\/interfaces\/interface\/state\/counters: path invalid: failed to access node "/interfaces/interface/state/counters" in node ""; reconnecting in 1.040217184s
INFO: 2021/08/23 18:22:58 [transport] transport: loopyWriter.run returning. connection error: desc = "transport is closing"
Can you advise how I use more specific paths ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels