bgpkit / monocle

See through all BGP data with a monocle.
MIT License
90 stars 3 forks source link

[feature] plotting diagrams with AS paths collected #14

Open digizeph opened 1 year ago

digizeph commented 1 year ago

We could automatically generate a dot graph file and plot AS-level graphs with graphviz using all AS paths collected from the search command.

Example of AS paths that can be converted to plots:

monocle search -t 2022-07-26T10:00:00Z -T 2022-07-26T12:00:00Z --prefix 188.191.144.0/23 --collector route-views2 --json | grep 105.16.0.247 | jq .as_path
"37100 6453 1273 12389 12389 12389 12389 201776 47598 56446"
"37100 6762 1273 12389 12389 12389 12389 201776 47598 56446"
"37100 3356 6762 12389 201776 47598 56446"
"37100 6762 12389 201776 47598 56446"

We can further annotate each hop with data from whois subcommand.

digizeph commented 1 year ago

Better option: use plotly.rs (https://github.com/igiagkiozis/plotly) to create sankey graphs. Sankey graph is supported by the library: https://github.com/igiagkiozis/plotly/blob/master/examples/basic_charts/src/main.rs#L570

Something like this image https://plotly.com/python/sankey-diagram/