Skip to content

Instantly share code, notes, and snippets.

@nabeken
Created October 16, 2009 04:21
Show Gist options
  • Save nabeken/211556 to your computer and use it in GitHub Desktop.
Save nabeken/211556 to your computer and use it in GitHub Desktop.
[quagga_*]
user root
env.as_number ${YOUR_AS_NUMBER}
#!/bin/sh
#
# Magick markers (optional):
#%# family=auto
#%# capabilities=autoconf
if [ "$1" = "autoconf" ]; then
echo no
exit 0
fi
if [ "$1" = "config" ]; then
echo "graph_title IHANet BGP peering overview (AS ${as_number})"
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel prefixes advertised from IHANet'
echo 'graph_category ihanet'
echo 'prefixes.label prefixex'
echo 'neighbors.label neighbors'
exit 0
fi
echo prefixes.value `vtysh --command 'sh ipv6 bgp' | grep prefixes | cut -d' ' -f 5`
echo neighbors.value `vtysh --command 'sh ipv6 bgp sum' | grep neighbors | cut -d' ' -f 5`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment