Git Product home page Git Product logo

Comments (9)

karimra avatar karimra commented on August 16, 2024

You are missing the --encoding flag. you can either pass it as a flag or part of the config file.

from gnmic.

arbabali999 avatar arbabali999 commented on August 16, 2024

As I mentioned earlier, when I passed --encoding as flag with get, it still showed same error.

from gnmic.

karimra avatar karimra commented on August 16, 2024

can you show an example of how you did that ?

from gnmic.

arbabali999 avatar arbabali999 commented on August 16, 2024

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.

karimra avatar karimra commented on August 16, 2024

you should check with Juniper which encodings are supported

from gnmic.

hellt avatar hellt commented on August 16, 2024

Afair Juniper didn't play well with get requests; users were forced to use subscribe rpc

from gnmic.

arbabali999 avatar arbabali999 commented on August 16, 2024

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.

karimra avatar karimra commented on August 16, 2024

you can set the encoding per subscription: https://gnmic.openconfig.net/user_guide/subscriptions/#file-based-subscription-config

from gnmic.

arbabali999 avatar arbabali999 commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.