Graph BGP Neighbors

Background

This Cacti data query makes it easy to graph prefixes in memory, messages rx, and messages tx on Cisco routers. If you are new to Cacti, check it out here: http://www.cacti.net It can be useful to graph BGP tables to get a baseline of usage before a problem strikes. This is especially useful when doing iBGP and eBGP because usage will not always be the same on both. Once a bit of history is collected, it is easy to track down new problems as the crop up.

Download

Cacti Wiki

Cacti Forums

Versioned Code

Architecture

eBGP/iBGP Monitor uses a SNMP Data Query to poll a Cisco router for all BGP Neighbors and provide graphs for them.

    • Prefixes: This is the number of prefixes in memory on the router divide by 1000K to allow easier of viewing with Messages RX/TX on the same graph
    • Messages RX: This is the number of messages that were received over the polling period
    • Messages TX: This is the number of messages that were sent over the polling

period

 

Installation

The following two files are required

  • cacti_ebgp_ibgp.xml: template which is imported in the web interface
  • ebgp_ibgp.xml: snmp data query which resides on the server

Instructions

    • Copy the ebgp_ibgp.xml file to your Cacti server,
      /var/www/html/cacti/resource/snmp_queries/ebgp_ibgp.xml
    • Import the templates in your cacti web interface

Import Templates -> Save

    • Once you save you should see something like this. You can ignore some of the red text.
    • Go to the router you would like to add BGP graphing to and add the data query
    • After adding the data query, click on verbose query to make sure everything is working well
    • You should see output similar to the following

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/web/cacti-test/resource/snmp_queries/ebgp_ibgp.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.15.3.1.5'
+ Index found at OID: '1.3.6.1.2.1.15.3.1.5.172.16.0.2' value: '172.16.0.1'
+ Index found at OID: '1.3.6.1.2.1.15.3.1.5.207.58.228.105' value: '207.58.228.106'
+ index_parse at OID: '1.3.6.1.2.1.15.3.1.5.172.16.0.2' results: '172.16.0.2'
+ index_parse at OID: '1.3.6.1.2.1.15.3.1.5.207.58.228.105' results: '207.58.228.105'
+ Located input field 'bgpIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.15.3.1.5'
+ Found item [bgpIndex='172.16.0.1'] index: 172.16.0.2 [from value]
+ Found item [bgpIndex='207.58.228.106'] index: 207.58.228.105 [from value]
+ Found data query XML file at '/usr/web/cacti-test/resource/snmp_queries/ebgp_ibgp.xml'
+ Found data query XML file at '/usr/web/cacti-test/resource/snmp_queries/ebgp_ibgp.xml'
+ Found data query XML file at '/usr/web/cacti-test/resource/snmp_queries/ebgp_ibgp.xml'
+ Found data query XML file at '/usr/web/cacti-test/resource/snmp_queries/ebgp_ibgp.xml'
+ Found data query XML file at '/usr/web/cacti-test/resource/snmp_queries/ebgp_ibgp.xml'

    • Add the graphs. The link is in the top right corner
    • Finally, after a few minutes you should have a graph that looks similar to this.

5 comments on “Graph BGP Neighbors

    1. So, sadly, I can’t find the code anywhere 🙁 I will be taking this page down. I “might” be able to get the code back. I am going to look in some backups…

        1. So, clearly your github skills are better than mine 😉 I had totally forgot that Google Code exported everything in the “crunchtools” repository. I have updated the link! Thanks for finding that!

Leave a Reply to fatherlinux Cancel reply

Your email address will not be published. Required fields are marked *