```
exit1-debian-9# sh ip bgp vrf all statistics json
{
"ipv4Unicast":[
{
"instance":"VRF default",
"totalAdvertisements":2,
"totalPrefixes":2,
"averagePrefixLength":24,
"unaggregateablePrefixes":2,
"maximumAggregateablePrefixes":0,
"bgpAggregateAdvertisements":0,
"addressSpaceAdvertised":512,
"%announced":1.
1920928955078125e-05,
"\/8equivalent":3.
0517578125e-05,
"\/24equivalent":2,
"advertisementsWithPaths":2,
"longestAsPath":0,
"averageAsPathLengthHops":0,
"largestAsPath":0,
"averageAsPathSizeBytes":0,
"highestPublicAsn":0
},
{
"instance":"VRF testas",
"totalAdvertisements":0,
"totalPrefixes":0,
"averagePrefixLength":0,
"unaggregateablePrefixes":0,
"maximumAggregateablePrefixes":0,
"bgpAggregateAdvertisements":0,
"addressSpaceAdvertised":0,
"%announced":0,
"\/8equivalent":0,
"\/24equivalent":0,
"advertisementsWithPaths":0,
"longestAsPath":0,
"averageAsPathLengthHops":0,
"largestAsPath":0,
"averageAsPathSizeBytes":0,
"highestPublicAsn":0
}
]
}
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
}
if (!json)
- vty_out(vty, "BGP %s RIB statistics\n",
- get_afi_safi_str(afi, safi, false));
+ vty_out(vty, "BGP %s RIB statistics (%s)\n",
+ get_afi_safi_str(afi, safi, false), bgp->name_pretty);
+ else
+ json_object_string_add(json, "instance", bgp->name_pretty);
/* labeled-unicast routes live in the unicast table */
if (safi == SAFI_LABELED_UNICAST)