-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Hi,
I'm using gnmic 0.42.1 on Debian 13.
I'm trying to subscribe to a counter of a Cisco C8300-1N1S-6T router running IOS 17.12.04
I'm collecting the values inside a file.
Everything works fine when I fetch a "standard parameter":
gnmic sub --output output1 --sample-interval 10s --stream-mode sample --path '/interfaces/interface[name=GigabitEthernet0/0/0]/state/counters/in-octets'
Every 10 seconds I get a value added to the output file:
{"source":"ce1","subscription-name":"default-1765786719","timestamp":1765786798889528000,"time":"2025-12-15T09:19:58.889528+01:00","updates":[{"Path":"interfaces/interface[name=GigabitEthernet0/0/0]/state/counters/in-octets","values":{"interfaces/interface/state/counters/in-octets":"119277205"}}]}
I need to fetch a specific counter from a Cisco Yang model. I first try to get it:
% gnmic get --path 'rfc7951:/qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts'
[
{
"source": "ce1",
"timestamp": 1765786904984406302,
"time": "2025-12-15T09:21:44.984406302+01:00",
"updates": [
{
"Path": "rfc7951:Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data/location[bay=0][chassis=-1][fru=fru-fp][node=0][slot=0]/datapath-qfp-stats/ipsec-input-pkts",
"values": {
"Cisco-IOS-XE-qfp-stats-oper:qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts": "18"
}
}
]
}
]
I then try to subscibre to the same counter:
% gnmic --debug sub --output output1 --sample-interval 10s --stream-mode sample --path 'rfc7951:/qfp-stats-oper-data/location/datapath-qfp-stats/ipsec-input-pkts'
Nothing is collected inside the output file.
I traced at the IP level with tshark and I see that packets are received from the router every 10 seconds.
Any idea ?
Thanks, Damien.