1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-29 13:29:20 +00:00
Commit graph

176 commits

Author SHA1 Message Date
Wilhelm Schonfeldt
4a1057651f
feat: comprehensive IP enrichment and traceroute improvements
MAJOR ENHANCEMENTS:

IP Enrichment Service (hyperglass/external/ip_enrichment.py):
- Increase IXP data cache duration from 24 hours to 7 days (604800s) for better performance
- Fix critical cache refresh logic: ensure_data_loaded() now properly checks expiry before using existing pickle files
- Remove 'force' refresh parameters from public APIs and admin endpoints to prevent potential abuse/DDOS
- Implement automatic refresh based on file timestamps and cache duration
- Add comprehensive debug logging gated by Settings.debug throughout the module
- Clean up verbose comments and improve code readability
- Update configuration model to enforce 7-day minimum cache timeout

MikroTik Traceroute Processing:
- Refactor trace_route_mikrotik plugin to use garbage cleaner before structured parsing
- Only log raw router output when Settings.debug is enabled to reduce log verbosity
- Simplify MikrotikTracerouteTable parser to expect pre-cleaned input from garbage cleaner
- Remove complex multi-table detection, format detection, and deduplication logic (handled by cleaner)
- Add concise debug messages for processing decisions and configuration states

Traceroute IP Enrichment (traceroute_ip_enrichment.py):
- Implement concurrent reverse DNS lookups using asyncio.to_thread and asyncio.gather
- Add async wrapper for reverse DNS with proper error handling and fallbacks
- Significant performance improvement for multi-hop traceroutes (parallel vs sequential DNS)
- Proper debug logging gates: only detailed logs when Settings.debug=True
- Upgrade operational messages to log.info level (start/completion status)
- Maintain compatibility with different event loop contexts and runtime environments

Configuration Updates:
- Update structured.ip_enrichment.cache_timeout default to 604800 seconds
- Update documentation to reflect new cache defaults and behavior
- Remove force refresh options from admin API endpoints

MIGRATION NOTES:
- Operators should ensure /etc/hyperglass/ip_enrichment directory is writable
- Any code relying on force refresh parameters must be updated
- Monitor logs for automatic refresh behavior and performance improvements
- The 7-day cache significantly reduces PeeringDB API load

PERFORMANCE BENEFITS:
- Faster traceroute enrichment due to concurrent DNS lookups
- Reduced external API calls with longer IXP cache duration
- More reliable refresh logic prevents stale cache usage
- Cleaner, more focused debug output when debug mode is disabled

TECHNICAL DETAILS:
- Uses asyncio.to_thread for non-blocking DNS operations
- Implements process-wide file locking for safe concurrent cache updates
- Robust fallbacks for various asyncio execution contexts
- Maintains backward compatibility while improving performance

FILES MODIFIED:
- hyperglass/external/ip_enrichment.py
- hyperglass/models/config/structured.py
- hyperglass/api/routes.py
- hyperglass/plugins/_builtin/trace_route_mikrotik.py
- hyperglass/models/parsing/mikrotik.py
- hyperglass/plugins/_builtin/traceroute_ip_enrichment.py
- docs/pages/configuration/config/structured-output.mdx
2025-10-05 21:25:58 +02:00
WilhelmZA
93edf34ccf
Merge branch 'main' into structured 2025-09-30 16:49:45 +02:00
Wilhelm Schonfeldt
9db9849a59
feat(structured): release structured feature set (squash merge)
Summary:
- Add structured traceroute support with comprehensive IP enrichment (ASN/org/RDNS).
- Improve MikroTik traceroute cleaning and aggregation; collapse repeated tables into a single representative table.
- Enhance traceroute logging for visibility and add traceroute-specific cleaning helpers.
- Add/adjust IP enrichment plugins and BGP/traceroute enrichment integrations.
- UI updates for traceroute output and path visualization; update docs and configuration for structured output.

This commit squashes changes from 'structured-dev' into a single release commit.
2025-09-30 16:46:01 +02:00
Jason Hall
af7cf95968
Merge branch 'main' into computroniks/bug/#311-fix-field-validation 2025-09-27 20:58:59 -04:00
Wilhelm Schonfeldt
8f7fcac4b1 docs: Add comprehensive configuration documentation and user guide
- Add complete configuration reference (complete-config.mdx) with detailed parameter documentation, examples, and descriptions for all config.yaml options
- Add user guide (user-guide.mdx) explaining hostname resolution, 'My IP' feature, query types, and troubleshooting for end users
- Add quick-start configuration examples (quick-start.mdx) with 8 real-world scenarios: minimal, corporate, privacy-focused, high-performance, ISP, enterprise, development, and monitoring setups
- Update navigation structure (_meta.tsx files) to integrate new documentation sections
- Provide comprehensive coverage of DNS-over-HTTPS hostname resolution, myip.wtf IP detection, web UI customization, logging/webhooks, structured output, and theme configuration
- Include practical examples, use cases, troubleshooting tips, and best practices throughout

This addresses documentation gaps by providing both technical reference material for administrators and user-focused guidance for end users, with extensive real-world configuration examples.
2025-09-26 12:12:27 +02:00
Wilhelm Schonfeldt
eabd98b606 feat: Add BGP community friendly names and enhance RPKI configuration
- Add new 'name' mode for BGP communities to append friendly names
  - New configuration option `structured.communities.mode: name`
  - Community mappings via `structured.communities.names` dictionary
  - Communities display as "65000:1000 - Upstream Any" in UI
  - Backward compatible with existing permit/deny modes

