I am looking for a way to graph the bgp route counts and bgp table prefix count on our cisco routers and I can't seem to locate an oid for this value . . . perhaps there isn't one. I could grab the whole table and count it -- but that uses a huge amount of cpu and bandwidth. Just wondering if anyone else has ever tried doing this.
Thanks -- sjk
Cisco Route Graph
Moderators: Developers, Moderators
- pestilence
- Cacti User
- Posts: 207
- Joined: Fri Jul 25, 2003 10:37 am
- Location: Athens/Greece
- Contact:
Unfortunatelly there does not exist a routing (at least BGP which i checked) MIB for routing information, there are only some MIBS to show you the information exchanged between the 2 peers, but there isn't a MIB to show you the total ammount of networks exchanged between the 2 peers...Most people have implemented telnet-scripts for this...
Slightly off topic, but if you would be so kind as to tell me some more about those telnet scripts I would be more than grateful.
Best regards,
Rune Nilssen
www.directconnect.no
Best regards,
Rune Nilssen
www.directconnect.no
It's possible without telnet scripts
If you have snmp turned on in your cisco router, you should be able to do:
snmpwalk -Os -c yourcommunityname -v 1 yourciscobox ipRouteDest | wc -l
inside of a script. But there really isn't an OID that gives you that count.
If you want to then use that value within cacti, then put the command into a script, and put it under /usr/share/cacti/site/scripts/
and then setup a query according to the instructions here:
http://docs.cacti.net/node/296
I've done that, and works quite nicely, except if you have a lot of bgp peers(like over 1000), then the script takes too long to execute and causes gaps in the graphs. So to get around that. I run the above in a cron job and redirect the output to a file, then my cacti script simply reads that file. Definitely ugly cause there's multiple points of failure, but best way I've found so far.
-T
snmpwalk -Os -c yourcommunityname -v 1 yourciscobox ipRouteDest | wc -l
inside of a script. But there really isn't an OID that gives you that count.
If you want to then use that value within cacti, then put the command into a script, and put it under /usr/share/cacti/site/scripts/
and then setup a query according to the instructions here:
http://docs.cacti.net/node/296
I've done that, and works quite nicely, except if you have a lot of bgp peers(like over 1000), then the script takes too long to execute and causes gaps in the graphs. So to get around that. I run the above in a cron job and redirect the output to a file, then my cacti script simply reads that file. Definitely ugly cause there's multiple points of failure, but best way I've found so far.
-T
Who is online
Users browsing this forum: No registered users and 0 guests