nlnog / lg.ring.nlnog.net Goto Github PK
View Code? Open in Web Editor NEWSource code for the NLNOG Looking Glass front end
Home Page: https://lg.ring.nlnog.net
License: ISC License
Source code for the NLNOG Looking Glass front end
Home Page: https://lg.ring.nlnog.net
License: ISC License
Provide an option to show plain text output for routes, which is easier to copy/paste into tickets/mails.
Possible additional feature: save preference for view style (table or plain) in a cookie.
Running the linter on the current main
branch throws this error at the end:
Traceback (most recent call last):
File "/home/ewpratten/projects/lg.ring.nlnog.net/communities/lint.py", line 88, in <module>
check_communities()
File "/home/ewpratten/projects/lg.ring.nlnog.net/communities/lint.py", line 70, in check_communities
(warnings, lines) = check_communitydesc(filename)
File "/home/ewpratten/projects/lg.ring.nlnog.net/communities/lint.py", line 39, in check_communitydesc
if f"as{asn}.txt" != filename.split("/")[-1] and not is_private(asn):
File "/home/ewpratten/projects/lg.ring.nlnog.net/communities/lint.py", line 15, in is_private
asn = int(asn)
ValueError: invalid literal for int() with base 10: 'soo 201376'
It would be great to be able to add a looking glass URL in peeringdb that points to a specific peer on the NLNOG looking glass interface.
Is this open source or just visible source?
If it is open source, could you please specify under which license?
Feature request to show MED and origin (IGP, EGP, incomplete). This information is available in the OpenBGPD JSON output.
Create a simple linter to validate PR's for comm2text mappings, so we don't need to check this by hand.
Idea: Add links to IRR Explorer for prefixes.
Make the selection list for peers to query a multiselect so people can select a number of peers, not just one or all.
No colors are shown for error blocks, they should have a red background.
Make sure UTF-8 is properly supported in community descriptions.
While I'm wishing, it would be really nice if I could download the DOT source from the LG, as I have lots of tools for manipulating DOT graphs locally, whereas I can't really do anything interesting or useful with the laid-out & rendered SVG output.
Originally posted by @athompson-merlin in #82 (comment)
The 'renew' button when looking at stored results (for example https://lg.ring.nlnog.net/prefix/text?saved=b6Sm4G8Nyr) fails, the URL for that button is incorrect.
If the OpenBGPD backend is down (or provides incorrect JSON data), an error is thrown on the 'form' page:
[Wed Sep 21 06:07:02.892265 2022] [wsgi:error] [pid 856] [remote 2a02:a46c:8a6a:1:48cb:c142:5ab9:f211:49602] Error retrieving data from http://lg02.infra.ring.nlnog.net/bgplgd/neighbors Expecting value: line 1 column 1 (char 0)
show output of bgpctl -j show rib memory
(if available in some way via the API) on the site as part of the statistics.
If a peer sends more than one route for a specific prefix, indicate which is best (if available in JSON output).
If wildcard values are used in a community description rules, it would be nice to be able to fill in the actual value. For example:
If 65535:0:nnn,do not announce to $1
matches 65535:0:12345
, the description could be do not announce to 12345
. Exact notation could be different.
Create a button to link from the list of peer routes to one single route (related to permalink feature).
Implement support for community descriptions for large and extended communities.
I love using the LG on my mobile phone but between the overly large menu and the permanently visible footer showing the sponsors there isn’t much space for the actual content.
My suggestion would be to not make the footer “sticky to the bottom of the viewport”, but just let it be a the bottom of the page. I don’t think it permanently needs to be visible all the time.
as for the top menu, I’m not entirely sure why it looks this way
thoughts?
Implement stricter filtering of parameters for WHOIS queries, only allow ASNs (type int) or IP-ranges (tested by trying to cast it to a netaddr.IPNetwork object).
It'd be great if the LG could show the presence of the OTC attribute from https://datatracker.ietf.org/doc/rfc9234/
Some routes having that attribute have been documented in https://rfc.hashnode.dev/rfc9234-observed-in-the-wild recently.
Idea: create persistent URLs for storing saved data. This would basically boil down to saving the JSON provided by the backend and generating some unique URL.URLs should only be generated on request, and compression of the data may be wise to reduce the amount of storage used.
Add more details on setting up peering sessions on the page. Also mention add-path.
The navbar scales badly on smaller screens. The empty space is static instead of fluid.
If a query takes too long (for example 0/0 or longer on a specific node), an internal server error is thrown:
[Wed Sep 21 14:59:49.626133 2022] [wsgi:error] [pid 20849] [remote x:49244] File "/var/www/lg.ring.nlnog.net/nlnog_lg.py", line 184, in openbgpd_command
[Wed Sep 21 14:59:49.626148 2022] [wsgi:error] [pid 20849] [remote x:49244] data = requests.get(url, verify=False, params=args)
[Wed Sep 21 14:59:49.626154 2022] [wsgi:error] [pid 20849] [remote x:49244] File "/usr/lib/python3/dist-packages/requests/api.py", line 72, in get
[Wed Sep 21 14:59:49.626159 2022] [wsgi:error] [pid 20849] [remote x:49244] return request('get', url, params=params, **kwargs)
[Wed Sep 21 14:59:49.626164 2022] [wsgi:error] [pid 20849] [remote x:49244] File "/usr/lib/python3/dist-packages/requests/api.py", line 58, in request
[Wed Sep 21 14:59:49.626170 2022] [wsgi:error] [pid 20849] [remote x:49244] return session.request(method=method, url=url, **kwargs)
[Wed Sep 21 14:59:49.626175 2022] [wsgi:error] [pid 20849] [remote x:49244] File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520, in request
[Wed Sep 21 14:59:49.626180 2022] [wsgi:error] [pid 20849] [remote x:49244] resp = self.send(prep, **send_kwargs)
[Wed Sep 21 14:59:49.626185 2022] [wsgi:error] [pid 20849] [remote x:49244] File "/usr/lib/python3/dist-packages/requests/sessions.py", line 670, in send
[Wed Sep 21 14:59:49.626190 2022] [wsgi:error] [pid 20849] [remote x:49244] r.content
[Wed Sep 21 14:59:49.626195 2022] [wsgi:error] [pid 20849] [remote x:49244] File "/usr/lib/python3/dist-packages/requests/models.py", line 823, in content
[Wed Sep 21 14:59:49.626200 2022] [wsgi:error] [pid 20849] [remote x:49244] self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
[Wed Sep 21 14:59:49.626470 2022] [wsgi:error] [pid 20849] [remote x:49244] MemoryError
[Wed Sep 21 14:59:49.626836 2022] [wsgi:error] [pid 20849] [remote x:49244]
The front end should be refusing queries which for certain will generate a too large result set, but that seems to fail.
If we look at e.g. https://lg.ring.nlnog.net/prefix/map/fullscreen?saved=NzJt5I4hXA, we see that the edges are coloured, but not the nodes. This can make it quite difficult to follow a path, at least under some circumstances.
I just found the source of this problem in bird-lg-go, and it looks like this codebase inherits the same root cause (no big surprise there!).
Instead of duplicating it all again, I'll just refer to that issue here: xddxdd/bird-lg-go#66
In a perfect world, I would be able to toggle this on and off, but at least for my purposes/my monitor/my printer/my eyes, I think coloured nodes AND edges would be an improvement over black nodes and coloured edges.
Sorting the number of prefixes on the bgp summary page isn't done numerically.
Create a BGP Map similar to what the old NLNOG lookingglass provided and what for example bgp.tools has.
create a page showing all asn's for which communities are known (and possibly all known communities for these asns).
Was looking at some routes, and I noticed that ones with { } in the path don't make maps. I assume that part needs to be stripped out before being sent to the dot map creation code, or ignored in the map creation code.
Example URL:
https://lg.ring.nlnog.net/prefix/map?saved=8uKX6LIG8M
(2001:410::/32)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.