1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00
Commit graph

398 commits

Author SHA1 Message Date
Patrick Seeburger
b8b9b5d021 Fixed /routes/count/table Endpoint which was returning routes instead of
a route count because the wrong method was called.
2019-02-22 14:07:08 +01:00
Patrick Seeburger
4ffebab2c4 Fixed race condition between main() and InstallRateLimitReset(). 2019-02-22 14:07:08 +01:00
Benedikt Rudolph
337e2288e8 Add info on show route command 2019-02-22 14:07:07 +01:00
Patrick Seeburger
27fe2969d7 Avoid unnecessary cache writes in /status
Introduce check to avoid unneccesarry cache writes.
2019-02-22 14:07:07 +01:00
Benedikt Rudolph
e8cb296397 Add doc on interpretation of route count numbers
We hope to clarify with the given examples the semantics of route counts.
2019-02-22 14:07:07 +01:00
Patrick Seeburger
8a69b5ba98 Repair 'protocols' endpoint
* repair 'protocols' endpoint to return a meaningful JSON object
* improve example configuration file
2019-02-22 14:07:06 +01:00
Matthias Hannig
712510b3bc include caching information alongside ttl 2019-02-22 14:07:06 +01:00
Daniel Czerwonk
f82f265612 fixed vendoring 2019-02-22 14:06:37 +01:00
Benedikt Rudolph
fe6359aee5 Merge branch 'develop' into master for 1.11.2
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'
2019-02-22 08:26:07 +01:00
Benedikt Rudolph
7e38e5e3bd Merge branch 'develop' into master for 1.11.1
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
2019-02-22 08:21:00 +01:00
Benedikt Rudolph
0467c9795c Merge branch 'develop' into master for 1.11.0
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.
2019-02-22 08:08:35 +01:00
Benedikt Rudolph
c7171ba183 Merge branch 'feature/memory-cache-housekeeping' into develop 2019-02-21 09:11:34 +01:00
Benedikt Rudolph
ac1c385048 Conclude de-ecixification 2019-02-20 17:27:02 +01:00
Benedikt Rudolph
821a4f869a Change Go import paths for alice-lg github org 2019-02-20 17:25:57 +01:00
Benedikt Rudolph
a171284a9b Change URLs to alice-lg github organization 2019-02-20 17:25:57 +01:00
Benedikt Rudolph
e6ed0cb901 Refactor housekeeping and memory cache
* run Expire() only on MemoryCaches
* make initialization of the cache look pretty
2019-02-20 11:17:13 +01:00
Patrick Seeburger
210d84445e Made the housekeeping routine interval configurable. 2019-02-19 14:06:43 +01:00
Patrick Seeburger
cfa0af57cc Expire cache entries to save memory
* Add a method to expire cache entries, based on the ttl value
* Add a housekeeping method that will periodically expire cache
  entries and also maybe configured to force a GC/SCVG run.
2019-02-18 17:46:32 +01:00
César de Tassis Filho
d5880f7264 Change go get command from ecix to alice-lg on README. 2019-02-11 18:23:18 -02:00
Benedikt Rudolph
43b6a8b8dc Merge branch 'feature/api-redesign' into develop
* simplify RoutesNoExport() to just the birdc command
2019-02-06 08:54:21 +01:00
Benedikt Rudolph
56c378109f Integrate redis backend with the Cache interface 2019-02-28 16:14:13 +01:00
Benedikt Rudolph
cd05592804 Merge redis cache from 'upstream/master' into develop
Leave redis cache the way it is for now. Rework in future commits.
2019-02-28 15:11:31 +01:00
Benedikt Rudolph
00bba801ea Merge branch 'feature/cache-backends' into develop
Add support for various cache backends in anticipation of the merge
with upstream/master that has the redis backend.
2019-02-28 14:17:03 +01:00
Benedikt Rudolph
14c8875ae0 Avoid overwriting existing cache entry
also fix RoutesNoExport.
2019-02-28 13:25:47 +01:00
Benedikt Rudolph
7e02cb23da Add test for memory cache backend
Improve error handling in case value can not be retrieved.
Either return the value and nil, or a value and an error.
2019-02-28 13:02:11 +01:00
Benedikt Rudolph
119b9f6360 Add feature cache backends
Add support for various cache backends in anticipation of the
merge with master that has an additional redis backend.
The current memory based cache backend is refactored to implement
the new interface.
2019-02-28 11:32:40 +01:00
Benedikt Rudolph
ceea37e53b Merge branch 'upstream/master' into develop
Merge changes including version 1.11.0 of upstream.
Remove extra lines in RoutesNoExport()

