Encountering challenges when executing gNMI (gRPC Network Management Interface) queries on aggregated Ethernet (AE) interfaces, specifically targeting the path /interfaces/interface[name=ae<>]/subinterfaces/subinterface/state/counters
No output is received from the gNMI query, leading to incomplete or missing data.
# Example
gnmic -a 10.215.1.1 --username labroot --password lab123 --insecure sub --path 'interfaces/interface[name=ae0]/subinterfaces/subinterface/state/counters/' --port 32767 <-- No output is seen after running the above command
The problem arises from attempting to query statistics on aggregated Ethernet interfaces, in Junos releases before 23.3. In earlier releases (before 23.3), if you wish to obtain aggregated data from AE bundles, off-box collectors need to aggregate telemetry statistics from child interfaces forming the bundled AE. Child ifls will stream "parent-ae-name" using which stats from all child ifls making the AE IFL bundle can be aggregated.
For eg:- With AE bundle - ae0 having child IFDs - xe-2/0/0:0 and xe-2/0/0:1
The child ifl data streamed via the IFL sensor will be as follows:-
kv { key:__prefix__, str_value:/interfaces/interface[name='xe-2/0/0:0']/subinterfaces/subinterface[index='0']/ } kv { key:init-time, uint_value:1674469925 } kv { key:state/parent-ae-name, str_value:ae0.0 } kv { key:state/counters/out-octets, uint_value:800 } kv { key:state/counters/out-pkts, uint_value:10 } kv { key:__prefix__, str_value:/interfaces/interface[name='xe-2/0/0:1']/subinterfaces/subinterface[index='0']/ } kv { key:init-time, uint_value:1674469925 } kv { key:state/parent-ae-name, str_value:ae0.0 } kv { key:state/counters/out-octets, uint_value:800 } kv { key:state/counters/out-pkts, uint_value:10 }
So, when some tool in the off-box collector aggregated the data of the above 2 child ifls, for the ae0 ifl we can get the aggregated data as
kv { key:state/counters/out-octets, uint_value:1600 } kv { key:state/counters/out-pkts, uint_value:20 }
The issue with querying aggregated Ethernet interface statistics via gNMI has been addressed in Junos releases 23.3 and above. The streaming of aggregated stats for AE [having ge/xe/et as child] and RLT [having lt as child] interfaces [IFD/IFL] in MX platform was implemented in 23.2 and 23.3. Therefore, from 23.3+ releases, the issue described in this KB will not be seen.
For on-box aggregated data, it is recommended to use Junos releases 23.3 and later. If using older releases, off-box collectors must aggregate telemetry stats from child IFLs forming the aggregated bundle.