openconfig / gnmic

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

gNMIc is unable to scrape data on Port 9273 #528

Open arbabali999 opened 2 weeks ago

arbabali999 commented 2 weeks ago

Hi,

I have successfully integrated Nokia and Juniper Routers with gnmic and successfully visualizing telemetry stats on Grafana. But with Huawei, i am unable to scrap data on port 9273 for Prometheus, hence, i am not able to visualize it on Grafana.

gnmic.yml:

10.1.1.1: username: admin password: admin subscriptions:

subscriptions: dplc_interface_stats: paths:

Result:

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

2024/10/10 11:11:49.187280 /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 [ { "source": "10.1.1.1:57400", "timestamp": 1728540709375863000, "time": "2024-10-10T11:11:49.375863+05:00", "updates": [ { "Path": "openconfig-interfaces:interfaces/interface[name=100GE1/0/2]/state/counters", "values": { "openconfig-interfaces:interfaces/interface/state/counters": { "in-broadcast-pkts": "3753", "in-discards": "0", "in-errors": "2252", "in-fcs-errors": "1595", "in-multicast-pkts": "12466908", "in-octets": "8740684804016284", "in-unicast-pkts": "17446988040687", "in-unknown-protos": "0", "last-clear": "1724223418253000000", "out-broadcast-pkts": "3396", "out-discards": "28727127", "out-errors": "0", "out-multicast-pkts": "15091273", "out-octets": "23302406015041723", "out-unicast-pkts": "20895639374896" } } } ] } ]

Here i can see the statistics but they are not scrapping on port 9273 i.e., gnmic.:9273/metrics where Nokia and Juniper stats are successfully exposing. Refer below snapshot.

image

Note: I have hide the device IPs that are scrapping data successfully for security reasons.

Can you please assist in resolving the issue.

hellt commented 2 weeks ago

your path in the gnmic config differs from the one you use in the cli example

Try removing the leading forward slash:

paths:
- "openconfig-interfaces:/interfaces/interface[name=100GE1/0/2]/state/counters"
arbabali999 commented 2 weeks ago

That doesn't seem to be the issue, but I replicated the it regardless, and the problem still persists.