- Enhance RPKI configuration documentation
  - Document both Cloudflare and Routinator backend options
  - Add `structured.rpki.backend` and `structured.rpki.rpki_server_url` parameters
  - Clarify Routinator web API endpoint usage vs RTR port
  - Add comprehensive configuration examples

- Update structured output platform support
  - Document all supported platforms: Arista EOS, FRRouting, Huawei VRP, Juniper Junos, Mikrotik RouterOS/SwitchOS

- Frontend enhancements
  - Parse comma-separated community format in UI components
  - Display friendly names alongside community codes
  - Maintain existing functionality for communities without names

- Add validation and examples
  - Validate that 'name' mode has community mappings configured
  - Include example configuration and test cases
  - Generic examples using ASN 65000 instead of specific networks
2025-09-26 11:32:29 +02:00
Jason Hall
df684eb869
bump pnpm version in docs 2025-06-14 22:01:41 -04:00
Daniel Matsson
b7abe8d027 Fix code block padding in docs 2025-06-09 21:26:11 -04:00
Jason Hall
8fbf25dd14 Adds optional step to switch to a release tag 2025-06-06 06:16:23 -04:00
Mattie Nickson
f49ff54fce
Update docs field examples to include required options
Signed-off-by: Mattie Nickson <mnickson@sidingsmedia.com>
2025-06-04 18:34:59 +01:00
thatmattlove
ec3c55aa81 prepare v2.0.4 2024-07-01 00:01:03 -04:00
thatmattlove
872c3ec654 Closes #269: fix RPKI docs 2024-06-30 23:26:52 -04:00
thatmattlove
4733dd1893 prepare v2.0.3 2024-06-16 17:17:13 -04:00
thatmattlove
0137b042dc prepare v2.0.2 2024-06-01 15:44:49 -04:00
thatmattlove
aab4ada723 add support for any DoH provider; closes #254; closes #256 2024-06-01 15:25:41 -04:00
thatmattlove
8a3d704eca fix broken license link 2024-06-01 14:50:00 -04:00
thatmattlove
0c643c6abd update upgrade docs & version updating script 2024-06-01 11:08:03 -04:00
thatmattlove
74a6ee3ab8 fix docs opengraph tags 2024-05-28 21:35:58 -04:00
thatmattlove
556dccf509 update docs backend
fixes issue with OpenGraph tags
2024-05-28 21:30:33 -04:00
thatmattlove
42e217ad90 include changelog with docs 2024-05-28 14:56:28 -04:00
thatmattlove
c076619e22 add upgrade docs [WIP] 2024-05-27 16:26:34 -04:00
thatmattlove
8be5562ba7 update docs 2024-04-02 16:26:50 -04:00
thatmattlove
d78c8da129 update docs 2024-04-02 00:07:35 -04:00
thatmattlove
4da0f6f01a fix manual request docs links 2024-04-01 23:46:06 -04:00
thatmattlove
e7e8b9b881 update docs 2024-03-25 00:01:16 -04:00
thatmattlove
f723e2f988 Add builtins directive configuration example. Closes #238 2024-03-24 14:55:56 -04:00
thatmattlove
5f3b669388 improve docs 2024-03-20 18:49:51 -04:00
thatmattlove
e8ff239fdb dynamically populate native platform list on main page 2024-03-20 01:04:39 -04:00
thatmattlove
847e55098b update docs & examples 2024-03-20 00:57:11 -04:00
thatmattlove
e00cccb0a1 update docs next config 2024-03-03 00:29:36 -05:00
thatmattlove
2c6ae24b42 update docs site 2024-03-02 00:29:06 -05:00
thatmattlove
e3f40b4f7b add platforms page 2022-12-26 14:29:16 -05:00
thatmattlove
82e5267292 improve docs 2022-12-26 13:03:10 -05:00
thatmattlove
a6bb2004f8 add plugins docs 2022-12-24 17:53:20 -05:00
thatmattlove
086279ab85 start plugins docs 2022-12-19 16:58:22 -05:00
thatmattlove
22c65b9d56 try unoptimized images 2022-12-19 16:18:01 -05:00
thatmattlove
bfe3efbc70 add experimental edge to next config 2022-12-19 15:44:48 -05:00
thatmattlove
f8fcbd306c add missing tsc dependency 2022-12-19 15:33:56 -05:00
thatmattlove
f4a7d128e2 add noindex nofollow tags to docs 2022-12-19 15:11:39 -05:00
thatmattlove
f37eb9abf7 add v2 docs, minor refactoring 2022-12-19 14:57:20 -05:00
thatmattlove
fc3ba3a8be clean up unused parameters and start work on 2.0.0 docs 2022-12-12 18:52:39 -05:00
thatmattlove
c1e1d7ca41 Closes #148: Fix Debian/Ubuntu python package name 2021-07-03 21:58:58 -07:00
checktheroads
eea833ed44 Update GitHub username 2021-06-23 19:22:30 -07:00
checktheroads
d23e142343 Fix broken links in docs 2021-06-01 18:23:44 -07:00
checktheroads
dfacccea54 Migrate to hyperglass.dev domain 2021-05-31 18:31:14 -07:00
checktheroads
231443f221 Fix docs errors 2021-05-30 16:32:03 -07:00
checktheroads
622f48c237 Fix docs build errors 2021-05-30 16:15:55 -07:00
checktheroads
6c5839be70 #143: Begin hyperglass-agent deprecation 2021-05-30 15:47:48 -07:00
checktheroads
4a37fba1a0 Migrate custom docs components to typescript 2021-05-30 15:45:19 -07:00
checktheroads
c9febf39b7 Update docs for #140 2021-05-30 14:36:12 -07:00