Git Product home page Git Product logo

birdseye's People

Contributors

aduitsis avatar barryo avatar nickhilliard avatar seadog007 avatar sparkeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

birdseye's Issues

403 Forbidden for access birdseye API

Hello,
can u help for 403 Forbidden after i follow IXP Manager & Route Servers form youtube part 4.
the warning exist go to looking glass process API.

Here my lighttpd.conf:

Sample Bird's Eye Lighttpd config - just added a small amount to

the standard Lighttpd configuration.

server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
)

server.document-root = "/srv/birdseye/public"
#server.document-root = "/var/www/html/test"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
server.bind = "103.190.220.1"
#fastcgi.debug = 1
dir-listing.activate = "enable"

index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )

default listening port for IPv6 falls back to the IPv4 port

Use ipv6 if available

#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.conf.pl"
#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
#include shell "/etc/lighttpd/conf-enabled/10-fastcgi.conf"

url.redirect = ()
url.rewrite-once = (
"^/(css|img|js|fonts)/..(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf)$" => "$0",
"^/(favicon.ico|robots.txt|sitemap.xml)$" => "$0",
"^/test.php$" => "$0",
"^/[^\?]
(?.*)?$" => "/index.php/$1"
)

this my birdseye-rs1-ipv4.env file:

Bird's Eye - see https://github.com/inex/birdseye

Values that are commented show their default setting.

To query Bird securely, we use a wrapper script

BIRDC="/usr/bin/sudo /path/to/birdseye/bin/birdc -6 -s /path/to/bird/socket"

BIRDC="/usr/bin/sudo /srv/birdseye/bin/birdc -2 -s /var/run/bird/bird-rs1-ipv4.ctl"

We use caching as a natural API -> birdc rate limiter

Changing to 'array' will disable the cache but this is strongly discouraged

[this is Memcache for 127.0.0.1:11211 by default]

CACHE_DRIVER=file

A cache key is required only if relying on a default .env configuration.

If you're relying on the automated configuration discovery detailed at:

https://github.com/inex/birdseye#configuration

then this is set automatically and appropriatly.

BIRDSEYE_CACHE_KEY="SomeCacheKey"

Set to true for testing / debugging.

This will provide stack dumps and reveal internal logic / configuration.

It also added "env" and "cache_disabled" to the api section of responses.

APP_DEBUG=false

For testing, we have including some real Bird IPv4 dumps.

Setting to true makes Bird's Eye use those rather than querying a local Bird daemon

USE_BIRD_DUMMY=false

Time (in monutes - Lumen restriction) to store cache objects for:

CACHE_SHOW_STATUS=1

CACHE_SHOW_SYMBOLS=5

CACHE_PROTOCOLS=2

CACHE_ROUTES=5

Maximum routes that will be sent back in an API query. We have not created pagination yet so this will be

a hard limit. The looking glass implementation does not add links for tables / protocols exceeding this.

Aborts with a 403 when a table/protocol route list has more than this. Uses 'show route ... count' internally.

MAX_ROUTES=1000

Maximum API requests per client per minute

THROTTLE_PER_MIN=20

This micro server also includes a built in looking glass which can be enabled by setting this to true

The loogking glass is really just to deomostrate the API and uses the same API calls internally as

are publically available. If enabled, it's available under /lg

LOOKING_GLASS_ENABLED=true
IXP_FE_FRONTEND_DISABLED_FILTERED_PREFIXES=false

Page title for looking glass [note: {!VERSION!} will be replaced with the actual version]

LOOKING_GLASS_TITLE="Bird's Eye Looking Glass - API V{!VERSION!}"

The LG displays the BGP protocol description. These can sometimes be internal

machine generated / unwieldy strings. If you want to pluck out just a bit of

this you can set a regex here and, when valid and matches against the description,

it plucks the first subpattern match (i.e. (xxx) ) and sets that in

the API response as description_short. The frontend LG will also prefer this if set.

Note that the system adds anchors and Bird output matching so the evaluated regex is:

'/^\s+Description:\s+' . env( 'PARSER_PROTOCOL_BGP_DESCRIPTION' ) . '$/'

E.g. to pluck 'ppp-rb01' out of 'RR Client - ppp-rb01', you might use:

PARSER_PROTOCOL_BGP_DESCRIPTION=".*\s+([a-zA-Z0-9-_]+)"

#PARSER_PROTOCOL_BGP_DESCRIPTION=""

Looking Glass 500 Server Error :: Syntax error

When I try to access the looking glass from IXP manager I get the error message "500 Server Error :: Syntax error"
When I try to access directly from the server hostname (with the option enabled in the appropriate .env file), I get "Whoops, looks like something went wrong."

I've checked the logs, and the log for lighttpd gives this error whenever I try to access from either api or direct:
"sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper"

