Skip to content
Open
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
413c60e
Update ssh_netmiko.py
CarlosSuporteISP Sep 13, 2025
ab51462
Update mikrotik.py
CarlosSuporteISP Sep 13, 2025
62a93c0
Update mikrotik.py
CarlosSuporteISP Sep 13, 2025
c2cf9e2
Update huawei.py
CarlosSuporteISP Sep 13, 2025
7e66bbd
Update mikrotik.py
CarlosSuporteISP Sep 13, 2025
ff0bed6
Update __init__.py
CarlosSuporteISP Sep 13, 2025
4432f48
Create bgp_routestr_mikrotik.py
CarlosSuporteISP Sep 13, 2025
504c0f1
Update mikrotik_garbage_output.py
CarlosSuporteISP Sep 13, 2025
16c1674
Create mikrotik_normalize_input.py
CarlosSuporteISP Sep 13, 2025
d72e5f9
Create bgp_routestr_huawei.py
CarlosSuporteISP Sep 13, 2025
2eb9c40
Create huawei.py
CarlosSuporteISP Sep 13, 2025
bee6426
Create mikrotik.py
CarlosSuporteISP Sep 13, 2025
b405fd7
Update compose.yaml
CarlosSuporteISP Sep 13, 2025
319c31b
Update compose.yaml
CarlosSuporteISP Sep 13, 2025
e5cae3e
Update compose.yaml
CarlosSuporteISP Sep 13, 2025
d8ab435
Update and rename sample_devices.yaml to sample_devices_juniper.yaml
CarlosSuporteISP Sep 13, 2025
7424e03
Create sample_config.yaml
CarlosSuporteISP Sep 13, 2025
44dfcac
Update sample_devices_juniper.yaml
CarlosSuporteISP Sep 13, 2025
084cd20
Rename sample_devices_juniper.yaml to sample_devices.yaml
CarlosSuporteISP Sep 13, 2025
e409569
Create sample_directives.yaml
CarlosSuporteISP Sep 13, 2025
94c2d3e
Rename sample_directives.yaml to sample_directives_huawei.yaml
CarlosSuporteISP Sep 13, 2025
b14025d
Create sample_terms-and-conditions.md
CarlosSuporteISP Sep 13, 2025
7d20ddf
Create sample_directives_juniper.yaml
CarlosSuporteISP Sep 13, 2025
6775ff4
Update sample_directives_juniper.yaml
CarlosSuporteISP Sep 13, 2025
8f8ab8f
Update sample_devices.yaml
CarlosSuporteISP Sep 13, 2025
3f3b233
Update sample_devices.yaml
CarlosSuporteISP Sep 13, 2025
d53b850
Update sample_directives_juniper.yaml
CarlosSuporteISP Sep 13, 2025
5d86d06
Create sample_directives_mikrotik.yaml
CarlosSuporteISP Sep 13, 2025
55612c9
Update sample_directives_mikrotik.yaml
CarlosSuporteISP Sep 13, 2025
f32131e
Update sample_devices.yaml
CarlosSuporteISP Sep 13, 2025
3a75b58
Update README.md
CarlosSuporteISP Sep 13, 2025
220b05f
Update README.md
CarlosSuporteISP Sep 13, 2025
e51c4b0
Update README.md
CarlosSuporteISP Sep 13, 2025
d28882f
Update README.md
CarlosSuporteISP Sep 13, 2025
544e36a
Update README.md
CarlosSuporteISP Sep 13, 2025
c68cee0
Update README.md
CarlosSuporteISP Sep 13, 2025
0ee425a
Update sample_config.yaml
CarlosSuporteISP Sep 13, 2025
7cf02ef
Update README.md
CarlosSuporteISP Sep 13, 2025
c068270
Update README.md
CarlosSuporteISP Sep 13, 2025
0491920
Update README.md
CarlosSuporteISP Sep 13, 2025
5973ffa
Create sample_
CarlosSuporteISP Sep 13, 2025
f7dca9a
Update sample_
CarlosSuporteISP Sep 13, 2025
142bc74
Rename sample_ to sample_hyperglass.env
CarlosSuporteISP Sep 13, 2025
084d46d
Update README.md
CarlosSuporteISP Sep 13, 2025
6d0ba5e
Update README.md
CarlosSuporteISP Sep 13, 2025
0b1f7f2
Update sample_devices.yaml
CarlosSuporteISP Sep 13, 2025
840e916
Update huawei.py
CarlosSuporteISP Sep 13, 2025
16af5ce
Update mikrotik.py
CarlosSuporteISP Sep 13, 2025
d2e83c4
Update mikrotik.py
CarlosSuporteISP Sep 13, 2025
cc4a54a
Update huawei.py
CarlosSuporteISP Sep 13, 2025
f444694
Update compose.yaml
CarlosSuporteISP Sep 13, 2025
64f48fe
Update constants.py
CarlosSuporteISP Sep 13, 2025
d496a26
Rename sample_devices.yaml to sample_devices2.yaml
CarlosSuporteISP Sep 13, 2025
7d7a501
Rename sample_devices2.yaml to sample_devices2
CarlosSuporteISP Sep 13, 2025
d33532e
Rename sample_directives_huawei.yaml to sample_directives_huawei
CarlosSuporteISP Sep 13, 2025
7ad947b
Rename sample_directives_juniper.yaml to sample_directives_juniper
CarlosSuporteISP Sep 13, 2025
1514265
Rename sample_directives_mikrotik.yaml to sample_directives_mikrotik
CarlosSuporteISP Sep 13, 2025
432704a
Rename sample_hyperglass.env to sample_hyperglass
CarlosSuporteISP Sep 13, 2025
ef129f3
Rename sample_terms-and-conditions.md to sample_terms-and-conditions
CarlosSuporteISP Sep 13, 2025
cfee063
Create sample_device.yaml
CarlosSuporteISP Sep 13, 2025
0b5bcc3
Update huawei.py
CarlosSuporteISP Sep 13, 2025
1dfe987
Update bgp_route_huawei.py
CarlosSuporteISP Sep 13, 2025
2adfed1
Update README.md
CarlosSuporteISP Sep 13, 2025
6f7fa08
Update README.md
CarlosSuporteISP Sep 13, 2025
bba9122
Update README.md
CarlosSuporteISP Sep 13, 2025
2c37f6c
Update README.md
CarlosSuporteISP Sep 13, 2025
7542dfc
Update README.md
CarlosSuporteISP Sep 13, 2025
d0e5aca
Update README.md
CarlosSuporteISP Sep 13, 2025
cb0389b
Update README.md
CarlosSuporteISP Sep 13, 2025
b589cef
Update README.md
CarlosSuporteISP Sep 13, 2025
22b6c92
Update README.md
CarlosSuporteISP Sep 13, 2025
65a4b3f
Rename sample_config.yaml to sample_config
CarlosSuporteISP Sep 13, 2025
63da21b
Update mikrotik.py
CarlosSuporteISP Sep 13, 2025
b3d4834
Update mikrotik.py rpki ajustado pelo wilhelm_pa
CarlosSuporteISP Sep 17, 2025
8131853
Added broader support for external RPKI validation.
WilhelmZA Sep 25, 2025
62fc058
Update Dockerfile update CLICK ERRO typer
CarlosSuporteISP Sep 25, 2025
993926e
Update pyproject.toml update typer erro click
CarlosSuporteISP Sep 25, 2025
fac4a80
Update requirements-dev.lock update typer erro click
CarlosSuporteISP Sep 25, 2025
e31e641
Update requirements.lock update typer erro click
CarlosSuporteISP Sep 25, 2025
c66d6d1
Update poetry.lock update erro typer click
CarlosSuporteISP Sep 25, 2025
1d79ec4
Merge remote-tracking branch 'structured/main' into structured
WilhelmZA Sep 26, 2025
22c8f83
Add requests dependency to pyproject.toml
WilhelmZA Sep 26, 2025
ae6a1a0
Refactor code for improved readability and consistency across multipl…
WilhelmZA Sep 26, 2025
e78685d
Enhance MikroTik BGP route handling by adding BGPRoute import and sim…
WilhelmZA Sep 26, 2025
eabd98b
feat: Add BGP community friendly names and enhance RPKI configuration
WilhelmZA Sep 26, 2025
b2a0599
fix: Improve error message for community name validation and clean up…
WilhelmZA Sep 26, 2025
7a6388b
fix: Improve handling of missing data fields in MikroTik BGP parser
WilhelmZA Sep 26, 2025
8f7fcac
docs: Add comprehensive configuration documentation and user guide
WilhelmZA Sep 26, 2025
120af85
fix(plugins): improve MikroTik output cleaning for all directives
WilhelmZA Sep 26, 2025
10ab164
fix(plugins): handle non-string output in MikroTik garbage plugin
WilhelmZA Sep 26, 2025
5ace4fd
fix(plugins): improve type checking for structured output
WilhelmZA Sep 26, 2025
716687d
fix(plugins): improve MikroTik traceroute output deduplication
WilhelmZA Sep 26, 2025
4414d2e
fix(ui): improve BGP table field display formatting
WilhelmZA Sep 26, 2025
d025630
Fix: Make Huawei BGP parser conform to MikroTik approach
WilhelmZA Sep 26, 2025
6af39fb
Fix: Standardize BGP parsers to use BGPRoute objects and harmonize va…
WilhelmZA Sep 26, 2025
c394d93
Fix: Export BGPRoute class in data models __init__.py
WilhelmZA Sep 26, 2025
0398966
feat: Add structured traceroute support with comprehensive IP enrichment
WilhelmZA Sep 28, 2025
9db9849
feat(structured): release structured feature set (squash merge)
WilhelmZA Sep 30, 2025
93edf34
Merge branch 'main' into structured
WilhelmZA Sep 30, 2025
4a10576
feat: comprehensive IP enrichment and traceroute improvements
WilhelmZA Oct 5, 2025
9d7cf8c
refactor: update Dockerfile and compose.yaml, remove unused files and…
WilhelmZA Oct 7, 2025
bf582e2
chore: remove sample configuration and directive files for cleanup
WilhelmZA Oct 7, 2025
d5a5760
refactor: remove unused IP enrichment admin API endpoints
WilhelmZA Oct 7, 2025
42160ca
refactor: remove unused rules and streamline Mikrotik and Huawei dire…
WilhelmZA Oct 7, 2025
440a613
chore: revert sample_device.yaml
WilhelmZA Oct 7, 2025
627c502
feat: Major IP enrichment refactor and validation fixes
WilhelmZA Oct 9, 2025
0a3334f
Enhanced FRR traceroute parser for structured output
WilhelmZA Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
hyperglass/hyperglass/static
TODO*
.env
dev-build.sh
dev-docker/

