Changes since last version:
* Parser: Fix a bug when parsing 'BGP.*community' output spanning
multiple lines.
* Fix the default config path to /etc/birdwatcher/birdwatcher.conf
Changes since last version:
* Fix testcase for /protocols/bgp
* New birdc query 'RoutesFilteredCount()'
* Queue for birdc commands, prevents running the same birdc command
multiple times in parallel on concurrent API requests.
* Cache: redesign cache structure, separation of Parsed and Meta cache
* allows independent cache access
* implement convenience methods for interaction with the cache
* Change the callback type to update the cache for RunAndParse()
to be a pointer to the Parsed record, which allows updating the
Parsed record before it will be stored inside the cache
* Update all functions that use the meta cache to only create
their own records and also use GetCacheKey() to request the
meta cache from other functions.
* eliminates the need for Clear() -> removed
* Add two new birdc commands:
* PipeRoutesFiltered()
* PipeRoutesFilteredCount()
This allows to determine the key in the cache, where the result of
specific functions are stored, without requiring to know what command
was executed by that function.
Also updated all functions to use GetCacheKey() to store Parsed
records.
The query can be used to determine the exact number of filtered
(not exported) prefixes from a table towards a pipe protocol for
a certain neighbor (if multiple neighbors are connected to
the given table).
* seperate Parsed and Meta cache, so that they may be locked independently
* extend the RunAndParse() function to allow the caller to specify a
callback which will update the Meta cache
* change all methods interacting with the Meta cache to use the
callback for RunAndParse() to update the Meta cache
Changes since last version:
* Fix race condition between main() and InstallRateLimitReset()
* Fix endpoint /routes/count/table now returns integer instead of routes
* Fix endpoint /routes/count/protocol now returns integer instead of routes
* Fix endpoint /routes/prefixed ignores URL paremeter
* Fix endpoint /symbols
* Fix TestParseProtocolBgp()
* Fix some filtered routes missing in /routes/dump
* Fix parser return correct type on error
* New endpoint for total number of best-paths '/routes/count/primary'
* Parser: support extended communities and test-cases
* Introduce new data structure for extended communities replacing the Parsed type
* Cache: avoid duplicate cache writes in Status()
Changes since last version:
* Move code to Alice-LG GitHub organization
* Include caching information alongside ttl
* Repair endpoint 'protocols'
* Documentation on interpretation of route count numbers
* Improve example configuration
* Caching of parsed responses from birdc.
Eliminates an additional parser run for cache hits.
* Fix quotes in arguments of birdc commands in Routes{Table,Lookup}* methods.
This eliminates the "IP address expected" error in BIRD.
Changes since last version:
* Parser: protocol parser can now parse all types of protocols
* Parser: improved parsing of route change statistics
* Add TLS support for the HTTP listener
* Configuration: add new option for TLS 'enable_tls', 'crt' and 'key'
* Improved logging of API requests, similar to a webserver
* Execute birdc in restricted mode 'birdc -r'
Changes since last version:
* Fix detection of BIRD v2.x.y
* Fix birdc command in RoutesFiltered
* Use worker-threads to parse in parallel.
This speeds up parsing of large responses e.g. BGP full-table.
* Add flag "worker-pool-size" to control number of threads while parsing
* Configuration: add setting for ttl value to control caching of bird responses
* Configuration: change default location to /etc/birdwatcher
Changes since last version:
* Parser: support BIRD v2.x with multiprotocol BGP and channels
* Parser: major refactoring
* Parser: decrease memory footprint
* use io.Reader interface
* use line-iterator for birdc output
* Detection of BIRD v1.6.x or BIRD v2.x
* Extend test coverage for IPv6
* Tests for BIRD v2.x and IPv4
* Dependencies managed by now managed by dep
Includes an updated CHANGELOG reaching back to 1.10.0.
This additionally caches the results after matching regular
expressions and improves performance further.
Credits: Hasan Pekdemir for the original idea.
The commands submitted to birdc contain "'" characters
placed before and after ip-address/prefix and table
name. In normal operation of birdc they are eliminated
by the shell. However when given as arguments to birdc
directly they cause "IP address expected" error in Bird.
Credits: Felix Singer for finding and submitting this bug.
The method parseBgp is now generic enough to parse
all types of protocols.
Added new regular expressions and a more flexible
way of processing route_change statistics that have
subtle differences in each protocol.