Receives BGP Update messages by peering with your BGP daemon. Detects path changes and BGP flapping events.
The program will listen on port 1790 for incoming BGP sessions (passive mode - no outgoing connections). Peering multiple nodes with a single instance of the program is also possible. The 'multihop' mode in your BGP daemon (for example BIRD) should be enabled to allow for running this program on the same host. Note that with BIRD there is a bug that requires using another IP address that belongs to the host (for example an IP from a dummy interface) for it to correctly send bgp information to a local instance of the program.
The following commandline arguments are required:
Usage: ./FlapAlerted <RouteChangeCounter> <FlapPeriod> <Asn> <KeepPathInfo> <UseAddPath> <RelevantAsnPosition> <Debug>
Explanation:
- Number of times a route path needs to change
- Interval in seconds within which a notification will be triggered if the number given in [1] is exceeded.
- Your ASN
- Recommended:
true
. Whether to store all possible AS paths for each BGP update. Only disable if performance is a concern. - Recommended:
false
. Whether BGP AddPath support should be used. It must be set on the BGP daemon as well. - Recommended:
auto
. The position of the last static ASN (and for which to keep separate state for) in each path starting from 1. If AddPath support has been enabled that value is '1', otherwise it is '0'. For special cases like route collectors the value may differ. - Recommended:
false
. Enable or disable debug output. This option produces a lot of output.
Use the value 0
for the RouteChangeCounter [2] if all BGP updates should cause a notification from the program.
To enable or disable modules edit the MODULES
variable in Makefile
or the Dockerfile
if you are using Docker.
You will need to have GO installed on your system. Then run make release
and find the binary in the bin/
directory.
Clone this repository and run docker build .
to generate a docker image.
Provides the following http API endpoints on port 8699
:
/capabilities
/flaps/active
/flaps/active/history?cidr=<cidr value>
/flaps/active/compact
/flaps/metrics/json
/flaps/metrics/prometheus
It also provides a user interface at path:
/
Logs each event to STDOUT.
Listens for tcp connections on port 8700
. Sends a json string to each client for every event.