I've added "www-data ALL=(ALL) NOPASSWD: /srv/birdseye/bin/birdc" to both /etc/sudoers and /etc/sudoers.d/birdseye

I am running Ubuntu 20.04 and Bird 2.0.7

Status Endpoint Oddities

Hi,

There are some oddities with the date/times in the /api/status endpoint.

"server_time": "2020-06-23T21:34:47+00:00",
"last_reboot": "2020-06-23T21:30:19+00:00",
"last_reconfig": "2020-06-23T21:30:19+00:00",

We run our servers in local time:

$ date
Tue 23 Jun 21:34:51 BST 2020

As you can see, it's reporting server_time as 21:34:47+00:00, when it should be 20:34:47+00:00 or 21:34:47+01:00.

Also, it's setting last_reconfig on a restart. IXPManager is showing the correct last update time as 2020-06-23 20:21:41 (BST).

Thanks,

Ian

Bird2 support

I have mix versions of bird (1&2) running together. Will birdeye support bird version 2 in the future?

Issue with Looking Glass (Birdseye and IXP-Manager)

Awesome project as aways!

Working on installing this and getting it to work with IXP-Manager.

I've come across a strange issue that I think is either related to expected BIRD output or some edge-case bug.

Our Birdseye' main page looking glass: http://rs1-ipv4.pit-ix.net/lg/protocols/bgp
Result:
image

IXP-Manager's Looking glass home page for the route server gets mangled but is half "working":
image

If I click the "master" link in the last screenshot, I am presented with the rest of the looking glass working fine. It appears the list of peers/protocols is messed up in some manner.

If I run the command "/usr/bin/sudo /srv/birdseye/bin/birdc -4 -s /var/run/bird/bird.ctl show protocols" on the route servers, I am presented with the following:

image

Do I have a malformed BIRD config causing this?

Laravel & PHP8

We're moving our current IXPManager setup to a new one, and in the meantime, we're also upgrading the Ubuntu distrib we're running on. So the new server runs on Ubuntu 22.04, which comes with PHP8, and I have errors with birdseye on it.

2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Http\Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/birdseye/vendor/illuminate/http/Request.php:992
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:Stack trace:
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:0 /srv/birdseye/vendor/illuminate/http/Request.php(16): Laravel\Lumen\Application->Laravel\Lumen\Concerns{closure}()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:1 /srv/birdseye/vendor/composer/ClassLoader.php(444): include('...')
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:2 /srv/birdseye/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:3 /srv/birdseye/vendor/laravel/lumen-framework/src/Application.php(430): Composer\Autoload\ClassLoader->loadClass()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:4 /srv/birdseye/vendor/illuminate/container/Container.php(731): Laravel\Lumen\Application->Laravel\Lumen{closure}()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:5 /srv/birdseye/vendor/illuminate/container/Container.php(629): Illuminate\Container\Container->build()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:6 /srv/birdseye/vendor/laravel/lumen-framework/src/Application.php(206): Illuminate\Container\Container->make()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:7 /srv/birdseye/vendor/laravel/lumen-framework/src/Routing/UrlGenerator.php(310): Laravel\Lumen\Application->make()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:8 /srv/birdseye/vendor/laravel/lumen-framework/src/Routing/UrlGenerator.php(97): Laravel\Lumen\Routing\UrlGenerator->getRootUrl()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:9 /srv/birdseye/vendor/laravel/lumen-framework/src/helpers.php(311): Laravel\Lumen\Routing\UrlGenerator->to()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:10 /srv/birdseye/app/Http/routes.php(29): url()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:11 /srv/birdseye/bootstrap/app.php(142): require('...')
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:12 [internal function]: {closure}()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:13 /srv/birdseye/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(92): call_user_func()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:14 /srv/birdseye/bootstrap/app.php(143): Laravel\Lumen\Application->group()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:15 /srv/birdseye/public/index.php(14): require('...')
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:16 {main} in /srv/birdseye/vendor/illuminate/http/Request.php on line 16
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:PHP Warning: Uncaught ErrorException: Return type of Illuminate\Http\Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/birdseye/vendor/illuminate/http/Request.php:992
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:Stack trace:
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:0 /srv/birdseye/vendor/composer/ClassLoader.php(444): Laravel\Lumen\Application->Laravel\Lumen\Concerns{closure}()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:1 /srv/birdseye/vendor/composer/ClassLoader.php(444): include()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:2 /srv/birdseye/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:3 /srv/birdseye/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php(67): Composer\Autoload\ClassLoader->loadClass()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:4 /srv/birdseye/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php(55): Laravel\Lumen\Application->handleShutdown()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:5 [internal function]: Laravel\Lumen\Application->Laravel\Lumen\Concerns{closure}()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:6 {main}
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr: thrown in /srv/birdseye/vendor/illuminate/http/Request.php on line 992
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Http\Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /srv/birdseye/vendor/illuminate/http/Request.php:992
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:Stack trace:
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:0 /srv/birdseye/vendor/illuminate/http/Request.php(16): Laravel\Lumen\Application->Laravel\Lumen\Concerns{closure}()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:1 /srv/birdseye/vendor/composer/ClassLoader.php(444): include('...')
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:2 /srv/birdseye/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:3 /srv/birdseye/vendor/laravel/lumen-framework/src/Application.php(430): Composer\Autoload\ClassLoader->loadClass()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:4 /srv/birdseye/vendor/illuminate/container/Container.php(731): Laravel\Lumen\Application->Laravel\Lumen{closure}()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:5 /srv/birdseye/vendor/illuminate/container/Container.php(629): Illuminate\Container\Container->build()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:6 /srv/birdseye/vendor/laravel/lumen-framework/src/Application.php(206): Illuminate\Container\Container->make()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:7 /srv/birdseye/vendor/laravel/lumen-framework/src/Routing/UrlGenerator.php(310): Laravel\Lumen\Application->make()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:8 /srv/birdseye/vendor/laravel/lumen-framework/src/Routing/UrlGenerator.php(97): Laravel\Lumen\Routing\UrlGenerator->getRootUrl()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:9 /srv/birdseye/vendor/laravel/lumen-framework/src/helpers.php(311): Laravel\Lumen\Routing\UrlGenerator->to()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:10 /srv/birdseye/app/Http/routes.php(29): url()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:11 /srv/birdseye/bootstrap/app.php(142): require('...')
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:12 [internal function]: {closure}()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:13 /srv/birdseye/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(92): call_user_func()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:14 /srv/birdseye/bootstrap/app.php(143): Laravel\Lumen\Application->group()
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:15 /srv/birdseye/public/index.php(14): require('...')
2022-07-01 11:53:24: (mod_fastcgi.c.451) FastCGI-stderr:16 {main} in /srv/birdseye/vendor/illuminate/http/Request.php on line 16