Conflicts:
       README.md
       * Keep `birdwatcher` in the configuration path
       bird/bird.go
       * Keep the default order of arguments to birdc in RoutesFiltered() and RoutesNoExport()
       birdwatcher.go
       * Keep `gorilla/handlers` for HTTP logging
2019-02-28 09:17:41 +01:00
Patrick Seeburger
14a4ebeaaa Using json.Encoder to write the output JSON instead of using a buffer. 2019-02-05 17:40:59 +01:00
Patrick Seeburger
e5248b21c7 Improved parameter validation. 2019-02-05 17:37:53 +01:00
Patrick Seeburger
1d3118b864 Added missing default value (imported). 2019-02-04 15:48:24 +01:00
Matthias Hannig
837c97da13 prefix cache key for use with birdc and birdc6 2019-01-24 19:01:41 +01:00
Matthias Hannig
1ee6740688 improved caching tests 2019-01-24 19:01:05 +01:00
Matthias Hannig
f0d98a69ef updated example config 2019-01-24 17:17:52 +01:00
Matthias Hannig
15f2561c87 use redis cache if configured 2019-01-24 17:16:35 +01:00
Matthias Hannig
8552547afa configure redis caching 2019-01-24 17:16:19 +01:00
Matthias Hannig
52f5e9506a use redis caching when available 2019-01-24 17:15:54 +01:00
Matthias Hannig
1518f64cd4 added redis cache helper 2019-01-24 17:15:26 +01:00
Patrick Seeburger
c4dfeb253d API redesign - make birdwatcher more generic
Removed all high level functionality e.g. endpoints with multiple
invocations of birdc.
Add new endpoints which are required to duplicate the removed
functionality within Alice-LG.
2019-01-18 18:10:06 +01:00
Matthias Hannig
5872eeb5e8 version bump 2018-11-29 15:28:19 +01:00
Matthias Hannig
2a17304682 fixed command syntax 2018-11-29 15:28:00 +01:00
Matthias Hannig
e7755afb61 moved repository (alice-lg) in import 2018-11-29 15:20:45 +01:00
Johannes Moos
ce8e7c437c Add "routes_peer" module to list in example config 2018-07-18 10:56:32 +02:00
Patrick Seeburger
c1cc320030 Improve caching of parsed birdc output.
This additionally caches the results after matching regular
expressions and improves performance further.

Credits: Hasan Pekdemir for the original idea.
2018-07-18 10:53:53 +02:00
Benedikt Rudolph
715deaebb8 Fix quotation error Routes{Table,Lookup}* method
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.
2018-07-18 10:53:07 +02:00
Benedikt Rudolph
fdfa4cbc32 Generalize parse method to accept all protocols
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.
2018-07-18 10:43:00 +02:00
Benedikt Rudolph
88eb405c9e Add comment to explain "-r" argument. 2018-07-18 10:43:00 +02:00
Benedikt Rudolph
1ccbc3d702 Execute birdc in restricted mode with "-r" argument. 2018-07-18 10:42:59 +02:00
Benedikt Rudolph
a89bc7049b Cleanup
Eliminate use of fmt, use log instead.
Fix timestamps in logs.
2018-07-18 10:42:59 +02:00
Benedikt Rudolph
b1f8b2a6d5 Fix enable_tls config option and logger 2018-07-18 10:42:59 +02:00
Hasan Pekdemir
494c54d061 Fix custom logger and add more comments 2018-07-18 10:42:58 +02:00