This daemon collects IPv4/IPv6 routing information and tracks the historical attributes. Routing updates may also have attributes aliased to become (graph) readable. This function exists to allow the exporting of RIB updates to splunk, or any such data collector.
A beneficial side-effect of collecting BGP routing information is the ability to track BGP updates/events local or remote(upstream). To analyze events splunk is supported. A JSON/TCP socket/msgpack API is currently under development.
Custom graphs can be easily implemented if taken the time to do so. There's certainly no need to rely on splunk if one developed another way of displaying data. This project is meant to be nothing more than a route collector, and it's interface is solely CLI(command line interface). This project does not have graph data "out of the box".
On large-scale networks, this daemon may serve as a BGP routing information base for scripts to harvest network information. This eliminates the need to "screen scrape" output with regex, which always leaves me feeling dirty. A JSON/Socket API is currently under development to serve this purpose.
New capabilities in this revision, and 1 bug fix. I've decided to use the daemons current binary database as a means of indexing BGP updates. These entries can be queried via a URL served by the ruby library Sinatra, or directly served via TCP socket API call.
The BGP event database is organized by [peer id|prefix] key pair in the RIB, and that RIB entry holds all indexes for BGP event data. Each prefix may occupy up to 1000 entries. Once the max entry limit is reached (1000 entries), the oldest entries will begin to be overwritten. It's recommended that you export to some log collector if you wish to keep the data.
version.h
.telnet localhost 667
## BGP Looking Glass Socket API example
require 'socket' # Sockets are in standard library
def api_write(cmd)
host = '127.0.0.1'
port = 667
s = TCPSocket.open(host, port)
# Here we need to prepend the string length of the command.
# The API will expect the length first.
s.write(cmd.length.chr+cmd.to_s)
# ret_val is JSON formatted after this read
ret_val = s.read # Read lines from the socket
s.close # Close the socket when done
return ret_val.to_s
end
# Current prefix data
puts("current data for 8.8.8.8 is:")
puts(api_write("api-get prefix 8.8.8.8"))
# Current prefix data, and historical
puts("current & historical data for 8.8.8.8 is:")
puts(api_write("api-get prefix 8.8.8.8 history"))
bgpd
will be deprecated at some point in the future. CLI will be replaced with a configuration language that will allow start-up and run-time configurations via configuration scripts. Yep, CLI is going away.See issues to report issues and check for updates on what is currently being worked.
If you wish to contribute, please fork the repo and contact aaron.hebert@gmail.com if you have any questions.