Skip to content
CSU's BGP Observatory code (bgpmon/pheme)
Go Other
  1. Go 99.3%
  2. Other 0.7%
Branch: master
Clone or download
WillYingling Merge pull request #27 from CSUNetSec/newCapInsert
Added protobuf to capture translation, changed buffer to a SQLExecutor
Latest commit 891f3ce Jul 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd Added entity write stream May 16, 2019
config Added entity write stream May 16, 2019
db Fixed TimedBuffer issue, Removed buffer add and fixed name issue May 17, 2019
docs Code review fixes Apr 19, 2019
modules Added protobuf to capture translation, changed buffer to a SQLExecutor May 17, 2019
sql Removed v2 directory Feb 15, 2019
util Fixed TimedBuffer issue, Removed buffer add and fixed name issue May 17, 2019
.gitignore Added swap files to gitignore May 10, 2019
.travis.yml enabling go mod and build cache on travis Mar 11, 2019
CONTRIBUTING.md Most code review fixes Apr 30, 2019
LICENSE Updated TODO and moved LICENSE back to the top level Mar 25, 2019
Makefile Fixed tests to run on Travis Feb 20, 2019
README.md Adjusted formatting, fixed opt map issue with periodic Apr 3, 2019
go.mod
module.go Code review fixes Apr 19, 2019
server.go Added entity write stream May 16, 2019

README.md

GoDoc Build Status Go Report Card

BGPmon is a client server application to store and analyze large amounts of BGP data.

Installation

Requirements

  1. Golang > 1.11
  2. make
  3. to store message a db backend (Postgresql >= 9.5)

Running make will create two binaries under bin. To run the daemon, run:

bgpmond conf-file

To succesfully store messages in a database please have a Postgresql with a user that has access to write create tables on a database and reflect that configuration in the config file.

Example client commands

The client works over RPC, so the rpc module must be started in order for the client to work.

To show configured sessions on the server

bgpmon listAvailable sessions

To open a configured session

bgpmon open session LocalPostgres -s sID

To write MRT files

bgpmon write sID mrtFiles...

To close a session

bgpmon close session sID

To see available modules and the options required to run them

bgpmon listAvailable modules

Example config file

DebugOut = "stdout"
ErrorOut = "stderr"

# Sessions represent the possible database backends
[Sessions]
#this will configure an available session named LocalPostgres
[Sessions.LocalPostgres]
Type = "postgres"
Hosts = ["localhost"]
Database = "bgpmon"
User = "bgpmon"
Password = "bgpmon"
WorkerCt = 4 #the maximum amount of concurrent workers
DBTimeoutSecs = 120 #maximum lifetime seconds for a DB operation

# Modules represent modules to run on startup
# Multiple modules of the same type can be instantiated with
# different IDs
[Modules]
# RPC exposes the basic bgpmond operation over an RPC interface that
# consumes and produces protocol buffers defined in the netsec-protobufs
# repository /bgpmon
[Modules.rpc1]
Type="rpc"
Args="-address :12289 -timeoutsecs 240"

# pprof enables the http profiler at an address specified by Args
[Modules.pprof1]
Type="pprof"
Args="-address localhost:6969"

# Nodes represent operator provided information for nodes involved in
# BGP transactions
# If there are already saved nodes in the database that conflict with the
# configuration, the configuration is preferred
[Nodes]
[Nodes."128.223.51.102"]
Name="routeviews2"
IsCollector=true
DumpDurationMinutes=1440
Descritption="routeviews.org routeviews2 collector"
You can’t perform that action at this time.