openconfig / gnmic

gNMIc is a gNMI CLI client and collector
https://gnmic.openconfig.net
Apache License 2.0
166 stars 52 forks source link

Unable to integrate Huawei Devices with gNMIc #451

Closed arbabali999 closed 1 month ago

arbabali999 commented 1 month ago

I have successfully integrated Nokia and Juniper Routers with gnmic and successfully visualizing telemetry stats on Grafana. But with Huawei, i am unable to retrieve any data using get command, hence, it's not working using subscription as well. PFB for reference.

gnmic -a 10.1.1.1:57400 -u admin -p admin--insecure -d get --path get --path openconfig-interfaces:/interfaces/interface[name=100GE1/0/3]/state/counters

2024/05/31 16:38:26.341489 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created 2024/05/31 16:38:26.341532 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING 2024/05/31 16:38:26.341615 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel exiting idle mode 2024/05/31 16:38:26.341724 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING 2024/05/31 16:38:26.341814 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "10.1.1.1:57400" to connect 2024/05/31 16:38:26.341927 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000918ba0] Received SubConn state update: 0xc000918d20, {ConnectivityState:CONNECTING ConnectionError:} 2024/05/31 16:38:26.350735 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY 2024/05/31 16:38:26.350826 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000918ba0] Received SubConn state update: 0xc000918d20, {ConnectivityState:READY ConnectionError:} 2024/05/31 16:38:26.350884 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY 2024/05/31 16:38:27.653761 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "10.1.1.1:57400:57400" get request failed: "10.1.1.1:57400" GetRequest failed: rpc error: code = Unimplemented desc = Field 'origin' not implemented.