test.py
.DS_Store
Expand All @@ -19,6 +21,9 @@ __pycache__/
.python-version
.venv

# Local virtualenv freeze for this workspace
venv-requirements.txt

# MyPy
.mypy_cache

Expand Down Expand Up @@ -82,3 +87,4 @@ docs/_build/
# PyBuilder
target/
assets/
venv-requirements.txt
118 changes: 118 additions & 0 deletions .samples/sample_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
org_name: EXEMPLO_EMPRESA
primary_asn: 12345
request_timeout: 30
site_title: Looking Glass EXEMPLO_EMPRESA
site_description: "{org_name} Network Looking Glass"
structured:
rpki:
mode: external
web:
location_display_mode: gallery
opengraph:
image: /etc/hyperglass/svg/logo.png
theme:
colors:
primary: #118ab2
default_color_mode: dark
#logo:
#light: /etc/hyperglass/svg/logo.png
#dark: /etc/hyperglass/svg/logo.png
#favicon: /etc/hyperglass/svg/logo.svg
#width: 50%
#height: null
text:
title_mode: logo_subtitle
cache_icon: Cached from {time} UTC
cache_prefix: "Results cached for "
complete_time: Completed in {seconds}
fqdn_error: Unable to resolve {fqdn}
fqdn_error_button: Try Again
fqdn_message: Your browser has resolved {fqdn} to
fqdn_tooltip: Use {protocol}
no_communities: No Communities
query_location: Location
query_target: Target
query_type: Query Type
rpki_invalid: Invalid
rpki_unknown: No ROAs Exist
rpki_unverified: Not Verified
rpki_valid: Valid
subtitle: Network Looking Glass
title: hyperglass
links:
- title: PeeringDB
url: https://www.peeringdb.com/asn/65000
show_icon: true
side: left
order: 1
- title: Qrator
url: https://radar.qrator.net/AS65000
show_icon: true
side: left
order: 2
- title: RADb
url: https://www.radb.net/query?advanced_query=&keywords=AS65000
show_icon: true
side: left
order: 3
- title: IRR Explorer
url: https://irrexplorer.nlnog.net/asn/AS65000
show_icon: true
side: left
order: 4
- title: RDAP
url: https://rdap.registro.br/autnum/65000
show_icon: true
side: left
order: 5
- title: BGP VIEW
url: https://bgpview.io/asn/65000#graph
side: left
order: 6
- title: BGP HE
url: https://bgp.he.net/AS65000#_prefixes
show_icon: true
side: left
order: 7
- title: BGP TOOLS
url: https://bgp.tools/as/65000#connectivity
side: left
order: 8
- title: BGP PLAY
url: https://stat.ripe.net/widget/bgplay#w.resource=65000
side: left
order: 9
- title: UPX TOOLS
url: https://upx.tools/bgp-overview/65000
side: left
order: 10
- title: My Site
url: https://www.mysite.com.br
show_icon: true
side: right
order: 0
menus:
- title: Contato
content: "- Por favor entre em contato [[email protected]](mailto:[email protected]) para suporte."
side: right
- title: Termos e Condições
content: /etc/hyperglass/terms-and-conditions.md
side: right
credit:
enable: true
messages:
authentication_error: "-Authentication error occurred."
connection_error: "- Error connecting to {device_name}: {error}"
target_not_allowed: "- {target} is not allowed."
general: "- Something went wrong."
invalid_field: "- {input} is an invalid {field}."
invalid_input: "- {target} is not a valid {query_type} target."
no_input: "- {field} must be specified."
no_output: "- The query completed, but no matching results were found."
request_timeout: "- Request timed out."
logging:
directory: /var/log/
format: text
cache:
timeout: 120
show_text: true
File renamed without changes.
50 changes: 50 additions & 0 deletions .samples/sample_devices2
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
devices:
- name: AS1234_Example Device
address: 127.0.0.1
credential:
username: test
password: test
platform: juniper
port: 22 #PORTA de EXEMPLO APENAS TIRA ESSE COMENTARIO MUDA A PORTA NO EQUIPAMENTO PARA DE USAR PORTA PADRAO E IMPLEMENTA SEGURANÇA ACL SEJA O QUE FOR.
structured_output: True
directives:
- builtins: [BGPRoute]
- JuniperTraceroute
- JuniperPing
attrs:
source4: 127.0.0.1
source6: 2001:db8::1

