openbgpd-snmp ----------------------------------------------------------- This script is a Net-SNMP extension providing OpenBGPD statistics for remote use (network monitoring systems, creating graphs, etc.) You need: * OpenBGPD running on the local machine * Functional Net-SNMP installation To use this script: * Copy openbgpd-snmp to /usr/local/sbin/ (or whatever location you are comfortable with, just change it in the next step too) * Add this line to your snmpd.conf: pass_persist .1.3.6.1.4.1.99999.1 /usr/local/sbin/openbgpd-snmp * Restart your snmpd After that, you should be able to test if it works by issuing: snmpwalk -v2c -c .1.3.6.1.4.1.99999.1 If you need to change the base OID (.1.3.6.1.4.1.99999.1), you need to also change it in the script, otherwise it won't work. This number is chosen the same as the one used by quagga-snmp, in order to provide compatibility for users switching from quagga's bgpd to openbgpd and vice versa. The structure of the data returned is also kept as close as possible to quagga-snmp. Statistics provided: * General BGP statistics: .1 = number of total peers configured .2 = number of peers currently active .3 = number of RDE AS-PATH entries .5 = number of total prefixes received from peers .10 = number of RDE prefix entries .11 = number of RDE BGP path attribute entries .12 = number of RDE BGP AS-PATH attribute entries .13 = number of RDE BGP attributes entries .14 = number of RDE BGP attributes * Per-peer statistics: .....1 = IP address (=a.b.c.d) .....2 = state (0=down, 1=up) .....3 = AS number .....4 = number of prefixes received .....5 = uptime / downtime where ... is the IP address of the BGP peer. Any suggestions / comments should go to root@net1.cc