A simple Ruby script that takes data from a websocket and looks to see if there is route flapping on the CRXN network.
Marek Küthe b1ca9a075e change header in readme | 1 year ago | |
---|---|---|
.gitignore | 1 year ago | |
.rubocop.yml | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
detector.rb | 1 year ago | |
main.rb | 1 year ago |
The faye-websocket
gem is required:
gem install faye-websocket
You can create a flapping detector and then run it. Running it blocks the current thread. As argument you can specify the websocket URI and the threshold value. If there are more updates per minute than the threshold, a message is displayed.
detector = FlappingDetector.new 'ws://babelweb2.bandura.crxn/ws', 5
detector.run