Finding the correct YANG model
Configure MDT using the solution from the first lab, if it is not already configured.
#XR1
telemetry model-driven
destination-group TIG
address-family ipv4 10.100.100.1 port 57500
encoding self-describing-gpb
protocol grpc no-tls
!
!
sensor-group SENSOR1
sensor-path Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/generic-counters
!
subscription SUB1
sensor-group-id SENSOR1 sample-interval 5000
destination-id TIGAdd an additional sensor-path which exports the number of routes in the RIB from ISIS 1.
Answer
Explanation
This is quite tricky. First, I found a YANG model for the IPv4 RIB using the following tool:
This gave me:
From here, I found the following tutorial on xrdocs, which I based the path on: https://xrdocs.io/telemetry/tutorials/2016-12-23-streaming-bgp-route-and-neighbor-counts-with-mdt/
I found that I needed to specify the vrf, af-name, saf-name, route-table-name, and ISIS AS.
We can actually get the first four keys from the path that was given from the first yang-describe command.

From here, knowing that there is a /protocol/ path might be difficult. I would not have found that unless I found the xrdocs page.
Use the following Grafana query:
I shutdown XR2’s loopback1 and brought it back up to test that the data stream works. The counter goes from 3, to 2, and back to 3.

Last updated