I’m using bird on my routers for a few years now, and every time I setup a new router I add these shell functions to help me monitor and debug network issues:
function bgp_states {
for i in $(birdc show protocols|sed ’s/\s\+/|/g’|grep BGP); do
a=(${i//|/ })
[...]