I was able to setup PHP7.4 on the server and everything is running fine, but I'd suggest to make this compatible with PHP8. From what I understand, we need Laravel >6, but it's currently delivered with Laravel 5.x (see https://blog.laravel.com/laravel-php-8-support).

Ubuntu 16.04 to 20.04 upgrade path issues

We recently decided to upgrade our RS to Ubuntu 20.04. For the most part the upgrade was painless. Went from 16.04 to 18.04 then to 20.04.

The once issue we did discover and managed to resolve was with lighttpd. Post upgrade the server was throwing;

(mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri: /api/protocols/bgp
2020-08-23 00:12:34: (mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri: /api/protocols/bgp
2020-08-23 00:12:36: (mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri: /api/status
2020-08-23 00:13:36: (mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri: /api/status
2020-08-23 00:13:46: (mod_rewrite.c.282) mod_rewrite invalid result (not beginning with '/') while processing uri:

in the lighttpd error.log file.

I was able to find the following solution on stackoverflow https://stackoverflow.com/questions/3965651/lighttpd-configuration-dots-in-my-query-string-cause-404

copying the url.rewrite-once

url.rewrite-once = (
"^/(js|images|uploads|css|sf)/(.)" => "$0", # we want to load these assets as is, without index.php
"^/[a-zA-Z_-]+.(html|txt|ico)$" => "$0", # for any static .html files you might be calling in your web root, we don't want to put the index.php controller in front of them
"^/sf[A-z]+Plugin.
" => "$0", # don't want to mess with plugin routes
"^/([a-z_]+).php(.).(.)$" => "/$1.php$2.$3", # same concept as rules below, except for other applications/environments (backend.php, backend_dev.php, etc)
"^/([a-z_]+).php([^.])$" => "/$1.php$2", # see comment right above this one
"^/(.
).(.*)$" => "/index.php/$1.$2", # handle query strings and the dot problem!
"^/([^.]+)$" => "/index.php/$1", # general requests
"^/$" => "/index.php" # the home page
)

restart lighttpd and this now appears to work successfully.

Will try and document if anything else but so far so good.

Connecting multiple route servers to looking glass

Hi,

great project. Is there a painless way to connect multiple route servers into one single web looking glass?
I have a smaller version of your project "birdwatcher" running on some route servers which provide the API.

Some typos in the Readme.md file

<-- Bird is however lacking an API to allow IXPs to provide thise same looking glass type tools. More over, this also affects an IXP's ability to monitor these routing daemons and member sessions to them.

--> Bird is, however, lacking an API to allow IXPs to provide these same looking glass type tools. Moreover, this also affects an IXP's ability to monitor these routing daemons and member sessions to them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.