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 TIG
Add an additional sensor-path which exports the number of routes in the RIB from ISIS 1.
Answer
telemetry model-driven
sensor-group SENSOR1
sensor-path Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf[vrf-name="default"]/afs/af[af-name="IPv4"]/safs/saf[saf-name="Unicast"]/ip-rib-route-table-names/ip-rib-route-table-name[route-table-name="default"]/protocol/isis/as[as='1']/information
Explanation
This is quite tricky. First, I found a YANG model for the IPv4 RIB using the following tool:
yang-describe operational show route
This gave me:
Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/routes/route
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:
from(bucket: "telemetry")
|> range(start: v.timeRangeStart, stop:v.timeRangeStop)
|> filter(fn: (r) =>
r._measurement == "Cisco-IOS-XR-ip-rib-ipv4-oper:rib/vrfs/vrf/afs/af/safs/saf/ip-rib-route-table-names/ip-rib-route-table-name/protocol/isis/as/information" and
r._field == "active_routes_count"
)
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.