sudo systemctl status gnmic.service
◠gnmic.service - gNMIc Service Loaded: loaded (/etc/systemd/system/gnmic.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2024-05-31 15:30:56 PKT; 1h 10min ago Main PID: 23874 (gnmic) Tasks: 14 (limit: 9427) Memory: 35.0M CPU: 10min 42.474s CGroup: /system.slice/gnmic.service └─23874 /usr/local/bin/gnmic --debug --config /home/gnmi/gnmic.yml subscribe

gnmic.yml:

port: 57400 timeout: 10s insecure: true

targets: 10.1.1.1: username: admin password: admin subscriptions:

subscriptions: huawei_interface_stats: paths:

outputs: prom: type: prometheus listen: :9273 path: /metrics metric-prefix: gnmic append-subscription-name: true export-timestamps: true debug: false

gnmic version version : 0.35.1 commit : 91f4205 date : 2024-01-25T21:10:47Z gitURL : https://github.com/openconfig/gnmic docs : https://gnmic.openconfig.net

sudo gnmic -a 10.1.1.1:57400 --insecure -u admin -p admin -d capabilities

2024/05/31 12:39:50.464223 /home/runner/work/gnmic/gnmic/pkg/app/app.go:227: [gnmic] version=0.35.1, commit=91f4205, date=2024-01-25T21:10:47Z, gitURL=https://github.com/openconfig/gnmic, docs=https://gnmic.openconfig.net 2024/05/31 12:39:50.464373 /home/runner/work/gnmic/gnmic/pkg/app/app.go:232: [gnmic] using config file "" 2024/05/31 12:39:50.466803 /home/runner/work/gnmic/gnmic/pkg/app/app.go:270: [gnmic] set flags/config: address: 10.1.1.1:57400 api: "" auth-scheme: "" calculate-latency: false capabilities-version: false cluster-name: default-cluster config: "" debug: true diff-compare: [] diff-model: [] diff-path: [] diff-prefix: "" diff-qos: "0" diff-ref: "" diff-set-to-notifs-full: false diff-set-to-notifs-response: "" diff-set-to-notifs-setrequest: "" diff-setrequest-full: false diff-setrequest-new: "" diff-setrequest-ref: "" diff-sub: false diff-target: "" diff-type: ALL dir: [] encoding: proto exclude: [] file: [] format: "" generate-camel-case: false generate-config-only: false generate-path: "" generate-snake-case: false get-model: [] get-path: [] get-prefix: "" get-processor: [] get-target: "" get-type: ALL get-values-only: false getset-condition: any([true]) getset-delete: "" getset-get: "" getset-model: [] getset-prefix: "" getset-replace: "" getset-target: "" getset-type: ALL getset-update: "" getset-value: "" gzip: false insecure: true instance-name: "" listen-max-concurrent-streams: "256" listen-prometheus-address: "" log: true log-file: "" log-tls-secret: false max-msg-size: 536870912 metadata: {} no-prefix: false password: admin path-config-only: false path-descr: false path-path-type: xpath path-search: false path-state-only: false path-types: false path-with-non-leaves: false path-with-prefix: false port: "57400" print-request: false processors-plugins-path: "" prompt-description-bg-color: dark_gray prompt-description-with-prefix: false prompt-description-with-types: false prompt-max-suggestions: "10" prompt-prefix-color: dark_blue prompt-suggest-all-flags: false prompt-suggest-with-origin: false prompt-suggestions-bg-color: dark_blue proto-dir: [] proto-file: [] proxy-from-env: false retry: 10s set-delete: [] set-delimiter: ':::' set-dry-run: false set-prefix: "" set-replace: [] set-replace-cli: [] set-replace-cli-file: "" set-replace-file: [] set-replace-path: [] set-replace-value: [] set-request-file: [] set-request-replace: [] set-request-update: [] set-request-vars: "" set-target: "" set-union-replace: [] set-union-replace-file: [] set-union-replace-path: [] set-union-replace-value: [] set-update: [] set-update-cli: [] set-update-cli-file: "" set-update-file: [] set-update-path: [] set-update-value: [] skip-verify: false subscribe-backoff: 0s subscribe-heartbeat-interval: 0s subscribe-history-end: "" subscribe-history-snapshot: "" subscribe-history-start: "" subscribe-lock-retry: 5s subscribe-mode: stream subscribe-model: [] subscribe-name: [] subscribe-output: [] subscribe-path: [] subscribe-prefix: "" subscribe-qos: "0" subscribe-quiet: false subscribe-sample-interval: 0s subscribe-set-target: false subscribe-stream-mode: target-defined subscribe-suppress-redundant: false subscribe-target: "" subscribe-updates-only: false subscribe-watch-config: false targets-file: "" timeout: 10s tls-ca: "" tls-cert: "" tls-key: "" tls-max-version: "" tls-min-version: "" tls-server-name: "" tls-version: "" token: "" upgrade-use-pkg: false use-tunnel-server: false username: admin

2024/05/31 12:39:50.468299 /home/runner/work/gnmic/gnmic/pkg/app/app.go:280: [gnmic] address='[10.1.1.1:57400]'([]string) 2024/05/31 12:39:50.468359 /home/runner/work/gnmic/gnmic/pkg/app/app.go:280: [gnmic] debug='true'(bool) 2024/05/31 12:39:50.468414 /home/runner/work/gnmic/gnmic/pkg/app/app.go:280: [gnmic] encoding='proto'(string) 2024/05/31 12:39:50.468550 /home/runner/work/gnmic/gnmic/pkg/app/app.go:280: [gnmic] insecure='true'(bool) 2024/05/31 12:39:50.468613 /home/runner/work/gnmic/gnmic/pkg/app/app.go:280: [gnmic] password='admin'(string) 2024/05/31 12:39:50.468810 /home/runner/work/gnmic/gnmic/pkg/app/app.go:280: [gnmic] username='admin'(string) 2024/05/31 12:39:50.468895 /home/runner/work/gnmic/gnmic/pkg/config/config.go:386: [config] cmd=capabilities, flagName=help, changed=false, isSetInFile=false 2024/05/31 12:39:50.469002 /home/runner/work/gnmic/gnmic/pkg/config/config.go:386: [config] cmd=capabilities, flagName=version, changed=false, isSetInFile=false 2024/05/31 12:39:50.469071 /home/runner/work/gnmic/gnmic/pkg/config/targets.go:47: [config] targets: map[10.1.1.1:57400:{"name":"10.1.1.1:57400","address":"10.1.1.1:57400","username":"admin","password":"****","timeout":10000000000,"insecure":true,"skip-verify":false,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""}] 2024/05/31 12:39:50.469374 /home/runner/work/gnmic/gnmic/pkg/app/capabilities.go:76: [gnmic] sending gNMI CapabilityRequest: gnmi_ext.Extension='[]' to 10.1.1.1:57400 2024/05/31 12:39:50.469437 /home/runner/work/gnmic/gnmic/pkg/app/app.go:523: [gnmic] creating gRPC client for target "10.1.1.1:57400" 2024/05/31 12:39:50.469722 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel created 2024/05/31 12:39:50.469791 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] original dial target is: "10.1.1.1:57400" 2024/05/31 12:39:50.469835 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] dial target "10.1.1.1:57400" parse failed: parse "10.1.1.1:57400": first path segment in URL cannot contain colon 2024/05/31 12:39:50.469866 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] fallback to scheme "passthrough" 2024/05/31 12:39:50.469910 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] parsed dial target is: passthrough:///10.1.1.1:57400 2024/05/31 12:39:50.469942 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel authority set to "10.1.1.1:57400" 2024/05/31 12:39:50.470289 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Resolver state updated: { "Addresses": [ { "Addr": "10.1.1.1:57400", "ServerName": "", "Attributes": null, "BalancerAttributes": null, "Metadata": null } ], "Endpoints": [ { "Addresses": [ { "Addr": "10.1.1.1:57400", "ServerName": "", "Attributes": null, "BalancerAttributes": null, "Metadata": null } ], "Attributes": null } ], "ServiceConfig": null, "Attributes": null } (resolver returned new addresses) 2024/05/31 12:39:50.470453 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel switches to new LB policy "pick_first" 2024/05/31 12:39:50.470564 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc00066bcb0] Received new config { "shuffleAddressList": false }, resolver state { "Addresses": [ { "Addr": "10.1.1.1:57400", "ServerName": "", "Attributes": null, "BalancerAttributes": null, "Metadata": null } ], "Endpoints": [ { "Addresses": [ { "Addr": "10.1.1.1:57400", "ServerName": "", "Attributes": null, "BalancerAttributes": null, "Metadata": null } ], "Attributes": null } ], "ServiceConfig": null, "Attributes": null } 2024/05/31 12:39:50.470693 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created 2024/05/31 12:39:50.470726 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING 2024/05/31 12:39:50.470789 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel exiting idle mode 2024/05/31 12:39:50.470866 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING 2024/05/31 12:39:50.470949 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "10.1.1.1:57400" to connect 2024/05/31 12:39:50.470991 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc00066bcb0] Received SubConn state update: 0xc00066be30, {ConnectivityState:CONNECTING ConnectionError:} 2024/05/31 12:39:50.480176 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY 2024/05/31 12:39:50.480236 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc00066bcb0] Received SubConn state update: 0xc00066be30, {ConnectivityState:READY ConnectionError:} 2024/05/31 12:39:50.480275 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY gNMI version: 0.7.0 supported models:

Please assist.

hellt commented 1 month ago

from the log: GetRequest failed: rpc error: code = Unimplemented desc = Field 'origin' not implemented.

ask your huawei representative how they deal with openconfig