- name: AS1234_Example Device
address: 127.0.0.1
credential:
username: test
password: test
port: 22 #PORTA de EXEMPLO APENAS TIRA ESSE COMENTARIO MUDA A PORTA NO EQUIPAMENTO PARA DE USAR PORTA PADRAO E IMPLEMENTA SEGURANÇA ACL SEJA O QUE FOR.
platform: huawei
structured_output: true
directives:
- builtins: [BGP_Route]
- Huawei_Traceroute
- Huawei_Ping
attrs:
source4: 127.0.0.1
source6: 2001:db8::1

- name: AS1234_Example Device
driver_args:
global_delay_factor: 3
address: 127.0.0.1
credential:
username: test
password: test
port: 22 #PORTA de EXEMPLO APENAS TIRA ESSE COMENTARIO MUDA A PORTA NO EQUIPAMENTO PARA DE USAR PORTA PADRAO E IMPLEMENTA SEGURANÇA ACL SEJA O QUE FOR.
platform: mikrotik_routeros
structured_output: true
directives:
- builtins: [BGP_Route]
- MikroTik_Traceroute
- MikroTik_Ping
attrs:
source4: 127.0.0.1
source6: 2001:db8::1
159 changes: 159 additions & 0 deletions .samples/sample_directives_huawei
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
Huawei_Traceroute:
name: Traceroute
rules:
# REGRA DENY RFC 6598
- condition: '100.64.0.0/10'
ge: 10
le: 32
action: deny
# REGRA DENY RFC 1918 CLASSE A
- condition: '10.0.0.0/8'
ge: 8
le: 32
action: deny
# REGRA DENY RFC 1918 CLASSE B
- condition: '172.16.0.0/12'
ge: 12
le: 32
action: deny
# REGRA DENY RFC 1918 CLASSE C
- condition: '192.168.0.0/16'
ge: 16
le: 32
action: deny
# REGRA DENY LO
- condition: '127.0.0.0/8'
ge: 8
le: 32
action: deny
# REGRA DENY ASN PREFIXO
- condition: 'SEU_PREFIXO_IPv4_AGORA'
ge: 22
le: 32
action: deny
# REGRA DENY DEFAULT ROUTE
- condition: '0.0.0.0/8'
ge: 8
le: 32
action: deny
- condition: '0.0.0.0/0'
ge: 32
le: 32
action: permit
command: 'tracert -w 500 -q 1 -f 1 -a {source4} {target}'
# REGRA DENY SITE LOCAL DEPRECIADO RFC 3879
- condition: 'fec0::/10'
ge: 10
le: 128
action: deny
# REGRA DENY ULA RFC 4193
- condition: 'fc00::/7'
ge: 7
le: 128
action: deny
# REGRA DENY LINK LOCAL RFC 4291
- condition: 'fe80::/10'
ge: 10
le: 128
action: deny
# REGRA DENY Unspecified RFC 4291
- condition: '::/128'
ge: 128
le: 128
action: deny
# REGRA DENY LO RFC 4291
- condition: '::1/128'
ge: 128
le: 128
action: deny
# REGRA DENY ASN PREFIXO
- condition: 'SEU_PREFIXO_IPv6_AGORA'
ge: 32
le: 128
action: deny
- condition: '::/0'
ge: 128
le: 128
action: permit
command: 'tracert ipv6 -w 500 -q 1 -f 1 -a {source6} {target}'
field:
description: IP Address, or Hostname
Huawei_Ping:
name: Ping
rules:
# REGRA DENY RFC 6598
- condition: '100.64.0.0/10'
ge: 10
le: 32
action: deny
# REGRA DENY RFC 1918 CLASSE A
- condition: '10.0.0.0/8'
ge: 8
le: 32
action: deny
# REGRA DENY RFC 1918 CLASSE B
- condition: '172.16.0.0/12'
ge: 12
le: 32
action: deny
# REGRA DENY RFC 1918 CLASSE C
- condition: '192.168.0.0/16'
ge: 16
le: 32
action: deny
# REGRA DENY LO
- condition: '127.0.0.0/8'
ge: 8
le: 32
action: deny
# REGRA DENY ASN PREFIXO
- condition: 'SEU_PREFIXO_IPv4_AGORA'
ge: 22
le: 32
action: deny
# REGRA DENY DEFAULT ROUTE
- condition: '0.0.0.0/8'
ge: 8
le: 32
action: deny
- condition: '0.0.0.0/0'
ge: 32
le: 32
command: 'ping -t 500 -c 5 -a {source4} {target}'
# REGRA DENY SITE LOCAL DEPRECIADO RFC 3879
- condition: 'fec0::/10'
ge: 10
le: 128
action: deny
# REGRA DENY ULA RFC 4193
- condition: 'fc00::/7'
ge: 7
le: 128
action: deny
# REGRA DENY LINK LOCAL RFC 4291
- condition: 'fe80::/10'
ge: 10
le: 128
action: deny
# REGRA DENY Unspecified RFC 4291
- condition: '::/128'
ge: 128
le: 128
action: deny
# REGRA DENY LO RFC 4291
- condition: '::1/128'
ge: 128
le: 128
action: deny
# REGRA DENY ASN PREFIXO
- condition: 'SEU_PREFIXO_IPv6_AGORA'
ge: 32
le: 128
action: deny
- condition: '::/0'
ge: 128
le: 128
action: permit
command: 'ping ipv6 -t 500 -c 5 -a {source6} {target}'
field:
description: IP Address, or Hostname
Loading