Comments (9)
You are missing the --encoding flag. you can either pass it as a flag or part of the config file.
from gnmic.
As I mentioned earlier, when I passed --encoding as flag with get, it still showed same error.
from gnmic.
can you show an example of how you did that ?
from gnmic.
PFB.
gnmic -a 10.1.1.1:57400 -u admin -p admin --encoding proto get --path /interfaces/interface/state/counters -d --insecure
2024/04/25 10:37:42.599834 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created
2024/04/25 10:37:42.599884 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING
2024/04/25 10:37:42.599961 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel exiting idle mode
2024/04/25 10:37:42.600025 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING
2024/04/25 10:37:42.600072 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "10.1.1.1:57400" to connect
2024/04/25 10:37:42.600225 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000ad28a0] Received SubConn state update: 0xc000ad2a20, {ConnectivityState:CONNECTING ConnectionError:}
2024/04/25 10:37:42.602102 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY
2024/04/25 10:37:42.602199 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000ad28a0] Received SubConn state update: 0xc000ad2a20, {ConnectivityState:READY ConnectionError:}
2024/04/25 10:37:42.602256 /home/runner/go/pkg/mod/google.golang.org/[email protected]/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY
2024/04/25 10:37:43.425883 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "10.1.1.1:57400" get request failed: "10.1.1.1:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
2024/04/25 10:37:43.425972 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "10.1.1.1:57400" Get request failed: "10.1.1.1:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
target "10.1.1.1:57400" get request failed: "10.1.1.1:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
target "10.1.1.1:57400" Get request failed: "10.1.1.1:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
Error: one or more requests failed
from gnmic.
you should check with Juniper which encodings are supported
from gnmic.
Afair Juniper didn't play well with get requests; users were forced to use subscribe rpc
from gnmic.
So, if i use encoding in config file, will it impact Nokia Routers as well because it is visualizing successfully for Nokia Routers.
from gnmic.
you can set the encoding per subscription: https://gnmic.openconfig.net/user_guide/subscriptions/#file-based-subscription-config
from gnmic.
Yes, get doesn't work with Juniper. I used encoding in config file and it start scrapping data to Prometheus.
subscriptions:
junos_interface_stats:
paths:
- "/interfaces/interface[name=et-1/1/0]/state/counters"
mode: stream
stream-mode: TARGET_DEFINED
sample-interval: 5s
encoding: proto
Thanks.
from gnmic.
Related Issues (20)
- .
- Broken Connection Event/Alert HOT 2
- consul:latest should be hashicorp/consul:latest
- Getting error "String field 'gnmi.PathElem.key' contains invalid UTF-8 data when serializing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes." HOT 1
- Facing missing port in address error with gnmic version 0.36.2 for Dial out streaming HOT 1
- how to intall the gnmic wihtout the sudo permissions HOT 1
- after copying the file when installing it is asking for the root permissions . how do i bypass this HOT 2
- Unable to integrate Huawei Devices with gNMIc HOT 1
- Question: How to use set command to disable interface HOT 4
- The output of set-request command is missing objects. HOT 3
- gnmic get always returns value "null" HOT 6
- Question: How to add common output file for set commands in config file? HOT 1
- Poll implementation might be non-compliant with the gNMI specification HOT 1
- IANA defined port 9339 for gNMI / gNOI is not used as default port HOT 4
- Environment expansion does not always work HOT 3
- Error : Maximum number of EOS subscribe requests reached HOT 1
- Influx supported version HOT 1
- event-strings transforms not working correctly (string to int, juniper router) HOT 1
- Junos CRPD set error on YAML file format when network-instance name is upper case HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnmic.