Compare commits

...

445 commits

Author SHA1 Message Date
8d21da01a1
Fix 6WIND ping directive 2024-11-15 20:01:04 +00:00
ee7d8752f8 Add Witine customisations (#2)
Reviewed-on: #2
2024-11-15 18:40:53 +00:00
18e0b3e7e7 Add 6WIND directives (#1)
Reviewed-on: #1
2024-11-15 17:34:29 +00:00
thatmattlove
0b2fbb1b4d Update changelog with fix from #264 2024-07-01 00:08:01 -04:00
Matt Love
c2142ee76f
Merge pull request #264 from openxbr/main
Fix for IPv6 traceroute for juniper devices
2024-07-01 00:06:15 -04:00
thatmattlove
ec3c55aa81 prepare v2.0.4 2024-07-01 00:01:03 -04:00
thatmattlove
a5bc1ca8a0 fix formatting 2024-06-30 23:55:59 -04:00
thatmattlove
0f52bc438f closes #268: fix issue with mikrotik commands 2024-06-30 23:55:05 -04:00
thatmattlove
e0751311ba remove unnecessary logging 2024-06-30 23:54:37 -04:00
thatmattlove
f340e65082 fix BGP route validation 2024-06-30 23:33:06 -04:00
thatmattlove
872c3ec654 Closes #269: fix RPKI docs 2024-06-30 23:26:52 -04:00
thatmattlove
41248231ae fix logging issues 2024-06-30 23:22:46 -04:00
thatmattlove
b617df24d1 fixes #267: fix response caching 2024-06-30 22:22:44 -04:00
thatmattlove
3b0abd5ba8 don't cache errors 2024-06-30 21:34:42 -04:00
thatmattlove
0fd5bc7997 fix incorrectly named ui filename 2024-06-30 21:16:21 -04:00
Renato Ornelas
e8997b981c Fix for IPv6 traceroute for juniper devices 2024-06-19 15:11:22 -03:00
thatmattlove
bbba29546c fix biome ignore 2024-06-16 17:20:14 -04:00
thatmattlove
7eb8d8e925 fix formatting 2024-06-16 17:18:58 -04:00
thatmattlove
4733dd1893 prepare v2.0.3 2024-06-16 17:17:13 -04:00
thatmattlove
08fd310b44 fix issue where pattern rules failed validation 2024-06-16 17:12:54 -04:00
thatmattlove
6d06b9809d (possibly) fix log width issue 2024-06-16 16:59:22 -04:00
thatmattlove
30fda91bc8 closes #262: fix mikrotik error 2024-06-16 16:54:14 -04:00
thatmattlove
e19dd675e5 fix issue where results accordion did not re-open 2024-06-16 16:53:46 -04:00
thatmattlove
8a9766b99f formatting cleanup 2024-06-16 16:53:30 -04:00
thatmattlove
4d5e259f6e fix non-success display issue 2024-06-16 16:53:14 -04:00
thatmattlove
f324d34323 housekeeping 2024-06-01 23:23:08 -04:00
thatmattlove
3d82a21ba4 fix changelog link 2024-06-01 15:55:07 -04:00
thatmattlove
0137b042dc prepare v2.0.2 2024-06-01 15:44:49 -04:00
thatmattlove
6b37ce96f6 fix logo alignment on small screens; closes #258 2024-06-01 15:40:49 -04:00
thatmattlove
aab4ada723 add support for any DoH provider; closes #254; closes #256 2024-06-01 15:25:41 -04:00
thatmattlove
bfcae89bf0 fix prepending of HYPERGLASS_APP_PATH to values; closes #253 2024-06-01 15:08:59 -04:00
thatmattlove
8a3d704eca fix broken license link 2024-06-01 14:50:00 -04:00
thatmattlove
b796149a26 fix dropdown remaining open after selection; closes #257 2024-06-01 14:49:05 -04:00
thatmattlove
0c643c6abd update upgrade docs & version updating script 2024-06-01 11:08:03 -04:00
thatmattlove
7eb4f5ca93 fix leftover issue from #247 if build_dir does not exist 2024-05-31 23:11:08 -04:00
thatmattlove
35d9c26eff update version to 2.0.1 2024-05-31 23:06:33 -04:00
thatmattlove
1d1dcd8319 fix logo width on mobile 2024-05-31 23:00:51 -04:00
thatmattlove
c79ba8b727 fix browser DNS resolution; closes #251 2024-05-31 22:56:55 -04:00
thatmattlove
c8a348ed0f fix invalid next.config.js options 2024-05-31 22:56:26 -04:00
thatmattlove
4b6e6cba70 fix config value overwrite; closes #249 2024-05-31 22:24:41 -04:00
thatmattlove
ad88d025c2 fix leftover issue from #247 if build_dir does not exist 2024-05-31 22:22:39 -04:00
Matt Love
72887e0f9a
Merge pull request #247 from maluueu/244-build-ui-error
hyperglass: frontend: delete build dir before copying generated code to it
2024-05-31 22:14:25 -04:00
Marlon Alkan
85fa678d74
hyperglass: frontend: delete build dir before copying generated code to it
fixes #244
2024-05-29 18:03:06 +02: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
ce1b720267 migrate docker container to alpine 2024-05-28 17:37:29 -04:00
thatmattlove
42e217ad90 include changelog with docs 2024-05-28 14:56:28 -04:00
thatmattlove
15ff03806a properly format menu content with configuration parameters 2024-05-28 14:42:45 -04:00
thatmattlove
f52fdbd215 update changelog for v2 2024-05-28 14:23:10 -04:00
thatmattlove
25268472cb fix dead readme links 2024-05-28 14:01:25 -04:00
thatmattlove
d1a62f9646 update repo for v2 release 2024-05-28 13:42:25 -04:00
thatmattlove
8598727814 update readme 2024-05-28 13:30:04 -04:00
thatmattlove
11c94d5713 ci: add github actions to action paths 2024-05-28 13:13:03 -04:00
thatmattlove
00c9c810d7 ci: update python versions 2024-05-28 13:11:46 -04:00
thatmattlove
331cd45acd fix ci: update rye setup action for new url 2024-05-27 16:36:00 -04:00
thatmattlove
c076619e22 add upgrade docs [WIP] 2024-05-27 16:26:34 -04:00
thatmattlove
ee5a418264 fix import sorting 2024-05-27 16:25:47 -04:00
thatmattlove
dd2ce8354b fix handling of litestar.exceptions.ValidationException. Probably fixes #243 2024-05-27 16:25:26 -04:00
thatmattlove
594d2e90f8 fix container file handling 2024-05-27 16:08:50 -04:00
thatmattlove
58b51b7c8e fix existing directory error; closes #244, #246 2024-05-27 15:25:34 -04:00
thatmattlove
e84cc4ac00 remove deprecated pydantic constr usage 2024-05-27 14:41:04 -04:00
thatmattlove
bccc07cc99 fix import formatting 2024-05-27 14:30:15 -04:00
thatmattlove
3b1cedf552 fix docker build issue 2024-05-27 14:21:30 -04:00
thatmattlove
be09dbc476 remove --no-lint from next build
Apparently, it causes errors. Which is stupid.
2024-04-02 16:41:21 -04:00
thatmattlove
9d1c6a5e4a remove deprecated next export from UI build 2024-04-02 16:27:07 -04:00
thatmattlove
8be5562ba7 update docs 2024-04-02 16:26:50 -04:00
thatmattlove
c1274e2045 fix missing attrs in example devices file 2024-04-02 16:26:44 -04:00
thatmattlove
ba045b6f8e fix log messaging output 2024-04-02 10:10:16 -04:00
thatmattlove
fedd0b4196 fix missing startup actions; closes #242 2024-04-02 10:10:03 -04:00
thatmattlove
7c398fdf4f remove params.docs.mode field; fix params.docs.path default value 2024-04-02 00:08:06 -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
e6b6ab5812 remove test function 2024-04-01 23:45:56 -04:00
thatmattlove
d2f734ba1c logging overhaul 2024-04-01 23:42:07 -04:00
thatmattlove
d2e1486b5a initial migration to litestar 2024-03-26 23:59:42 -04:00
thatmattlove
1ef376fb38 improve fake output 2024-03-25 00:10:17 -04:00
thatmattlove
e7e8b9b881 update docs 2024-03-25 00:01:16 -04:00
thatmattlove
19bdfe74d0 fix PeeringDB link rendering 2024-03-24 16:50:31 -04:00
thatmattlove
0cbec73061 fix logo not displaying in FireFox. Closes #229 2024-03-24 15:19:53 -04:00
thatmattlove
f723e2f988 Add builtins directive configuration example. Closes #238 2024-03-24 14:55:56 -04:00
thatmattlove
8ab9caa45b fix issue where incorrect light/dark logo was loaded. closes #240 2024-03-24 14:39:41 -04:00
thatmattlove
7eec1727b1 fix issue where 'my ip' value was not added to form state. closes #239 2024-03-24 14:27:00 -04:00
thatmattlove
5f3b669388 improve docs 2024-03-20 18:49:51 -04:00
thatmattlove
cea421c939 fix render error when rendering select element; change max device per group count to 9; closes #237 2024-03-20 17:47:53 -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
5d39ff054f fix ip validation rule when querying an IPv6 target 2024-03-19 23:27:38 -04:00
thatmattlove
a8476f2ea9 fix import sorting 2024-03-17 16:04:41 -04:00
thatmattlove
74827c02b9 fix unused import 2024-03-17 16:04:00 -04:00
thatmattlove
7c65066a20 remove commented items from dockerfile 2024-03-17 16:03:07 -04:00
thatmattlove
6025023c5d remove legacy tooling 2024-03-17 16:02:58 -04:00
thatmattlove
d706ff1959 fix test fixtures 2024-03-17 15:59:34 -04:00
thatmattlove
ca9c604416 remove legacy install script 2024-03-16 23:18:23 -04:00
thatmattlove
77c0a31256 upgrade major dependencies 2024-03-16 23:17:54 -04:00
thatmattlove
e00cccb0a1 update docs next config 2024-03-03 00:29:36 -05:00
thatmattlove
09a451c55f add docker & docker compose support 2024-03-03 00:21:43 -05:00
thatmattlove
016cfd71d4 remove trailing slash from query hook 2024-03-03 00:21:24 -05:00
thatmattlove
20ae02e2e5 fix & clean up api response models 2024-03-03 00:21:08 -05:00
thatmattlove
213da6380b add logging to error handlers 2024-03-03 00:20:54 -05:00
thatmattlove
ec5c0362e3 only run backend actions when project files change 2024-03-03 00:20:46 -05:00
thatmattlove
2c6ae24b42 update docs site 2024-03-02 00:29:06 -05:00
thatmattlove
77d2be6b09 fix venv activation in CI 2024-03-02 00:09:59 -05:00
thatmattlove
2c1be54341 fix call to taskipy binary in CI 2024-03-02 00:05:57 -05:00
thatmattlove
825961a0eb only run frontend tests when necessary 2024-03-02 00:05:44 -05:00
thatmattlove
8ff13799b2 update rye setup action 2024-03-01 23:59:02 -05:00
thatmattlove
125d73d281 fix type errors for non-existent hyperglass.json file 2024-03-01 23:58:55 -05:00
thatmattlove
16b4f60aef fix ci jobs 2024-03-01 23:35:44 -05:00
thatmattlove
a6794ad2ac fix ci jobs 2024-03-01 23:31:17 -05:00
thatmattlove
4a45ea0ddc fix ci configs 2024-03-01 23:26:05 -05:00
thatmattlove
fc58f57d10 update ci jobs 2024-03-01 23:20:02 -05:00
thatmattlove
99ec07d055 fix issues causing test failure 2024-03-01 23:19:08 -05:00
thatmattlove
92bc28ac05 improve state handling & logging 2024-03-01 23:18:11 -05:00
thatmattlove
9e6e0d55ee fix missing toml dependency 2024-03-01 23:17:57 -05:00
thatmattlove
cfd8f0d670 add tooltip for bgp table when AS path lenght is 0 2024-02-28 22:56:34 -05:00
thatmattlove
f0028a3df6 fix text output empty bug 2024-02-28 22:46:49 -05:00
thatmattlove
0c0bdc7f9b update UI dependencies, fix layout issues 2024-02-28 22:26:16 -05:00
thatmattlove
8c8e4f8109 remove trailing slash requirement for /api/query 2024-02-27 23:02:40 -05:00
thatmattlove
2e1582a674 tooling cleanup 2024-02-27 22:55:32 -05:00
thatmattlove
3f88af4d65 update local development server to support next rewrites 2024-02-27 22:35:02 -05:00
thatmattlove
cd6bf7a162 tooling overhaul 2024-02-27 17:44:19 -05:00
thatmattlove
ae2753b695 fix location card layout 2024-02-17 16:19:31 -05:00
thatmattlove
0397605fc6 migrate ui to pnpm 2024-02-17 16:01:11 -05:00
thatmattlove
cbaf102015 fix issue where if greeting is disabled, the page reloads 2024-02-17 15:59:22 -05:00
thatmattlove
52f910f616 add comment about M1 macs and system-info 2023-04-14 00:24:41 -04:00
thatmattlove
315abe5a4e update dependencies 2023-04-14 00:24:23 -04:00
thatmattlove
446853e4a9 countless updates I mostly don't remember. 2023-04-13 23:05:05 -04:00
thatmattlove
b94eb3006a update & fix tests 2023-04-13 21:43:20 -04:00
thatmattlove
a15fe52061 fix typo 2022-12-30 23:40:14 -05:00
thatmattlove
6fcf8ca837 Add OpenBGPD support, closes #206 2022-12-26 16:24:24 -05:00
thatmattlove
7fd35f5d6f fix device_type selection for linux platforms 2022-12-26 16:23:56 -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
e494db5337 remove legacy parsers 2022-12-26 11:15:20 -05:00
thatmattlove
2c7456c317 replace legacy mikrotik parsing with builtin plugin 2022-12-26 11:05:46 -05:00
thatmattlove
c8c13eea27 migrate legacy builtin commands to directives 2022-12-26 10:57:30 -05:00
thatmattlove
0ebe265cb9 bump ruff version 2022-12-26 10:57:18 -05:00
thatmattlove
47ac13e06f remove legacy logo 2022-12-26 10:17:44 -05:00
thatmattlove
e29dbba5a7 fix readme badges 2022-12-26 10:12:26 -05:00
thatmattlove
c5c14ab880 fix readme badges 2022-12-26 10:10:53 -05:00
thatmattlove
209c6fe92a update module docstring 2022-12-26 10:07:04 -05:00
thatmattlove
71834bfd4c increase minimum node version 2022-12-26 10:06:25 -05:00
thatmattlove
3e73d02c46 clean up compat module 2022-12-26 10:03:56 -05:00
thatmattlove
288233e059 add file utility tests 2022-12-26 09:57:30 -05:00
thatmattlove
3397121732 slightly refactor file utilities 2022-12-26 09:57:11 -05:00
thatmattlove
5384bba56a general clean up 2022-12-26 09:56:51 -05:00
thatmattlove
daa3d409fa update installer 2022-12-24 18:25:58 -05:00
thatmattlove
bda17d546e Revert "update installer"
This reverts commit 3d579d5961.
2022-12-24 18:24:46 -05:00
thatmattlove
3d579d5961 update installer 2022-12-24 18:21:31 -05:00
thatmattlove
43faa0f8e4 fix zip error 2022-12-24 18:21:25 -05:00
thatmattlove
63611311da update gitignore 2022-12-24 17:54:11 -05:00
thatmattlove
a6bb2004f8 add plugins docs 2022-12-24 17:53:20 -05:00
thatmattlove
9c9a8469a4 replace flake8 with ruff for linting, refactor issues 2022-12-24 17:53:05 -05:00
thatmattlove
086279ab85 start plugins docs 2022-12-19 16:58:22 -05:00
thatmattlove
4dfe5749ae fix import sorting 2022-12-19 16:58:12 -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
c6144b9b5b update ci actions 2022-12-11 17:49:29 -05:00
thatmattlove
60429ebbc1 commit previous changes and dep updates 2022-12-11 17:30:20 -05:00
thatmattlove
9300105d9f #142: Start multiple query target implementation 2021-12-23 00:00:35 -07:00
thatmattlove
433b5cecee Fixes #180: properly validate long FQDNs 2021-12-22 22:43:26 -07:00
thatmattlove
16e9dc82fa remove legacy jwt encoding module 2021-12-22 22:25:09 -07:00
thatmattlove
dfca1a5bc1 Move isort configuration to pyproject.toml 2021-12-22 22:22:01 -07:00
thatmattlove
3cf84a8001 add use-dns-query test 2021-12-20 10:58:38 -07:00
thatmattlove
2dd03ad81d refactor and restructure ui theme hooks 2021-12-19 23:30:09 -07:00
thatmattlove
fe8cd9f356 refactor and restructure ui hooks 2021-12-19 23:02:01 -07:00
thatmattlove
227da64c9a refactor and restructure ui components 2021-12-19 22:57:00 -07:00
thatmattlove
9a04ef1dfc remove legacy types 2021-12-18 23:47:24 -07:00
thatmattlove
93adc09e63 refactor, restructure typescript types 2021-12-18 23:45:06 -07:00
thatmattlove
47711fb075 improve directive info styling 2021-12-18 21:52:05 -07:00
thatmattlove
c479a2f2b4 Add info support back to directives 2021-12-18 19:38:13 -07:00
thatmattlove
292aa7612b fix duplicate @emotion/react bundling 2021-12-18 00:30:46 -07:00
thatmattlove
4ee97ec0b2 cleanup & animation improvement 2021-12-18 00:29:51 -07:00
thatmattlove
ba2ce4b930 improve form state logic, fix issue with intersection directive selection 2021-12-17 23:00:36 -07:00
thatmattlove
196fb43ea7 implement react-if 2021-12-17 21:44:35 -07:00
thatmattlove
c8663d7029 improve component types 2021-12-17 21:08:45 -07:00
thatmattlove
15c29a09d7 fix icon name 2021-12-17 20:38:39 -07:00
thatmattlove
0cd44e7fdf improve log messages 2021-12-17 20:37:03 -07:00
thatmattlove
a19f0aa7d9 Fix plugin import error 2021-12-17 20:32:08 -07:00
thatmattlove
1543f8d7c5 restructure api routes/tasks 2021-12-17 20:17:52 -07:00
thatmattlove
8f0163c453 Fix import sorting 2021-12-17 11:25:04 -07:00
thatmattlove
ab2c7d4ced fix broken utility exports 2021-12-17 10:36:30 -07:00
thatmattlove
b7b681f3d3 Restructure utilities, add tests 2021-12-15 00:50:20 -07:00
thatmattlove
44a1b0aa78 Remove unnecessary dependencies 2021-12-14 23:02:05 -07:00
thatmattlove
f8a4cad5de Improve external http client typing and add tests 2021-12-14 22:59:05 -07:00
thatmattlove
a902dc720d remove legacy ripestat api 2021-12-14 21:52:04 -07:00
thatmattlove
5f4d5049e0 Properly handle empty/missing custom JS/HTML 2021-12-14 01:35:58 -07:00
thatmattlove
bd0eb65ffc Closes #173: Implement customizable highlighting of text output 2021-12-14 01:31:45 -07:00
thatmattlove
5bf69f7923 Fix fake output handling 2021-12-13 22:15:06 -07:00
thatmattlove
56432013e0 Closes #177: Remove unnecessary method from http logging 2021-12-08 23:20:30 -07:00
thatmattlove
7d41dbf4bf Fixes #178: Set MED to 0 on Arista routes if none is specified 2021-12-08 17:15:06 -07:00
thatmattlove
c8892f43ea Implement Arista table output plugin and default directive 2021-12-08 17:13:56 -07:00
thatmattlove
0ec3086c67 Closes #176: Deprecate native google analytics support; Add support for custom JS and HTML 2021-12-08 16:23:59 -07:00
thatmattlove
8aeb8036ff Closes #175: Remove usage of hyperglass.env.json 2021-12-08 15:24:07 -07:00
thatmattlove
b49b6ea58e Allow customization of driver (Netmiko) configuration on a per-device basis 2021-12-08 12:00:02 -07:00
thatmattlove
6dea685eeb remove Redis 5 CI testing 2021-12-08 11:38:09 -07:00
thatmattlove
9bdb157ca4 update major dependencies 2021-12-08 11:38:00 -07:00
thatmattlove
37a14b125f remove custom static file directory 2021-12-08 11:35:42 -07:00
thatmattlove
ec1727437d Check for required directories prior to initializing configuration 2021-12-07 10:28:02 -07:00
thatmattlove
85f13dcc6c fix CI example file paths 2021-12-07 10:05:42 -07:00
thatmattlove
80e53fc0e5 Clean up CI test files 2021-12-07 09:52:52 -07:00
thatmattlove
38e5d486b8 Return an empty config if a file is missing and not required 2021-12-07 09:39:55 -07:00
thatmattlove
aaad4d9350 Fix legacy listen_address setting in CI 2021-12-07 09:33:19 -07:00
thatmattlove
685b32d4d6 Fix config file name in CI 2021-12-07 09:22:41 -07:00
thatmattlove
4f527d995f Remove unused import 2021-12-07 09:22:31 -07:00
thatmattlove
f2e206925a Populate user config to Redis prior to accessing it via build-ui 2021-12-07 09:13:54 -07:00
thatmattlove
bddcdcaca2 run configuration init at CLI prior to ui build 2021-12-06 17:46:48 -07:00
thatmattlove
92d112b2d1 start hyperglass prior to running tests in CI 2021-12-06 17:39:07 -07:00
thatmattlove
1fa113dfc2 fix $HOME environment variable in CI 2021-12-06 17:36:00 -07:00
thatmattlove
5c7e71618d fix $HOME environment variable in CI 2021-12-06 17:34:07 -07:00
thatmattlove
77453980c0 fix $HOME environment variable in CI 2021-12-06 17:31:08 -07:00
thatmattlove
7ed9e200b8 fix $HOME environment variable in CI 2021-12-06 17:27:05 -07:00
thatmattlove
b43ab14fdd add default app_path, add app_path to CI 2021-12-06 17:23:57 -07:00
thatmattlove
5306a76f1f Restructure backend CI 2021-12-06 17:12:44 -07:00
thatmattlove
c049569cab Update black 2021-12-06 17:12:30 -07:00
thatmattlove
ec28ccafbc fix missing log file in CI 2021-12-06 16:52:11 -07:00
thatmattlove
aa5adf3e7f fix hyperglass CLI naming 2021-12-06 16:51:59 -07:00
thatmattlove
6befe55ead fix frontend CI config 2021-12-06 16:47:11 -07:00
thatmattlove
383494b8ef Start CI rework 2021-12-06 16:44:46 -07:00
thatmattlove
889e44d6b1 Add UI tests 2021-12-06 16:34:45 -07:00
thatmattlove
196b3e0400 implement dynamic icon component & migrate back to react-icons 2021-12-06 14:33:20 -07:00
thatmattlove
7c1a5bf1c3 Improve form styles 2021-12-06 13:06:01 -07:00
thatmattlove
55a9918fd0 Minor improvements 2021-12-06 12:14:00 -07:00
thatmattlove
8aedbaa93d Upgrade major dependencies 2021-12-06 12:10:40 -07:00
thatmattlove
70cdd2359f Fix greeting state issue 2021-12-06 11:29:26 -07:00
thatmattlove
6afe23bd17 Upgrade react-select & improve select typing 2021-12-06 10:53:15 -07:00
thatmattlove
7c73b2b9a1 fix formatting 2021-11-07 01:19:35 -07:00
thatmattlove
55f8a62fb0 implement generic http client; remove hyperglass-agent connection handler 2021-11-07 01:19:29 -07:00
thatmattlove
c8f678f766 fix missing developer_mode property in UI parameters 2021-11-07 01:18:27 -07:00
thatmattlove
f6d3dfe1dc Closes #155: Implement User IP Button 2021-10-19 16:23:40 -07:00
thatmattlove
d4db98da5e Remove and consolidate legacy utilities 2021-10-15 20:07:24 -07:00
thatmattlove
57371dc7c4 Update flake8 config 2021-10-06 16:55:11 -07:00
thatmattlove
60786d1cea Remove Scrapli 2021-10-06 16:54:04 -07:00
thatmattlove
fe7abddd4e Fix tests 2021-10-04 01:43:02 -07:00
thatmattlove
28eb803a8e Add plugins CLI 2021-10-04 01:39:00 -07:00
thatmattlove
d21c604bee Remove legacy set_app_path call 2021-10-04 01:38:53 -07:00
thatmattlove
8013c48ae9 Copy plugins to module instead of kludgy import 2021-10-04 01:38:44 -07:00
thatmattlove
3c073878fa Add directives CLI 2021-10-03 23:39:17 -07:00
thatmattlove
a79a6687cf CLI style improvements 2021-10-03 23:36:34 -07:00
thatmattlove
8e32fe8151 Add params CLI 2021-10-03 23:28:43 -07:00
thatmattlove
5e1f96448e Add devices CLI 2021-10-03 23:15:32 -07:00
thatmattlove
2589c5fa06 Migrate to typer for hyperglass CLI, implement new setup 2021-09-27 01:40:49 -07:00
thatmattlove
fbe778a605 Improve logging 2021-09-26 16:50:25 -07:00
thatmattlove
e73de24904 Implement input-plugin-based validation, implement common plugins 2021-09-26 11:39:46 -07:00
thatmattlove
c2240d92c6 Remove query_group from query fields 2021-09-25 21:50:51 -07:00
thatmattlove
27b6ba09d8 Complete new config file implementation 2021-09-25 21:36:08 -07:00
thatmattlove
22ae6a97e8 Implement device description and avatar 2021-09-24 01:04:28 -07:00
thatmattlove
89568dc8e5 Deprecate Device.network 2021-09-24 00:16:26 -07:00
thatmattlove
509e8ac3ef Migrate devices to MultiModel 2021-09-23 22:36:25 -07:00
thatmattlove
fe7730dc35 Implement YAML/JSON/TOML/Python config file support 2021-09-23 01:00:58 -07:00
thatmattlove
f5e4c1e282 fix test regressions 2021-09-23 01:00:26 -07:00
thatmattlove
023c1a5889 Refactor HyperglassSettings name 2021-09-22 22:30:16 -07:00
thatmattlove
082c4175f4 Add UI tests 2021-09-21 10:12:07 -07:00
thatmattlove
85566b81ab UI improvements, hookstate → zustand migration, cleanup 2021-09-21 08:20:44 -07:00
thatmattlove
7d5d64c0e2 Plugin/directive fixes 2021-09-21 07:54:16 -07:00
thatmattlove
e62af507ee Pass full query to output plugin instead of device 2021-09-18 12:47:56 -07:00
thatmattlove
f508638399 Improve MultiModel API 2021-09-18 09:51:47 -07:00
thatmattlove
cd87c254e4 Overhaul configuration initialization process, add missing device to directive association 2021-09-17 18:15:59 -07:00
thatmattlove
af0d5345bf Add dict and object.__init__ comparison utilities with tests 2021-09-17 18:12:37 -07:00
thatmattlove
ed58c3622b Fix HyperglassMultiModel root class inheritance 2021-09-17 12:09:12 -07:00
thatmattlove
66e69db17d Add typing to custom WSGI app and initialize logging before startup 2021-09-17 12:08:38 -07:00
thatmattlove
7adb6ae0ec Add directives to global state 2021-09-17 09:04:59 -07:00
thatmattlove
9a57e4a728 Remove old parser 2021-09-17 01:12:42 -07:00
thatmattlove
99565da0f9 Implement HyperglassMultiModel to manage multiple objects 2021-09-17 01:12:33 -07:00
thatmattlove
6bc6cf0e1c Fix missing items from Device.platform refactor 2021-09-17 01:11:18 -07:00
thatmattlove
2474dc1761 fix broken test from Device.platform refactor 2021-09-17 01:10:17 -07:00
thatmattlove
ab097d4b06 Refactor Device.commands to Device.directives 2021-09-16 22:43:53 -07:00
thatmattlove
10b1c8d624 Remove old tests 2021-09-16 22:04:21 -07:00
thatmattlove
85d7f8876e Refactor Device.type to Device.platform 2021-09-16 22:04:15 -07:00
thatmattlove
cb5459a72a Add failure_reason to InputPlugin, add BGP Community builtin plugin and tests 2021-09-16 18:32:59 -07:00
thatmattlove
37a8e40bfe Move defaults into dedicated module 2021-09-16 17:13:15 -07:00
thatmattlove
dda73cb370 Refactor and restructure directive model 2021-09-16 17:12:30 -07:00
thatmattlove
446534d839 Improve bgp.tools data handling/validation 2021-09-16 16:46:56 -07:00
thatmattlove
6bdfa9e645 Fix string output type checks 2021-09-16 15:57:33 -07:00
thatmattlove
1a1b5aac2c Add is_series type guard, with tests 2021-09-16 15:57:12 -07:00
thatmattlove
725631568e Fix call to deprecated httpx.StatusCodes 2021-09-16 15:56:28 -07:00
thatmattlove
bb1e66c2ef Implement better __repr__ generator 2021-09-16 15:35:12 -07:00
thatmattlove
1e1dce1e30 Fix leftover issues from cache refactor 2021-09-16 15:33:15 -07:00
thatmattlove
b0d1e63d33 Fix missing property decorator on settings.prod_url 2021-09-16 13:59:55 -07:00
thatmattlove
4792269168 Fix query JSON serialization 2021-09-16 13:59:39 -07:00
thatmattlove
e06ea5ecb9 Add separate hooks for major state objects, add tests 2021-09-16 13:46:50 -07:00
thatmattlove
c99f98a6f0 Complete global state implementation 2021-09-15 18:25:37 -07:00
thatmattlove
a2ee4b50fa Implement global state 2021-09-15 00:57:45 -07:00
thatmattlove
b002c9d520 Update flake8 config for tests 2021-09-13 14:12:04 -07:00
thatmattlove
f1b664f09d Add processing checks for BGP route table plugin 2021-09-13 14:11:55 -07:00
thatmattlove
11fac961a0 Implement legacy field check & tests 2021-09-13 14:11:07 -07:00
thatmattlove
ac1e938bd3 Fix plugin registration for builtins 2021-09-13 14:10:50 -07:00
thatmattlove
f2cb15d0e2 Fix typing issues 2021-09-13 14:10:32 -07:00
thatmattlove
723048d1d1 Refactor nos naming to type/device_type 2021-09-13 10:00:44 -07:00
thatmattlove
e3be569322 Add pytest dependency 2021-09-13 02:40:24 -07:00
thatmattlove
26db076c57 Fix remove_command plugin errors 2021-09-13 02:40:10 -07:00
thatmattlove
7bd23e58c8 Implement Juniper BGP Route plugin and tests 2021-09-13 02:39:37 -07:00
thatmattlove
bcf339f78f Add is_type utility 2021-09-13 02:39:11 -07:00
thatmattlove
bf17ec0c95 add deep_convert_keys utility, improve type checking for get_fmt_keys 2021-09-13 02:38:57 -07:00
thatmattlove
641f1e1bdd Fix issue where structured_output: true on a device would cause it to be disabled 2021-09-13 02:38:08 -07:00
thatmattlove
1adad7e46d Implement plugins during execution workflow 2021-09-13 02:37:32 -07:00
thatmattlove
3d97d118fb Update plugin typings 2021-09-13 02:37:05 -07:00
thatmattlove
98201c1752 Update standard structured data models 2021-09-13 02:35:52 -07:00
thatmattlove
c7292dadd3 Fix deprecated base64 method 2021-09-13 02:33:22 -07:00
thatmattlove
21831d4766 Fix ValidationError handling in private exceptions 2021-09-13 02:33:10 -07:00
thatmattlove
b9503546df Move structured samples and remove old tests 2021-09-13 02:32:40 -07:00
thatmattlove
74fcb5dba4 Continue output plugin implementation 2021-09-12 18:27:33 -07:00
thatmattlove
560663601d Fix exception logging issue from Delgan/loguru#504 2021-09-12 18:27:10 -07:00
thatmattlove
a6572c01e5 Remove legacy exceptions 2021-09-12 15:10:07 -07:00
thatmattlove
52ebf4663c Update code formatting - line length 2021-09-12 15:09:24 -07:00
thatmattlove
a62785227e Start output plugin core implementation 2021-09-12 15:06:34 -07:00
thatmattlove
52b7cbdd3c Implement user API for plugins and fix plugin registration issues 2021-09-11 18:03:35 -07:00
thatmattlove
dc274992b8 Clean up API routes 2021-09-11 13:56:20 -07:00
thatmattlove
fb003f3248 Add GZIP support & swap Starlette classes for FastAPI classes 2021-09-11 13:10:05 -07:00
thatmattlove
a89d08ba58 Implement plugin manager and abstract plugin definition 2021-09-11 11:17:38 -07:00
thatmattlove
3c012f7ed1 Start output plugin feature 2021-09-11 00:47:01 -07:00
thatmattlove
76bf5eb380 Implement UI configuration response model 2021-09-10 23:13:27 -07:00
thatmattlove
0e6c5e02ad Add flake8 & isort tasks to taskipy 2021-09-10 01:18:59 -07:00
thatmattlove
99c7489441 Move UI Params into Pydantic model 2021-09-10 01:18:38 -07:00
thatmattlove
281895e259 Implement version manager & add tasks to poetry 2021-09-09 18:03:22 -07:00
thatmattlove
070a07d065 Implement client-side UI config fetching 2021-09-09 18:03:04 -07:00
thatmattlove
d1dae9d6ba Update gitignore 2021-09-08 08:40:54 -07:00
thatmattlove
eff99ad294 Update next, eslint, fix lint errors 2021-09-08 01:02:25 -07:00
thatmattlove
5ccfe50792 Complete directives implementation, refactor exceptions, deprecate VRFs, bump minimum Python version 2021-09-07 22:58:39 -07:00
thatmattlove
b05e544e40 Merge branch 'develop' into generic-commands 2021-07-06 22:05:37 -07:00
thatmattlove
65e44fd34e Fix CLI file name 2021-07-06 22:05:10 -07:00
thatmattlove
c52a6f6098 Release 1.0.4 2021-07-03 23:08:17 -07:00
thatmattlove
f235e29144 Improve system-info command output 2021-07-03 23:02:14 -07:00
thatmattlove
c1e1d7ca41 Closes #148: Fix Debian/Ubuntu python package name 2021-07-03 21:58:58 -07:00
thatmattlove
78571edb4e Closes #151: Fix issue with Junos parsing from d1160fe 2021-07-03 21:36:22 -07:00
thatmattlove
49808acb6f Improve handling of Junos XML errors 2021-07-03 21:35:14 -07:00
checktheroads
eea833ed44 Update GitHub username 2021-06-23 19:22:30 -07:00
checktheroads
f40004b38f continue generic command work 2021-06-23 19:11:59 -07:00
checktheroads
029649e44f Merge branch 'develop' into generic-commands
# Conflicts:
#	hyperglass/configuration/main.py
#	hyperglass/ui/components/form/queryType.tsx
#	hyperglass/ui/components/lookingGlass.tsx
2021-06-19 13:48:14 -07:00
checktheroads
4fb7be9bd7 Prepare 1.0.2 release 2021-06-18 22:42:29 -07:00
checktheroads
d1160fe4ba Closes #150: Port BIRD AS_Path/Community handling from hyperglass-agent 2021-06-18 22:36:52 -07:00
checktheroads
f2a285bcbe Bump version to 1.0.1 2021-06-17 21:57:08 -07:00
checktheroads
1e1fc49ccd Housekeeping 2021-06-17 21:56:15 -07:00
checktheroads
24a92d6154 Fix body overflow issue 2021-06-02 13:01:05 -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
05d64b5f12 Remove screenshots link from readme 2021-05-30 17:18:33 -07:00
checktheroads
6c182c15b5 Update issue templates 2021-05-30 17:14:02 -07:00
checktheroads
1cd7d7f977 Update readme & issue templates 2021-05-30 17:12: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
c98e244637 Update changelog to reflect hyperglass-agent deprecation changes 2021-05-30 16:04:05 -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
checktheroads
1aa08ccae8 Update docs framework 2021-05-30 12:03:18 -07:00
checktheroads
abd192250c Update version to v1.0.0 2021-05-30 01:12:32 -07:00
checktheroads
c0914f6216 Closes #140: Genericize footer links and menus and allow multiple definitions 2021-05-30 01:05:07 -07:00
checktheroads
69f21a4d64 Update UI dependencies 2021-05-29 23:30:38 -07:00
checktheroads
4c12f13d43 Closes #139: Enable querying by device hostname as well as internal ID 2021-05-29 21:48:59 -07:00
checktheroads
5f036228a5 initial work on generic commands 2021-05-29 21:26:03 -07:00
Matt Love
ed21382fd0
Update bug report template to reflect new labels 2021-05-27 21:47:29 -07:00
Matt Love
9727087134
Add new NetDev Slack landing page to Readme 2021-05-27 10:34:39 -07:00
checktheroads
7636e044b2 update readme 2021-04-24 17:19:56 -07:00
checktheroads
54eba20f6a bump version to 1.0.0-beta.82 2021-04-24 17:09:51 -07:00
checktheroads
8892b3ac04 use 'best' on all juniper bgp route queries, see #128 2021-04-24 17:08:39 -07:00
checktheroads
4c948fd97f fix an issue with juniper as_path queries that only returned ipv4 or ipv6 routes (not both), causing queries to fail 2021-04-24 17:03:39 -07:00
checktheroads
e2f1601553 update dependencies 2021-04-24 15:52:26 -07:00
checktheroads
879b750b58 upgrade react-flow & fix rendering of AS graph 2021-04-24 11:15:01 -07:00
checktheroads
aca3457011 update python dependencies 2021-04-24 10:44:40 -07:00
checktheroads
5217fcc2e5 implement ability to override device driver 2021-04-23 23:10:03 -07:00
checktheroads
1e6cd7a388 Merge branch 'v1.0.0' of github.com:checktheroads/hyperglass into v1.0.0 2021-04-23 00:28:37 -07:00
checktheroads
090bb89cdd upgrade scrapli to 2021.1.30 2021-04-23 00:28:13 -07:00
checktheroads
768e3c9749 remove legacy references to display_name 2021-04-22 22:29:13 -07:00
checktheroads
47fc55fb08 fix handling of juniper indirect next-hops, add tests. closes #135 2021-04-22 22:23:34 -07:00
checktheroads
fa19683cb2 update UI dependencies 2021-04-22 21:45:01 -07:00
Matt Love
bc2002e0ff
Merge pull request #127 from horsitis/patch-1
Update juniper.py
2021-04-10 16:14:21 -07:00
Matt Love
81c483c67e
Merge pull request #131 from shrunbr/v1.0.0
Adjust docs to state IPv6 addresses need to be in quotes
2021-04-10 15:37:37 -07:00
checktheroads
cc15aa1501 bump version to 1.0.0-beta.81 2021-04-10 11:26:04 -07:00
checktheroads
71caf051e1 fix select style 2021-04-10 11:18:51 -07:00
checktheroads
253d167a5a actually use light & dark for background/foreground colors. closes #133 2021-04-10 11:17:58 -07:00
checktheroads
7581d42df6 fix handling of Arista iBGP routes, closes #132 2021-04-10 11:00:26 -07:00
checktheroads
c6bcd4407f fix markdown rendering, closes #126 2021-04-10 09:53:06 -07:00
checktheroads
ab0d4eb940 sort locations & networks alphabetically, closes #124 2021-04-10 09:24:09 -07:00
shrunbr
d39eb8915d Added example to IPv6 address in quotes 2021-03-29 04:09:03 +00:00
shrunbr
2d55171b07 Added note to surround IPv6 address in quotes 2021-03-29 04:07:34 +00:00
horsitis
8a7077052a
Update juniper.py
Fix error "traceroute: wait must be >1 sec"
2021-03-17 11:50:50 +02:00
checktheroads
571d236871 bump version to v1.0.0-beta.80 2021-03-03 16:03:09 -07:00
checktheroads
ee4c653813 fix device location/vrf filtering logic 2021-03-03 15:57:47 -07:00
checktheroads
c2b8362e5e fix menu style in light mode, closes #121 2021-03-03 15:56:23 -07:00
checktheroads
d1c1492e2e bump version to v1.0.0-beta.79 2021-02-26 23:52:42 -07:00
checktheroads
e042c31f75 update docs for breaking VRF changes 2021-02-26 23:22:04 -07:00
checktheroads
364fba5ae9 fix code style 2021-02-26 23:21:48 -07:00
checktheroads
ce78fdda95 update UI deps 2021-02-26 11:29:32 -07:00
checktheroads
b77dbf198a update UI deps, migrate from yup to vest for form validation, migrate to palette-by-numbers for theming 2021-02-26 11:15:35 -07:00
checktheroads
f69322013d don't do external RPKI lookups for non-global prefixes 2021-02-25 23:40:19 -07:00
checktheroads
e4f4eb85b0 remove requirement for default VRF to be named default, closes #29 2021-02-25 23:38:57 -07:00
checktheroads
cca6b60f09 change timeout key passed to scrapli - fixes issue with long-running commands that exceed the standard timeout 2021-02-25 21:02:53 -07:00
checktheroads
c97e8daea0 bump version to v1.0.0-beta.78 2021-02-12 23:32:37 -07:00
checktheroads
b09cba9e17 add docs for arista structured output 2021-02-12 23:25:40 -07:00
checktheroads
c6b2d02628 fix warning color on active route in table output 2021-02-12 23:17:28 -07:00
checktheroads
1d0592a1cd improve UI error output 2021-02-12 23:09:44 -07:00
checktheroads
3886925501 add no_communities text field 2021-02-12 23:08:23 -07:00
checktheroads
9f50f41f7d add structured data support for arista_eos 2021-02-12 23:05:24 -07:00
checktheroads
a1d316b112 bump version to v1.0.0-beta.77 2021-02-10 00:53:18 -07:00
checktheroads
8c111d44dd update does for #117 change 2021-02-10 00:52:41 -07:00
checktheroads
72269f38f5 consolidate name & display name fields, closes #115 2021-02-10 00:43:40 -07:00
checktheroads
470be49370 handle systemexit 2021-02-10 00:42:33 -07:00
checktheroads
e9faef5c5f fix arista nos mapping, closes #117 2021-02-09 22:31:55 -07:00
Matt Love
b34c6e1162
merge v1.0.0-beta.76
V1.0.0 beta.76
2021-02-06 01:14:21 -07:00
checktheroads
f15fb4df28 fix code style 2021-02-06 00:59:16 -07:00
checktheroads
5e7e7c1226 bump version to 1.0.0-beta.76 2021-02-06 00:55:15 -07:00
checktheroads
5fb3fbeb54 update docs with frr/bird information 2021-02-06 00:48:38 -07:00
checktheroads
6bef010446 add FRR and BIRD SSH support 2021-02-06 00:19:29 -07:00
checktheroads
7c41c577d0 fix missing build-ui timeout argument 2021-02-06 00:19:04 -07:00
checktheroads
207b6ab9de fix as path graph layout 2021-02-01 01:11:23 -07:00
checktheroads
2db21ebd1a bump version to v1.0.0-beta.75 2021-01-28 23:04:57 -07:00
checktheroads
5e09fc90c3 update docs 2021-01-28 23:04:09 -07:00
checktheroads
042ce35672 increase default UI build timeout & add CLI option to override 2021-01-28 23:04:02 -07:00
checktheroads
81c65ce71e restructure util module 2021-01-28 23:02:25 -07:00
checktheroads
acd0f59465 bump version to 1.0.0-beta.74 2021-01-25 23:30:55 -07:00
checktheroads
da6ff9bf52 update UI dependenices 2021-01-25 23:29:53 -07:00
checktheroads
68485f9ed8 #108: remove hard-coded ignore of system ssh config file 2021-01-25 23:29:05 -07:00
checktheroads
08b2760721 remove custom error page, closes #109 2021-01-25 22:47:13 -07:00
checktheroads
ca7f5c808d bump version to v1.0.0-beta.73 2021-01-18 23:09:08 -07:00
checktheroads
71ce161c75 Merge branch 'v1.0.0' of github.com:checktheroads/hyperglass into v1.0.0 2021-01-18 23:01:53 -07:00
checktheroads
f972419ace add docs for the network property, closes #97 2021-01-18 23:00:15 -07:00
checktheroads
e5b26e6a20 make footer button content scrollable, closes #107 2021-01-18 22:48:14 -07:00
checktheroads
18307c1978 update ui dependencies 2021-01-18 22:46:51 -07:00
checktheroads
a3d9cf4e54 check the NodeJS version on startup, closes #105 2021-01-18 14:35:50 -07:00
Matt Love
9af7a495bf
Add Nokia SR OS support
Merge pull request #106 from paunadeu/nokia_sros

Thanks @paunadeu!
2021-01-18 14:14:43 -07:00
checktheroads
42907011b1 add Nokia SR OS to docs 2021-01-18 14:06:50 -07:00
checktheroads
ad7db8aceb fix formatting 2021-01-18 14:06:03 -07:00
Pau Nadeu Rabat
776c757731 Flake8 validations. 2021-01-18 21:42:09 +01:00
Pau Nadeu Rabat
9bed3aa94b Readme modified 2021-01-18 21:33:07 +01:00
Pau Nadeu Rabat
2497f79405 Fixing commands removing Vrf at all 2021-01-18 21:30:57 +01:00
Pau Nadeu Rabat
bae43b6585 Fixed traceroute command 2021-01-18 21:29:31 +01:00
Pau Nadeu Rabat
b41a5324c1 Removing Vrf from Commands for Sros 2021-01-18 21:26:19 +01:00
Pau Nadeu Rabat
42dbeb80b5 Add support for Nokia SR OS 2021-01-18 20:38:51 +01:00
checktheroads
844958726f bump version 1.0.0-beta.72 2021-01-16 13:41:59 -07:00
checktheroads
c9b87ea2ea add docs for new systemd change 2021-01-16 13:41:22 -07:00
checktheroads
440c5bf7c0 bump pyserial version to fix macOS Big Sur issue 2021-01-16 12:49:40 -07:00
checktheroads
4fd45c7f77 set juniper_junos to juniper if used, improve device validation. closes #104 2021-01-16 12:47:38 -07:00
checktheroads
909df7fb19 fix parsing issue for dual RP juniper routers that append {master} to the output 2021-01-16 12:13:29 -07:00
checktheroads
15031b9e05 add missing help_menu to docs 2021-01-14 13:25:07 -07:00
checktheroads
def1103704 fix docs error 2021-01-13 13:49:08 -07:00
checktheroads
fbf7ecccf1 remove rich for logging 2021-01-12 00:16:34 -07:00
checktheroads
31a3ac00c9 clean up installer, remove systemd from steps 2021-01-12 00:14:23 -07:00
checktheroads
bdb0c74a8c bump version to 1.0.0-beta.71 2021-01-10 01:18:02 -07:00
checktheroads
090626f952 typing cleanup 2021-01-10 01:15:13 -07:00
checktheroads
4137286ca4 re-implement google analytics 2021-01-10 01:14:57 -07:00
checktheroads
ccf9bb1fc0 fix pre-commit script 2021-01-10 01:13:30 -07:00
634 changed files with 66345 additions and 40078 deletions

44
.dockerignore Normal file
View file

@ -0,0 +1,44 @@
hyperglass/hyperglass/static
**/node_modules
**/node_modules/.pnpm
.DS_Store
hyperglass/ui/.env*
hyperglass.json
custom.*[js, html]
.next
out/
fonts/
__pycache__
.python-version
.venv
.mypy_cache
.pytest_cache
.ruff_cache
*.so
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
*.rdb
*.py[cod]
.ipynb*

23
.flake8
View file

@ -1,23 +0,0 @@
[flake8]
max-line-length=88
count=True
show-source=False
statistics=True
exclude=.git, __pycache__, hyperglass/api/examples/*.py, hyperglass/compat/_sshtunnel.py, test.py
filename=*.py
per-file-ignores=
hyperglass/main.py:E402
# Disable classmethod warning for validator decorators
hyperglass/models/*.py:N805,E0213,R0903,E501,C0301
hyperglass/models/api/*.py:N805,E0213,R0903,E501,C0301
hyperglass/models/commands/*.py:N805,E0213,R0903,E501,C0301
hyperglass/parsing/models/*.py:N805,E0213,R0903
hyperglass/configuration/models/*.py:N805,E0213,R0903,E501,C0301
# Disable unused import warning for modules
hyperglass/*/__init__.py:F401
hyperglass/models/*/__init__.py:F401
ignore=W503,C0330,R504,D202,S403,S301
select=B, BLK, C, D, E, F, I, II, N, P, PIE, S, R, W
disable-noqa=False
hang-closing=False
max-complexity=10

View file

@ -1,30 +0,0 @@
---
name: Feature Request
about: Suggest an idea for this project
labels: enhancement
assignees: checktheroads
---
<!--
If the answer to any of these questions is "no", your feature request will most likely be rejected (but will still be considered).
- Is the new feature only applicable to one Network Operating System (https://hyperglass.io/docs/platforms)?
- Would the new feature work only on mobile, or only on desktop?
- Would the new feature only support IPv4, or IPv6?
- Is the new feature something that can be reasonably customized by hyperglass end-users?
-->
# Feature Description
<!-- Describe the solution or change you would like. -->
### Is your feature request related to a problem? Please describe.
<!-- If yes, a clear and concise description of what the problem is. -->
# Environment & Use Case
<!-- Describe your use case for hyperglass, the environment on which it runs, the predominant network device type, and any other relevant details. -->
# Additional Context
<!-- Add any other context or screenshots about the feature request here. -->

View file

@ -0,0 +1,49 @@
name: Feature Request
description: Suggest an idea for hyperglass
labels:
- feature
assignees:
- thatmattlove
body:
- type: markdown
attributes:
value: >
If the answer to any of these questions is "no", your feature request will most likely be rejected (but may still be considered).
- Is the new feature _only_ applicable to one [platform](https://hyperglass.dev/platforms)?
- Would the new feature work only on mobile, or only on desktop?
- Would the new feature only support IPv4, or IPv6?
- Is the new feature something that can be reasonably customized by hyperglass users?
- type: input
id: version
attributes:
label: Version
description: What version of hyperglass are you currently running?
placeholder: v2.0.4
validations:
required: true
- type: textarea
id: feature-details
attributes:
label: Feature Details
description: Describe the solution or change you would like in detail.
validations:
required: true
- type: dropdown
id: feature-type
validations:
required: true
attributes:
label: Feature Type
multiple: true
options:
- New Platform
- Web UI
- New Functionality
- Change to Existing Functionality
- type: textarea
id: use-case
validations:
required: true
attributes:
label: Use Case
description: How will this feature benefit hyperglass users (providers, end-users, or both)?

View file

@ -1,63 +0,0 @@
---
name: Bug Report
about: Report a problem or unexpected behavior
labels: bug
assignees: checktheroads
---
<!-- Please provide a general summary of the issue in the Title. -->
# Bug Description
<!-- A clear and concise description of the bug. -->
# Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
# Steps to Reproduce
<!-- Provide steps necessary to reproduce this issue. -->
## Local Configurations
<!-- If possible, please a link to a live example and the relevant sections of your hyperglass.yaml, commands.yaml, or devices.yaml in a code block. -->
```
<configs>
```
## Logs
<!-- If an error occurred, please paste the relevant error message(s) in the below code block. -->
```
<logs>
```
# Possible Solution
<!-- If you think you know what would fix this, please share your ideas. -->
# Environment
## Server
<!-- Please paste the output from `hyperglass system-info` below: (available in 1.0.0-beta.52+) -->
<!-- If, for some reason, that doesn't work, please include the following:
- OS:
- Python Version:
- hyperglass Version:
-->
## Client
- OS & Version: <!-- (e.g. Windows 10, macOS 10.15, Ubuntu Linux 18.04) -->
- Browser: <!-- (e.g. Chrome, Safari, Firefox, etc.) -->
### Smartphone Details (if applicable)
- Device: <!-- (e.g. iPhone, Samsung) -->
- OS: <!-- (e.g. iOS 13.1, Android 11) -->
- Browser: <!-- (e.g. Safari, Chrome) -->

View file

@ -0,0 +1,98 @@
name: Bug Report
description: Report a problem or unexpected behavior
labels:
- possible-bug
assignees:
- thatmattlove
body:
- type: dropdown
id: deployment-type
validations:
required: true
attributes:
label: Deployment Type
description: How are you running hyperglass?
multiple: false
options:
- Docker
- Manual
- Other (please explain)
- type: input
id: version
attributes:
label: Version
description: What version of hyperglass are you currently running?
placeholder: v2.0.4
validations:
required: true
- type: textarea
id: steps-to-reproduce
validations:
required: true
attributes:
label: Steps to Reproduce
description: >
Describe in detail the exact steps one can take to reproduce this bug.
If reporting a UI bug, be sure to include screenshots, browser version, and operating system and platform.
If you've deployed hyperglass manually, be sure to include Python and NodeJS versions.
placeholder: |
1. Click the thing
2. Type the stuff
3. See the error
- type: textarea
id: expected-behavior
validations:
required: true
attributes:
label: Expected Behavior
description: What did you expect to happen?
placeholder: A thing should have happened.
- type: textarea
id: observed-behavior
validations:
required: true
attributes:
label: Observed Behavior
description: What actually happened?
placeholder: An error was shown.
- type: textarea
id: configuration
attributes:
label: Configuration
description: hyperglass [config](https://hyperglass.dev/configuration/config) file in YAML format.
placeholder: |
org_name: Beloved Hyperglass User
plugins: []
primary_asn: 65000
request_timeout: 90
site_description: Beloved Hyperglass User Network Looking Glass
site_title: Beloved Hyperglass User
render: yaml
- type: textarea
id: devices
attributes:
label: Devices
description: >
hyperglass [devices](https://hyperglass.dev/configuration/devices) file in YAML format
**with passwords obfuscated or removed**.
placeholder: |
devices:
- name: New York, NY
address: 192.0.2.1
platform: cisco_ios
credential:
username: ***
password: ***
- name: San Francisco, CA
address: 192.0.2.2
platform: juniper
credential:
username: ***
password: ***
render: yaml
- type: textarea
id: logs
attributes:
label: Logs
description: Include any relevant log messages related to the bug.
render: console

View file

@ -1 +1,5 @@
blank_issues_enabled: true
blank_issues_enabled: false
contact_links:
- name: Contributing Policy
url: https://github.com/thatmattlove/hyperglass/blob/main/CONTRIBUTING.md
about: Please read through the contributing policy before opening an issue or pull request.

View file

@ -1,4 +1,4 @@
<!-- PLEASE CONSULT CONTRIBUTING.MD PRIOR TO WORKING ON HYPERGLASS -->
<!-- PLEASE CONSULT CONTRIBUTING POLICY PRIOR TO WORKING ON HYPERGLASS -->
<!-- Provide a general summary of your changes in the Title. -->

View file

@ -1,48 +1,71 @@
name: Backend Testing
on: [push, pull_request]
on:
push:
paths:
- hyperglass/**
- .github/**
pull_request:
jobs:
backend:
name: Backend Tests
strategy:
fail-fast: false
matrix:
node-version: [14.x]
redis-version: [5, 6]
poetry-version: [1.1.4]
python-version: [3.6, 3.8]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
backend:
name: Backend Tests
strategy:
fail-fast: false
matrix:
node-version: [20.x]
pnpm-version: [8]
redis-version: [latest]
python-version: ["3.11", "3.12"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Git Checkout
uses: actions/checkout@v2
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Setup Rye
uses: sksat/setup-rye@v0.23.1
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Start Redis
uses: supercharge/redis-github-action@1.1.0
with:
redis-version: ${{ matrix.redis-version }}
- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: ${{ matrix.pnpm-version }}
- name: Install Python Dependencies
run: poetry install
- name: Start Redis
uses: supercharge/redis-github-action@1.7.0
with:
redis-version: ${{ matrix.redis-version }}
- name: Run Flake8
run: poetry run flake8 hyperglass
- name: Prepare
run: |
mkdir -p "$HOME/hyperglass"
echo "HYPERGLASS_APP_PATH=$HOME/hyperglass" >> $GITHUB_ENV
echo "HYPERGLASS_HOST=127.0.0.1" >> $GITHUB_ENV
echo "HYPERGLASS_PORT=8001" >> $GITHUB_ENV
- name: Run hyperglass
run: '.tests/ga-backend-app.sh'
- name: Install
run: rye sync
- name: Activate virtualenv
run: |
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Lint (Rye)
run: rye lint
- name: Tests (PyTest)
run: pytest hyperglass --ignore hyperglass/plugins/external
- name: Run hyperglass
run: ".tests/ga-backend-app.sh"

View file

@ -1,35 +1,57 @@
name: Frontend Testing
on: [push, pull_request]
on:
push:
paths:
- hyperglass/ui/**
- .github/**
pull_request:
jobs:
frontend:
name: Frontend Tests
strategy:
fail-fast: false
matrix:
node-version: [14.x]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
env:
working-directory: ./hyperglass/ui
steps:
- name: Git Checkout
uses: actions/checkout@v2
frontend:
name: Frontend Tests
strategy:
fail-fast: false
matrix:
node-version: [20.x]
pnpm-version: [8]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
working-directory: ./hyperglass/ui
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
working-directory: ${{ env.working-directory }}
run: yarn install
- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: ${{ matrix.pnpm-version }}
- name: TypeScript
run: ./.tests/pre-commit-frontend.sh --typescript
- name: Install Dependencies
working-directory: ${{ env.working-directory }}
run: pnpm install
- name: ESLint
run: ./.tests/pre-commit-frontend.sh --eslint
- name: Create empty hyperglass.json
working-directory: ${{ env.working-directory }}
run: echo '{}' > hyperglass.json
- name: Prettier
run: ./.tests/pre-commit-frontend.sh --prettier
- name: Formatting
working-directory: ${{ env.working-directory }}
run: pnpm run format:check
- name: Lint
working-directory: ${{ env.working-directory }}
run: pnpm run lint
- name: Check Types
working-directory: ${{ env.working-directory }}
run: pnpm run typecheck
- name: Tests
working-directory: ${{ env.working-directory }}
run: pnpm run test

View file

@ -1,18 +0,0 @@
name: Installer Testing
on: [push, pull_request]
jobs:
installer:
name: Installer Tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Run hyperglass
run: "sudo bash ./install.sh"

View file

@ -1,37 +0,0 @@
name: Release to PyPI
on:
release:
types: [published]
jobs:
release:
name: Release to PyPI
strategy:
fail-fast: false
matrix:
python-version: [3.6]
poetry-version: [1.1.4]
os: [ubuntu-latest]
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Build hyperglass
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry build
- name: Publish hyperglass release
run: poetry publish

18
.gitignore vendored
View file

@ -1,20 +1,32 @@
# Project
hyperglass/hyperglass/static
static/
TODO*
.env
test.py
.DS_Store
.idea
.vscode
old_*.py
*_old.py
*.rdb
#
# Github Default from https://github.com/martinohanlon/flightlight/issues/1
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
.ipynb*
# Pyenv
.python-version
.venv
# MyPy
.mypy_cache
# Pytest
.pytest_cache
# Ruff
.ruff_cache
# C extensions
*.so

View file

@ -1,14 +0,0 @@
[settings]
skip_glob = hyperglass/api/examples/*.py
line_length = 88
indent = ' '
include_trailing_comma = True
multi_line_output = 3
balanced_wrapping = True
length_sort = True
force_single_line = False
import_heading_stdlib = Standard Library
import_heading_thirdparty = Third Party
import_heading_firstparty = Project
import_heading_localfolder = Local
known_third_party = starlette,fastapi,inquirer

View file

@ -1,37 +0,0 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
stages:
- commit
- repo: local
hooks:
- id: typescript
name: TypeScript
files: 'hyperglass/ui/*'
exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
stages:
- commit
entry: ./.tests/pre-commit-frontend.sh --typescript
language: script
- repo: local
hooks:
- id: eslint
name: ESLint
files: 'hyperglass/ui/*'
exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
stages:
- commit
entry: ./.tests/pre-commit-frontend.sh --eslint
language: script
- repo: local
hooks:
- id: prettier
name: Prettier
files: 'hyperglass/ui/*'
exclude: 'hyperglass/ui/node_modules|hyperglass/ui/.next'
stages:
- commit
entry: ./.tests/pre-commit-frontend.sh --prettier
language: script

14
.samples/Caddyfile Normal file
View file

@ -0,0 +1,14 @@
lg.example.com:443 {
tls person@example.com
file_server {
root /etc/hyperglass/static/ui
index /etc/hyperglass/static/ui/index.html
}
file_server /custom {
root /etc/hyperglass/static/custom
}
file_server /images {
root /etc/hyperglass/static/images
}
reverse_proxy localhost:8001
}

View file

@ -0,0 +1,65 @@
{
"vrfs": {
"default": {
"routerId": "198.18.0.1",
"vrf": "default",
"bgpRouteEntries": {
"198.18.2.0/24": {
"totalPaths": 1,
"bgpAdvertisedPeerGroups": {},
"maskLength": 24,
"bgpRoutePaths": [
{
"asPathEntry": {
"asPathType": "External",
"asPath": "65002 65003"
},
"med": 8675309,
"localPreference": 100,
"weight": 0,
"peerEntry": {
"peerRouterId": "198.18.0.2",
"peerAddr": "198.18.0.2"
},
"reasonNotBestpath": "noReason",
"timestamp": 1612996830,
"nextHop": "198.18.0.2",
"routeType": {
"atomicAggregator": false,
"origin": "Igp",
"suppressed": false,
"queued": false,
"valid": true,
"ecmpContributor": false,
"luRoute": false,
"active": true,
"stale": false,
"ecmp": false,
"backup": false,
"ecmpHead": false,
"ucmp": false
},
"routeDetail": {
"origin": "Igp",
"labelStack": [],
"isLeaked": false,
"tunnelRibEligible": false,
"extCommunityList": [],
"extCommunityListRaw": [],
"communityList": ["65002:1"],
"rxSafi": "Unicast",
"bgpContributors": [],
"recvdFromRRClient": false,
"igpMetric": 1,
"largeCommunityList": [],
"domainPath": []
}
}
],
"address": "198.18.2.0"
}
},
"asn": "65001"
}
}
}

View file

@ -0,0 +1,15 @@
[Unit]
Description=hyperglass
PartOf=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory=/opt/hyperglass
EnvironmentFile=/etc/hyperglass/hyperglass.env
ExecStart=/usr/bin/docker compose up -d --remove-orphans
ExecStop=/usr/bin/docker compose down
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,13 @@
[Unit]
Description=hyperglass
After=network.target
Requires=redis-server
[Service]
User=root
Group=root
EnvironmentFile=/etc/hyperglass/hyperglass.env
ExecStart=python3 -m hyperglass.console start
[Install]
WantedBy=multi-user.target

49
.samples/hyperglass.nginx Normal file
View file

@ -0,0 +1,49 @@
server {
listen 80;
listen [::]:80;
server_name lg.example.com;
return 301 https://$host$request_uri;
}
server {
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate <path to cert chain>
ssl_certificate_key <path to key>
client_max_body_size 2M;
server_name lg.example.com;
root /etc/hyperglass/static;
location / {
try_files $uri $uri/ /ui /ui/$uri =404;
index /ui/index.html;
}
location /openapi.json {
try_files $uri @proxy_to_app;
}
location /custom/ {
try_files $uri $uri/ /custom;
}
location /images/ {
try_files $uri $uri/ /images;
}
location /api {
try_files $uri @proxy_to_app;
}
location @proxy_to_app {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://[::1]:8001;
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,774 @@
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos">
<route-information xmlns="http://xml.juniper.net/junos/18.2R3/junos-routing">
<!-- keepalive -->
<route-table>
<table-name>
inet.0
</table-name>
<destination-count>
851482
</destination-count>
<total-route-count>
3145808
</total-route-count>
<active-route-count>
851445
</active-route-count>
<holddown-route-count>
1
</holddown-route-count>
<hidden-route-count>
94
</hidden-route-count>
<rt junos:style="detail">
<rt-destination>
1.1.1.0
</rt-destination>
<rt-prefix-length>
24
</rt-prefix-length>
<rt-entry-count junos:format="4 entries">
4
</rt-entry-count>
<rt-announced-count>
1
</rt-announced-count>
<rt-entry>
<active-tag>
*
</active-tag>
<current-active />
<last-active />
<protocol-name>
BGP
</protocol-name>
<preference>
170
</preference>
<preference2>
-176
</preference2>
<nh-type>
Router
</nh-type>
<nh-index>
1007
</nh-index>
<nh-address>
0x36d576ac
</nh-address>
<nh-reference-count>
1337511
</nh-reference-count>
<nh-kernel-id>
0
</nh-kernel-id>
<gateway>
62.115.189.136
</gateway>
<nh junos:indent="16">
<nh-string>
Next hop
</nh-string>
<to>
62.115.189.136
</to>
<via>
xe-0/1/1.0
</via>
<selected-next-hop />
<session>
4e3
</session>
</nh>
<rt-entry-state>
Active Ext
</rt-entry-state>
<local-as>
14525
</local-as>
<peer-as>
1299
</peer-as>
<age junos:seconds="2634431">
4w2d 11:47:11
</age>
<validation-state>
valid
</validation-state>
<med-plus-igp>
0
</med-plus-igp>
<task-name>
BGP_1299.62.115.189.136
</task-name>
<announce-bits>
5
</announce-bits>
<announce-tasks>
0-KRT 6-BGP_RT_Background 8-Resolve tree 3 10-Aggregate 12-RT
</announce-tasks>
<as-path>
AS path: 1299 13335 I
Aggregator: 13335 141.101.72.1
AS path: Recorded
</as-path>
<bgp-path-attributes>
<attr-as-path-effective>
<aspath-effective-string>
AS path:
</aspath-effective-string>
<attr-value>
1299 13335 I
</attr-value>
<flags>
</flags>
</attr-as-path-effective>
<attr-aggregator>
<attr-length>
11
</attr-length>
<attr-value>
<aggr-as-number>
13335
</aggr-as-number>
<aggr-router-id>
141.101.72.1
</aggr-router-id>
</attr-value>
</attr-aggregator>
</bgp-path-attributes>
<communities>
<community>
1299:35000
</community>
<community>
14525:0
</community>
<community>
14525:41
</community>
<community>
14525:600
</community>
<community>
14525:1021
</community>
<community>
14525:2840
</community>
<community>
14525:3001
</community>
<community>
14525:4001
</community>
<community>
14525:9003
</community>
</communities>
<bgp-rt-flag>
Accepted
</bgp-rt-flag>
<local-preference>
175
</local-preference>
<peer-id>
2.255.254.43
</peer-id>
</rt-entry>
<rt-entry>
<active-tag>
</active-tag>
<protocol-name>
BGP
</protocol-name>
<preference>
200
</preference>
<preference2>
-251
</preference2>
<nh-type>
Indirect
</nh-type>
<nh-index>
0
</nh-index>
<nh-address>
0x159d47bc
</nh-address>
<nh-reference-count>
546747
</nh-reference-count>
<nh-kernel-id>
0
</nh-kernel-id>
<gateway>
199.34.94.1
</gateway>
<nh-type>
Router
</nh-type>
<nh-index>
897
</nh-index>
<nh junos:indent="16">
<nh-string>
Next hop
</nh-string>
<to>
100.64.0.21
</to>
<via>
et-0/0/2.3601
</via>
<selected-next-hop />
<label-element>
0x4261200
</label-element>
<label-element-parent>
0x0
</label-element-parent>
<label-element-refcount>
4
</label-element-refcount>
<label-element-childcount>
2
</label-element-childcount>
<label-element-lspid>
0
</label-element-lspid>
<session>
53c
</session>
</nh>
<protocol-nh junos:indent="16">
<to>
199.34.94.1
</to>
<indirect-nh>
0xa010e00 1048620 INH Session ID: 0x53e
</indirect-nh>
</protocol-nh>
<rt-entry-state>
Int Ext
</rt-entry-state>
<inactive-reason>
Route Preference
</inactive-reason>
<local-as>
14525
</local-as>
<peer-as>
14525
</peer-as>
<age junos:seconds="1766791">
2w6d 10:46:31
</age>
<metric>
0
</metric>
<metric2>
1000
</metric2>
<validation-state>
unverified
</validation-state>
<med-plus-igp>
1000
</med-plus-igp>
<task-name>
BGP_14525.199.34.94.1
</task-name>
<as-path>
AS path: 13335 I
Aggregator: 13335 172.68.129.1
AS path: Recorded
</as-path>
<bgp-path-attributes>
<attr-as-path-effective>
<aspath-effective-string>
AS path:
</aspath-effective-string>
<attr-value>
13335 I
</attr-value>
<flags>
</flags>
</attr-as-path-effective>
<attr-aggregator>
<attr-length>
11
</attr-length>
<attr-value>
<aggr-as-number>
13335
</aggr-as-number>
<aggr-router-id>
172.68.129.1
</aggr-router-id>
</attr-value>
</attr-aggregator>
</bgp-path-attributes>
<communities>
<community>
13335:10232
</community>
<community>
13335:19000
</community>
<community>
13335:20050
</community>
<community>
13335:20500
</community>
<community>
13335:20530
</community>
<community>
14525:0
</community>
<community>
14525:20
</community>
<community>
14525:600
</community>
<community>
14525:1021
</community>
<community>
14525:2840
</community>
<community>
14525:3003
</community>
<community>
14525:4003
</community>
<community>
14525:9009
</community>
</communities>
<bgp-rt-flag>
Accepted
</bgp-rt-flag>
<local-preference>
250
</local-preference>
<peer-id>
199.34.94.1
</peer-id>
</rt-entry>
<rt-entry>
<active-tag>
</active-tag>
<protocol-name>
BGP
</protocol-name>
<preference>
200
</preference>
<preference2>
-251
</preference2>
<nh-type>
Indirect
</nh-type>
<nh-index>
0
</nh-index>
<nh-address>
0x20040a2c
</nh-address>
<nh-reference-count>
600203
</nh-reference-count>
<nh-kernel-id>
0
</nh-kernel-id>
<gateway>
199.34.94.2
</gateway>
<nh-type>
Router
</nh-type>
<nh-index>
1243
</nh-index>
<nh junos:indent="16">
<nh-string>
Next hop
</nh-string>
<to>
100.64.0.22
</to>
<via>
et-0/0/2.3601
</via>
<selected-next-hop />
<label-element>
0x8b6e880
</label-element>
<label-element-parent>
0x0
</label-element-parent>
<label-element-refcount>
4
</label-element-refcount>
<label-element-childcount>
2
</label-element-childcount>
<label-element-lspid>
0
</label-element-lspid>
<session>
532
</session>
</nh>
<protocol-nh junos:indent="16">
<to>
199.34.94.2
</to>
<indirect-nh>
0xa010800 1048619 INH Session ID: 0x5c1
</indirect-nh>
</protocol-nh>
<rt-entry-state>
NotBest Int Ext
</rt-entry-state>
<inactive-reason>
Not Best in its group - Router ID
</inactive-reason>
<local-as>
14525
</local-as>
<peer-as>
14525
</peer-as>
<age junos:seconds="242">
4:02
</age>
<metric>
0
</metric>
<metric2>
1000
</metric2>
<validation-state>
unverified
</validation-state>
<med-plus-igp>
1000
</med-plus-igp>
<task-name>
BGP_14525.199.34.94.2
</task-name>
<as-path>
AS path: 13335 I
Aggregator: 13335 172.68.129.1
AS path: Recorded
</as-path>
<bgp-path-attributes>
<attr-as-path-effective>
<aspath-effective-string>
AS path:
</aspath-effective-string>
<attr-value>
13335 I
</attr-value>
<flags>
</flags>
</attr-as-path-effective>
<attr-aggregator>
<attr-length>
11
</attr-length>
<attr-value>
<aggr-as-number>
13335
</aggr-as-number>
<aggr-router-id>
172.68.129.1
</aggr-router-id>
</attr-value>
</attr-aggregator>
</bgp-path-attributes>
<communities>
<community>
13335:10232
</community>
<community>
13335:19000
</community>
<community>
13335:20050
</community>
<community>
13335:20500
</community>
<community>
13335:20530
</community>
<community>
14525:0
</community>
<community>
14525:20
</community>
<community>
14525:600
</community>
<community>
14525:1021
</community>
<community>
14525:2840
</community>
<community>
14525:3003
</community>
<community>
14525:4003
</community>
<community>
14525:9009
</community>
</communities>
<bgp-rt-flag>
Accepted
</bgp-rt-flag>
<local-preference>
250
</local-preference>
<peer-id>
199.34.94.2
</peer-id>
</rt-entry>
<rt-entry>
<active-tag>
</active-tag>
<protocol-name>
BGP
</protocol-name>
<preference>
200
</preference>
<preference2>
-251
</preference2>
<nh-type>
Indirect
</nh-type>
<nh-index>
0
</nh-index>
<nh-address>
0x1e049e7c
</nh-address>
<nh-reference-count>
135307
</nh-reference-count>
<nh-kernel-id>
0
</nh-kernel-id>
<gateway>
216.250.230.2
</gateway>
<nh-type>
Router
</nh-type>
<nh-index>
0
</nh-index>
<nh junos:indent="16">
<nh-string>
Next hop
</nh-string>
<to>
100.64.0.52
</to>
<via>
et-0/0/1.3605
</via>
<weight>
0x1
</weight>
<selected-next-hop />
<label-element>
0x8b6f980
</label-element>
<label-element-parent>
0x0
</label-element-parent>
<label-element-refcount>
13
</label-element-refcount>
<label-element-childcount>
5
</label-element-childcount>
<label-element-lspid>
0
</label-element-lspid>
<session>
0
</session>
</nh>
<nh junos:indent="16">
<nh-string>
Next hop
</nh-string>
<to>
100.64.0.140
</to>
<via>
et-0/0/2.3607
</via>
<weight>
0x1
</weight>
<label-element>
0x8b6f980
</label-element>
<label-element-parent>
0x0
</label-element-parent>
<label-element-refcount>
13
</label-element-refcount>
<label-element-childcount>
5
</label-element-childcount>
<label-element-lspid>
0
</label-element-lspid>
<session>
0
</session>
</nh>
<protocol-nh junos:indent="16">
<to>
216.250.230.2
</to>
<indirect-nh>
0xa00f600 1048607 INH Session ID: 0x54c
</indirect-nh>
</protocol-nh>
<rt-entry-state>
NotBest Int Ext
</rt-entry-state>
<inactive-reason>
Not Best in its group - Router ID
</inactive-reason>
<local-as>
14525
</local-as>
<peer-as>
14525
</peer-as>
<age junos:seconds="1367556">
2w1d 19:52:36
</age>
<metric>
0
</metric>
<metric2>
1000
</metric2>
<validation-state>
unverified
</validation-state>
<med-plus-igp>
1000
</med-plus-igp>
<task-name>
BGP_14525.216.250.230.2
</task-name>
<as-path>
AS path: 13335 I
Aggregator: 13335 141.101.73.1
</as-path>
<bgp-path-attributes>
<attr-as-path-effective>
<aspath-effective-string>
AS path:
</aspath-effective-string>
<attr-value>
13335 I
</attr-value>
</attr-as-path-effective>
<attr-aggregator>
<attr-length>
11
</attr-length>
<attr-value>
<aggr-as-number>
13335
</aggr-as-number>
<aggr-router-id>
141.101.73.1
</aggr-router-id>
</attr-value>
</attr-aggregator>
</bgp-path-attributes>
<communities>
<community>
13335:10014
</community>
<community>
13335:19000
</community>
<community>
13335:20050
</community>
<community>
13335:20500
</community>
<community>
13335:20530
</community>
<community>
14525:0
</community>
<community>
14525:20
</community>
<community>
14525:600
</community>
<community>
14525:1021
</community>
<community>
14525:2840
</community>
<community>
14525:3003
</community>
<community>
14525:4002
</community>
<community>
14525:9009
</community>
</communities>
<bgp-rt-flag>
Accepted
</bgp-rt-flag>
<local-preference>
250
</local-preference>
<peer-id>
216.250.230.2
</peer-id>
</rt-entry>
</rt>
</route-table>
</route-information>
<cli>
<banner>
</banner>
</cli>
</rpc-reply>

View file

@ -0,0 +1,201 @@
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/18.2R3/junos">
<route-information xmlns="http://xml.juniper.net/junos/18.2R3/junos-routing">
<!-- keepalive -->
<route-table>
<table-name>
inet.0
</table-name>
<destination-count>
851462
</destination-count>
<total-route-count>
3145810
</total-route-count>
<active-route-count>
851425
</active-route-count>
<holddown-route-count>
1
</holddown-route-count>
<hidden-route-count>
94
</hidden-route-count>
<rt junos:style="detail">
<rt-destination>
199.34.94.96
</rt-destination>
<rt-prefix-length>
30
</rt-prefix-length>
<rt-entry-count junos:format="1 entry">
1
</rt-entry-count>
<rt-announced-count>
1
</rt-announced-count>
<rt-state>
</rt-state>
<rt-entry>
<active-tag>
*
</active-tag>
<current-active />
<last-active />
<protocol-name>
BGP
</protocol-name>
<preference>
200
</preference>
<preference2>
-451
</preference2>
<nh-type>
Indirect
</nh-type>
<nh-index>
0
</nh-index>
<nh-address>
0x159d47bc
</nh-address>
<nh-reference-count>
546728
</nh-reference-count>
<nh-kernel-id>
0
</nh-kernel-id>
<gateway>
199.34.94.1
</gateway>
<nh-type>
Router
</nh-type>
<nh-index>
897
</nh-index>
<nh junos:indent="16">
<nh-string>
Next hop
</nh-string>
<to>
100.64.0.21
</to>
<via>
et-0/0/2.3601
</via>
<selected-next-hop />
<label-element>
0x4261200
</label-element>
<label-element-parent>
0x0
</label-element-parent>
<label-element-refcount>
4
</label-element-refcount>
<label-element-childcount>
2
</label-element-childcount>
<label-element-lspid>
0
</label-element-lspid>
<session>
53c
</session>
</nh>
<protocol-nh junos:indent="16">
<to>
199.34.94.1
</to>
<indirect-nh>
0xa010e00 1048620 INH Session ID: 0x53e
</indirect-nh>
</protocol-nh>
<rt-entry-state>
Active Int Ext
</rt-entry-state>
<local-as>
14525
</local-as>
<peer-as>
14525
</peer-as>
<age junos:seconds="1767263">
2w6d 10:54:23
</age>
<metric>
0
</metric>
<metric2>
1000
</metric2>
<validation-state>
unverified
</validation-state>
<med-plus-igp>
1000
</med-plus-igp>
<task-name>
BGP_14525.199.34.94.1
</task-name>
<announce-bits>
4
</announce-bits>
<announce-tasks>
0-KRT 8-Resolve tree 3 10-Aggregate 12-RT
</announce-tasks>
<as-path>
AS path: I
AS path: Recorded
</as-path>
<bgp-path-attributes>
<attr-as-path-effective>
<aspath-effective-string>
AS path:
</aspath-effective-string>
<attr-value>
I
</attr-value>
<flags>
</flags>
</attr-as-path-effective>
</bgp-path-attributes>
<communities>
<community>
14525:0
</community>
<community>
14525:1
</community>
<community>
14525:1021
</community>
<community>
14525:2840
</community>
<community>
14525:3003
</community>
<community>
14525:4003
</community>
</communities>
<bgp-rt-flag>
Accepted
</bgp-rt-flag>
<local-preference>
450
</local-preference>
<peer-id>
199.34.94.1
</peer-id>
</rt-entry>
</rt>
</route-table>
</route-information>
<cli>
<banner>
</banner>
</cli>
</rpc-reply>

View file

@ -0,0 +1,10 @@
devices:
- name: Example Device
address: 127.0.0.1
credential:
username: test
password: test
platform: juniper
attrs:
source4: 127.0.0.1
source6: 2001:db8::1

View file

@ -1,52 +0,0 @@
#!/usr/bin/env bash
echo "[INFO] Starting Redis..."
redis-server &
cd /tmp/hyperglass
echo "[INFO] Starting setup..."
poetry run hyperglass setup -d
echo "[SUCCESS] Setup completed."
sleep 2
echo "listen_address: 127.0.0.1" >> /root/hyperglass/hyperglass.yaml
echo "[INFO] Starting UI build."
poetry run hyperglass build-ui
if [[ ! $? == 0 ]]; then
echo "[ERROR] Failed to start hyperglass."
exit 1
else
echo "[SUCCESS] UI build completed."
fi
echo "[INFO] Starting hyperglass..."
poetry run hyperglass start &> /var/log/hyperglassci.log &
sleep 180
if [[ ! $? == 0 ]]; then
echo "[ERROR] Failed to start hyperglass."
exit 1
else
echo "[SUCCESS] Started hyperglass."
fi
echo "[INFO] Running HTTP test..."
STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8001)
echo "[INFO] Status code: $STATUS"
if [[ ! $? == 0 ]]; then
echo "[ERROR] HTTP test failed."
exit 1
elif [[ ! "$STATUS" == "200" ]]; then
echo "[ERROR] HTTP test failed. Startup log:"
cat /var/log/hyperglassci.log
exit 1
fi
echo "[SUCCESS] Tests ran successfully."
exit 0

View file

@ -1,31 +0,0 @@
FROM ubuntu:bionic as base
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
WORKDIR /tmp
RUN apt-get update \
&& apt-get install -y git curl net-tools \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y python3 python3-pip python3-venv redis-server nodejs yarn \
# && curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 \
#
# Pinning Poetry installer to this specific version. As of 2020 07 24, the script from master
# fails to install due to Python 2's executable matching first. See #2106
#
&& curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/e70ee3112ab06374dfef4ab84e6dded2382cc7dd/get-poetry.py | python3 \
&& python3 --version \
&& echo "NodeJS $(node --version)" \
&& echo "Yarn $(yarn --version)"
COPY ./ /tmp/hyperglass
ENV PATH=$PATH:/root/.poetry/bin
FROM base as install
WORKDIR /tmp/hyperglass
RUN poetry install --no-ansi
FROM install as setup
WORKDIR /tmp/hyperglass
COPY .tests/app/setup.sh /tmp/setup.sh
RUN ls -lsah /tmp

12
.tests/devices.yaml Normal file
View file

@ -0,0 +1,12 @@
---
routers:
- name: Example Device
address: 127.0.0.1
group: Test
credential:
username: test
password: test
platform: juniper
directives:
- builtins: false
- juniper_bgp_route

17
.tests/directives.yaml Normal file
View file

@ -0,0 +1,17 @@
juniper_bgp_route:
name: BGP Route
groups:
- Global
rules:
- condition: '1.0.0.1/32'
action: deny
- condition: '0.0.0.0/0'
ge: 8
le: 25
command: 'show route protocol bgp table inet.0 {target} detail'
- condition: '::/0'
ge: 16
le: 64
command: 'show route protocol bgp table inet6.0 {target} detail'
field:
description: IP Address or Prefix

View file

@ -1,23 +1,23 @@
#!/usr/bin/env bash
LOG_FILE="$HOME/hyperglass-ci.log"
touch /tmp/hyperglass.log
export POETRY_HYPERGLASS_UI_BUILD_TIMEOUT="600"
echo "[INFO] Set build timeout to $POETRY_HYPERGLASS_UI_BUILD_TIMEOUT seconds"
. .venv/bin/activate
echo "[INFO] Starting setup..."
poetry run hyperglass setup -d &> $LOG_FILE
python3 -m hyperglass.console setup -d &>$LOG_FILE
echo "[SUCCESS] Setup completed."
sleep 2
echo "[INFO] Copying devices.yaml file..."
cp ./hyperglass/examples/devices.yaml $HOME/hyperglass/devices.yaml
echo "[INFO] Copying directives.yaml file..."
cp ./.tests/directives.yaml $HOME/hyperglass/directives.yaml
echo "[INFO] Setting listen_address..."
echo "listen_address: 127.0.0.1" >> $HOME/hyperglass/hyperglass.yaml
echo "[INFO] Copying devices.yaml file..."
cp ./.tests/devices.yaml $HOME/hyperglass/devices.yaml
echo "[INFO] Starting UI build."
poetry run hyperglass build-ui &> $LOG_FILE
python3 -m hyperglass.console build-ui &>$LOG_FILE
if [[ ! $? == 0 ]]; then
echo "[ERROR] Failed to build hyperglass ui."
@ -29,7 +29,7 @@ else
fi
echo "[INFO] Starting hyperglass..."
poetry run hyperglass start &> $LOG_FILE &
python3 -m hyperglass.console start &>$LOG_FILE &
sleep 120
if [[ ! $? == 0 ]]; then

View file

@ -1,5 +0,0 @@
FROM ubuntu:bionic as base
WORKDIR /tmp
COPY .tests/install/ubuntu/setup.sh /tmp/init.sh
COPY ./install.sh /tmp/install.sh
RUN bash /tmp/init.sh

View file

@ -1,17 +0,0 @@
#!/usr/bin/env bash
echo "[INFO] Disabling multiverse repos..."
sed -i -e '/multiverse/s/^#*/#\ /g' /etc/apt/sources.list
cat /etc/apt/sources.list
echo "[INFO] Updating package repos..."
apt-get update &> /dev/null
echo "[INFO] Installing apt-utils..."
apt-get install -y apt-utils > /dev/null
echo "[INFO] Installing base dependencies..."
apt-get install -y curl git gnupg dialog build-essential > /dev/null
echo '[SUCCESS] Completed build'
exit 0

View file

@ -1,38 +0,0 @@
#!/usr/bin/env bash
UI_DIR="$(pwd)/hyperglass/ui"
check_typescript () {
cd $UI_DIR
node_modules/.bin/tsc --noEmit
}
check_eslint () {
cd $UI_DIR
node_modules/.bin/eslint .
}
check_prettier () {
cd $UI_DIR
node_modules/.bin/prettier -c -w .
}
for arg in "$@"
do
if [ "$arg" == "--typescript" ]
then
check_typescript
exit $?
elif [ "$arg" == "--eslint" ]
then
check_eslint
exit $?
elif [ "$arg" == "--prettier" ]
then
check_prettier
exit $?
else
echo "Arguments --typescript, --eslint, or --prettier required."
exit 1
fi
done

9
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,9 @@
{
"yaml.format.singleQuote": true,
"python.linting.mypyEnabled": false,
"python.linting.enabled": false,
"biome.lspBin": "./hyperglass/ui/node_modules/.bin/biome",
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "always"
}
}

View file

@ -2,19 +2,261 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 1.0.0-beta70 - 2021-01-05
## 2.0.4 - 2024-06-30
### Fixed
- [#100](https://github.com/checktheroads/hyperglass/issues/100): Fix result panel bug where incorrect panels would open, or panels would not open at all. Resolved by accessing internal state of the `Accordion />` component via `useAccordionContext()` instead of directly changing the index prop via state.
- [#264](https://github.com/thatmattlove/hyperglass/issues/264): Fixed issue where IPv6 traceroutes fail on Juniper devices due to `traceroute: wait must be >1 sec.` error. Thanks @renatoornelas!
- [#267](https://github.com/thatmattlove/hyperglass/issues/267): Fixed issue where responses were incorrectly cached, resulting in no data being shown in the AS Path viewer.
- [#268](https://github.com/thatmattlove/hyperglass/issues/268): Fixed issue where some Mikrotik commands failed to execute properly.
- [#269](https://github.com/thatmattlove/hyperglass/issues/269): Updated documentation regarding `structured.rpki.mode`.
- Removed unnecessary logging statements which caused logging errors.
- Fixed issue where validation of structured BGP route data may have failed under certain conditions.
### Changed
- Error responses are no longer cached.
## 2.0.3 - 2024-06-16
### Fixed
- [#262](https://github.com/thatmattlove/hyperglass/issues/262): Fix issue where Mikrotik output was improperly parsed and displayed an error as a result.
- Fixed issue where incorrect error styles were displayed.
- Fixed issue where 'results' accordion component did not re-open when closed.
- Fixed issue where pattern-based directive rules failed validation.
### Changed
- Set default logo width (back) to 50%, adjusted how the `web.logo.width` setting is handled in the UI.
## 2.0.2 - 2024-06-01
### Fixed
- [#257](https://github.com/thatmattlove/hyperglass/issues/257): Fix issue where if `web.location_display_mode` is set to `dropdown` (automatically or otherwise), the menu would remain open but become detached from the main element because the Query Type element came into view.
- [#253](https://github.com/thatmattlove/hyperglass/issues/253): _Actually_ fix issue where configuration values were improperly prepended with the `HYPERGLASS_APP_PATH` value.
- [#258](https://github.com/thatmattlove/hyperglass/issues/258): Center logo alignment on small screens.
- Fix broken license link in default credit menu.
### Added
- Added license to docs.
- [#254](https://github.com/thatmattlove/hyperglass/issues/254): Users may specify their own DNS over HTTPS provider if desired.
## 2.0.1 - 2024-05-31
### Fixed
- [#244](https://github.com/thatmattlove/hyperglass/issues/244): Fix issue with UI build where UI build directory already existed and therefore could not be created.
- [#249](https://github.com/thatmattlove/hyperglass/issues/249): Fix issue where configuration values were improperly prepended with the `HYPERGLASS_APP_PATH` value.
- [#251](https://github.com/thatmattlove/hyperglass/issues/251): Fix issue where browser-based DNS resolution did not show, causing FQDN queries to fail due to validation.
- Fix issue where logo was improperly sized on small screens.
## 2.0.0 - 2024-05-28
_v2.0.0 is a major release of hyperglass. Many things have changed, and it is likely best to redeploy hyperglass in a new environment to migrate to v2._
### Added
- Commands are now defined as [directives](https://hyperglass.dev/configuration/directives), which is a configuration definition of one or more commands to run on a device. A directive defines:
- What command (or commands) to run on the device
- Type of UI field, text input or select
- If the field can accept multiple values
- Help information to show about the directive
- Validation rules
- hyperglass now supports Docker, and using Docker is the default and recommended method for deployment.
- The list of locations (devices) is displayed as a gallery when the number of devices is 5 or less. This is a default value and is configurable.
- hyperglass now supports custom [input or output plugins](https://hyperglass.dev/plugins).
- Input Plugins: Apply custom validation logic or transform user input before the query is sent to a device.
- Output Plugins: Interact with the output from a device before it's displayed to the user.
- [#206](https://github.com/thatmattlove/hyperglass/issues/206): OpenBGPD is natively supported by hyperglass.
- [#176](https://github.com/thatmattlove/hyperglass/issues/176): Custom javascript or HTML can be injected into the web page (for tracking applications such as Google Analytics).
- [#173](https://github.com/thatmattlove/hyperglass/issues/173): Any output, such as BGP Communities, can be highlighted in the UI by defining [highlight patterns](https://hyperglass.dev/configuration/config/web-ui#highlighting).
- [#155](https://github.com/thatmattlove/hyperglass/issues/155): A user can now use the "My IP" button to insert their own IP into the query target field.
- [#143](https://github.com/thatmattlove/hyperglass/issues/143): Any HTTP endpoint may be configured as device from which to collect output.
### Fixed
- [#229](https://github.com/thatmattlove/hyperglass/issues/229): Fixed an issue where the logo was not visible when using Firefox.
- [#180](https://github.com/thatmattlove/hyperglass/issues/180): Fixed an issue where certain FQDNs were considered invalid.
- [#178](https://github.com/thatmattlove/hyperglass/issues/178): Fixed an issue where parsing of Arista EOS routes failed if MED is unset.
- [#145](https://github.com/thatmattlove/hyperglass/issues/145): Fixed an issue where menu links were improperly generated.
## 1.0.4 - 2021-07-03
### Fixed
- [#148](https://github.com/thatmattlove/hyperglass/issues/148): Update Debian/Ubuntu Python package name in installer and documentation.
- [#151](https://github.com/thatmattlove/hyperglass/issues/151): Fix issue with Junos structured output parsing from d1160fe where hyperglass would always query both IPv4 and IPv6 for any query type.
### Changed
- Improve handling of Junos XML errors. When a Junos device returns an error in the XML output, it will be displayed in the UI.
- Improve `hyperglass system-info` output. NodeJS version is now included in the output.
## 1.0.3 - 2021-06-23
_1.0.3 is a cosmetic release to factor in code-level changes related to the repository name change from checktheroads to thatmattlove._
## 1.0.2 - 2021-06-18
### Fixed
- [#150](https://github.com/thatmattlove/hyperglass/issues/150): Fix handling of BIRD AS_PATH/Community targets.
## 1.0.1 - 2021-06-17
### Fixed
- UI: fix body overflow issue
## 1.0.0 - 2021-05-30
### BREAKING CHANGES
- The `external_link`, `help`, and `terms` parameters no longer exist and have been replaced with generic `links` and `menus` options.
- The transitionary `frr_ssh` and `bird_ssh` NOS parameters no longer exist — `frr` and `bird` can now be used for SSH-based connectivity. hyperglass-agent users must now use `frr_legacy` and `bird_legacy` until hyperglass-agent is fully deprecated.
### Fixed
- [#139](https://github.com/thatmattlove/hyperglass/issues/139): Fix an issue where the API cannot be queried by device name.
### Changed
- Updated UI dependencies
### Added
- [#140](https://github.com/thatmattlove/hyperglass/issues/140): Genericize links and menus so that multiple links and/or menus can be defined and fully customized.
## 1.0.0-beta.82 - 2021-04-22
### BREAKING CHANGE
**NodeJS 14.15 or later is required**. See [the docs](https://hyperglass.dev/docs/getting-started) for installation instructions.
### Fixed
- [#135](https://github.com/thatmattlove/hyperglass/issues/135): Fix an issue where Juniper indirect next-hops were empty.
- Fix an issue where Juniper structured AS_PATH or Community queries would appear to fail if one address family (IPv4 or IPv6) had an empty response. For example, if an AS_PATH query for `.* 29414 .*` was made (which only returns IPv4 routes), the query would fail.
### Changed
- Updated major Python dependencies (FastAPI, Scrapli, Netmiko, Pydantic, Uvicorn, Gunicorn, etc.)
- Updated UI dependencies
- [#128](https://github.com/thatmattlove/hyperglass/pull/128): Add `best` to all Juniper BGP Route queries. See [Juniper docs](https://www.juniper.net/documentation/us/en/software/junos/bgp/topics/ref/command/show-route-best.html) for more details.
### Added
- The driver for devices can now be overridden with the `driver` parameter.
## 1.0.0-beta.81 - 2021-04-10
### Fixed
- [#124](https://github.com/thatmattlove/hyperglass/issues/124): Fix an issue where networks weren't always sorted alphabetically.
- [#126](https://github.com/thatmattlove/hyperglass/issues/126): Fix rendering of markdown tables.
- [#132](https://github.com/thatmattlove/hyperglass/issues/132): Fix an issue where iBGP routes on Arista devices caused output parsing to fail.
- [#133](https://github.com/thatmattlove/hyperglass/issues/133): Use body styles for background/foreground color, allowing the user to override the `light` and `dark` colors per the docs.
- Fix an issue with select menu list style.
### 1.0.0-beta.80 - 2021-03-03
### Fixed
- Fix an issue where the UI did not properly filter and detect the correct Query VRF when only one was defined.
- [#121](https://github.com/thatmattlove/hyperglass/issues/121): Fix issue with select menu styling in light mode.
### 1.0.0-beta.79 - 2021-02-26
### BREAKING CHANGE
**Major changes have been made to how VRFs are defined and handled.** Previously, you would signal to hyperglass that a VRF was the "default" VRF (meaning, a VRF does not need to be specified in any commands) by setting `name: default` in the VRF block. This limitation meant that a VRF named `default` _had_ to be defined, and that any users who keep their global routing table in a non-default VRF must define it separately.
Moving forward, the `name` field is only used to define the name of the VRF **as known by the device**. To signal that hyperglass should use the device's default VRF, set `default: true` on the VRF. **This is not the default**.
### Fixed
- Fix an issue where long-running commands, such as traceroutes that never complete, time out and display an error instead of the output.
### Changed
- Don't do external RPKI lookups for non global unicast prefixes.
- Migrate to palette-by-numbers for theming.
- Update UI dependencies.
### 1.0.0-beta.78 - 2021-02-12
### Added
- Experimental table output/structured data support for Arista EOS.
### Fixed
- Corrected warning color on active routes in table output.
### Changed
- Caught fetch errors now display the HTTP status text in the UI, instead of the caught error message.
### 1.0.0-beta.77 - 2021-02-10
**POTENTIALLY BREAKING CHANGE**: The device `display_name` field is being deprecated, in favor of a single `name` field, which will be displayed to the end user. The `display_name` field still works, but you should migrate away from it as soon as possible.
### Fixed
- [#117](https://github.com/thatmattlove/hyperglass/issues/117): Fix naming and mapping of the Arista EOS driver. `arista` and `arista_eos` will both work now.
### Changed
- Removed `display_name` field from device model. The `name` field will be used in the UI. If a `display_name` is defined, it will be used, for backwards compatibility.
### 1.0.0-beta.76 - 2021-02-06
**NOTICE**: *[hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent) will be deprecated soon. Use `frr_ssh` or `bird_ssh` for SSH connectivity in the meantime.*
### Added
- FRR & BIRD may now be accessed via standard SSH using the `frr_ssh` and `bird_ssh` NOS. [See the docs](https://hyperglass.dev/docs/platforms#caveats) for important caveats.
### Changed
- `port` in `devices.yaml` now defaults to 22 if not specified.
### Fixed
- AS Path graph view now uses [dagre](https://github.com/dagrejs/dagre) to properly arrange each AS.
- Added timeout argument to `hyperglass start --build` - fixes issue where running a UI build in this way failed due to a missing timeout argument error.
### 1.0.0-beta.75 - 2021-01-28
### Changed
- Default UI build timeout is now 180 seconds.
- The hyperglass `build-ui` CLI command now accepts a `--timeout` argument to override the UI build timeout.
### 1.0.0-beta.74 - 2021-01-25
### Changed
- The Scrapli driver no longer specifically ignores the system's SSH config file.
- Updated UI dependencies.
### Fixed
- [#109](https://github.com/thatmattlove/hyperglass/issues/109): Remove the custom error page, because it doesn't work and doesn't really add much.
### 1.0.0-beta.73 - 2021-01-18
### Added
- [#106](https://github.com/thatmattlove/hyperglass/issues/106): Add built-in support for Nokia SR OS (thanks @paunadeu!).
### Changed
- [#105](https://github.com/thatmattlove/hyperglass/issues/105): Check NodeJS version on startup to ensure the minimum supported version is present.
- Update UI dependencies.
### Fixed
- [#107](https://github.com/thatmattlove/hyperglass/issues/107): Fix footer menu styling so it doesn't overflow the viewport, especially on mobile.
### 1.0.0-beta.72 - 2021-01-16
### Fixed
- [#104](https://github.com/thatmattlove/hyperglass/issues/104): Handle the usage of `juniper_junos` as a NOS. `juniper_junos` will now automatically be mapped to `juniper`.
- Fix an issue with dual RP juniper devices and structured output, where output containing `{master}` outside of the XML output was improperly stripped out, causing a parsing failure.
### Changed
- **BREAKING**: The installer no longer generates a Systemd service file. While this was likely convenient for most, it introduced significant complexity and caused most installations using `~/hyperglass` as the app path to fail, with no clear way to resolve it. Further, while Systemd is arguably the most common, it is not the *only* process manager available. As such, the docs will be updated with a Systemd example, much like the current reverse proxy documentation.
### 1.0.0-beta.71 - 2021-01-10
### Added
- Added Google Analytics Support. Use the `google_analytics` field for the tracking ID in `hyperglass.yaml`.
### Changed
- Minor frontend code improvements.
### 1.0.0-beta.70 - 2021-01-05
### Fixed
- [#100](https://github.com/thatmattlove/hyperglass/issues/100): Fix result panel bug where incorrect panels would open, or panels would not open at all. Resolved by accessing internal state of the `Accordion />` component via `useAccordionContext()` instead of directly changing the index prop via state.
### Changed
- Query results now automatically cancel when each result panel unmounts (e.g. when one clicks the back button).
## 1.0.0-beta69 - 2021-01-03
### 1.0.0-beta.69 - 2021-01-03
### Fixed
@ -25,14 +267,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Setup no longer adds example files
## 1.0.0-beta67 - 2021-01-02
### 1.0.0-beta.67 - 2021-01-02
### Fixed
- Fix handling of `web.theme.default_color_mode`. Starting in 1.0.0-beta.65, it was completely ignored and used the library's default of `light`. Now, it's handled properly.
- Fix table output layout issues, particularly on mobile.
## 1.0.0-beta66 - 2021-01-02
### 1.0.0-beta.66 - 2021-01-02
### Fixed
@ -43,11 +285,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `web.theme.colors.black` and `web.theme.colors.white` are now `web.theme.colors.dark` and `web.theme.colors.light respectively`
## 1.0.0-beta65 - 2021-01-01
### 1.0.0-beta.65 - 2021-01-01
### Added
- [#72](https://github.com/checktheroads/hyperglass/issues/72): _EXPERIMENTAL_ BGP map support for devices supporting structured output (Juniper Junos, currently).
- [#72](https://github.com/thatmattlove/hyperglass/issues/72): _EXPERIMENTAL_ BGP map support for devices supporting structured output (Juniper Junos, currently).
### Fixed
@ -58,23 +300,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `web.text.title` and `web.text.subtitle` now carry a 32 character limit for simpler styling.
- Various UI layout, styling improvements, and stability improvements.
## 1.0.0-beta63 - 2020-10-18
### 1.0.0-beta.63 - 2020-10-18
### Added
- [#87](https://github.com/checktheroads/hyperglass/issues/87): [TNSR] Support. To add a TNSR device, use the `tnsr` [NOS key](https://hyperglass.io/docs/adding-devices#all-device-parameters).
- [#87](https://github.com/thatmattlove/hyperglass/issues/87): [TNSR] Support. To add a TNSR device, use the `tnsr` [NOS key](https://hyperglass.dev/docs/adding-devices#all-device-parameters).
### Fixed
- Fix an issue causing hyperglass custom exceptions to not be properly raised, which caused more generic error messages in the UI/API.
## 1.0.0-beta62 - 2020-10-17
### 1.0.0-beta.62 - 2020-10-17
### Fixed
- Fix an issue causing exceptions not to be logged to the log file (but logged to stdout).
## 1.0.0-beta61 - 2020-10-11
### 1.0.0-beta.61 - 2020-10-11
### POTENTIALLY BREAKING CHANGE
@ -86,17 +328,17 @@ When hyperglass starts up, it will check to see if `~/hyperglass` or `/etc/hyper
### Added
- [#81](https://github.com/checktheroads/hyperglass/issues/81): Add support for SSH key authentication. See [the docs](https://hyperglass.io/docs/adding-devices#credential) for more details.
- [#81](https://github.com/thatmattlove/hyperglass/issues/81): Add support for SSH key authentication. See [the docs](https://hyperglass.dev/docs/adding-devices#credential) for more details.
## 1.0.0-beta60 - 2020-10-10
### 1.0.0-beta.60 - 2020-10-10
### Fixed
- [#90](https://github.com/checktheroads/hyperglass/issues/90): Fix a typing error that caused ping & traceroute queries to fail for certain devices.
- [#90](https://github.com/thatmattlove/hyperglass/issues/90): Fix a typing error that caused ping & traceroute queries to fail for certain devices.
### Added
- [#82](https://github.com/checktheroads/hyperglass/issues/82): Add support for Redis password authentication. Authentication can be configured in the following manner:
- [#82](https://github.com/thatmattlove/hyperglass/issues/82): Add support for Redis password authentication. Authentication can be configured in the following manner:
```yaml
# hyperglass.yaml
@ -110,7 +352,7 @@ This would correspond with the following stanza in the Redis configuration file:
requirepass examplepassword
```
## 1.0.0-beta59 - 2020-10-05
### 1.0.0-beta.59 - 2020-10-05
### Added
@ -122,11 +364,11 @@ requirepass examplepassword
- Improve output parsing scalability - parsers can now be defined on a per-NOS basis regardless of whether or not structured-data is used.
- Restructure model locations & importing to remove some complexities.
## 1.0.0-beta58 - 2020-09-28
### 1.0.0-beta.58 - 2020-09-28
### Changed
- [#79](https://github.com/checktheroads/hyperglass/issues/79): Run the UI build on startup & clarify docs.
- [#79](https://github.com/thatmattlove/hyperglass/issues/79): Run the UI build on startup & clarify docs.
- Removed all f-strings from log messages.
- Migrate icon library to [@meronex/icons](https://github.com/meronex/meronex-icons) for better tree-shaking.
- Improve console (stdout) logging
@ -134,16 +376,16 @@ requirepass examplepassword
### Fixed
- [#74](https://github.com/checktheroads/hyperglass/issues/74): Fix UI build failures caused by `.alias.js`.
- [#75](https://github.com/checktheroads/hyperglass/issues/75): Fix whitespace stripping of query target.
- [#77](https://github.com/checktheroads/hyperglass/issues/77): Allow dashes in FQDN validation pattern.
- [#83](https://github.com/checktheroads/hyperglass/issues/83): Fix lack of support for `protocol-nh` field in Juniper XML BGP table.
- [#74](https://github.com/thatmattlove/hyperglass/issues/74): Fix UI build failures caused by `.alias.js`.
- [#75](https://github.com/thatmattlove/hyperglass/issues/75): Fix whitespace stripping of query target.
- [#77](https://github.com/thatmattlove/hyperglass/issues/77): Allow dashes in FQDN validation pattern.
- [#83](https://github.com/thatmattlove/hyperglass/issues/83): Fix lack of support for `protocol-nh` field in Juniper XML BGP table.
## 1.0.0-beta57 - 2020-07-30
### 1.0.0-beta.57 - 2020-07-30
### BREAKING CHANGE
If you use [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent), you must upgrade your version of hyperglass-agent to 0.1.6 or later. If using hyperglass-agent with SSL, this release will require you to re-generate & re-send your SSL certificates to hyperglass:
If you use [hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent), you must upgrade your version of hyperglass-agent to 0.1.6 or later. If using hyperglass-agent with SSL, this release will require you to re-generate & re-send your SSL certificates to hyperglass:
```console
$ hyperglass-agent certificate
@ -157,7 +399,7 @@ $ hyperglass-agent send-certificate
- Refactored device, query, proxy models to no longer scrub unsupported characters from the device name for the purposes of Python class attribute accessing.
- Updated hyperglass-agent docs.
## 1.0.0-beta56 - 2020-07-28
### 1.0.0-beta.56 - 2020-07-28
### Changed
@ -166,25 +408,25 @@ $ hyperglass-agent send-certificate
### Fixed
- [#56](https://github.com/checktheroads/hyperglass/issues/56): Fix a silent Redis connection error if the Redis server was anything other than `localhost`, preventing hyperglass from starting.
- [#56](https://github.com/thatmattlove/hyperglass/issues/56): Fix a silent Redis connection error if the Redis server was anything other than `localhost`, preventing hyperglass from starting.
## 1.0.0-beta55 - 2020-07-27
### 1.0.0-beta.55 - 2020-07-27
### Changed
- Removed JS favicon build process in favor of native Python implementation ([favicons](https://github/checktheroads/favicons))
- Removed JS favicon build process in favor of native Python implementation ([favicons](https://github/thatmattlove/favicons))
## 1.0.0-beta54 - 2020-07-25
### 1.0.0-beta.54 - 2020-07-25
### Fixed
- Queries to hyperglass-agent devices failed due to the error `AttributeError: 'AgentConnection' object has no attribute 'collect'`
## 1.0.0-beta53 - 2020-07-23
### 1.0.0-beta.53 - 2020-07-23
### Added
- **BREAKING CHANGE**: [Scrapli](https://github.com/carlmontanari/scrapli) is now used for SSH connectivity to Cisco IOS, Cisco IOS-XE, Cisco IOS-XR, Cisco NX-OS Juniper Junos, and Arista EOS, which should improve the speed at which output is gathered from devices. _As of this release, Cisco IOS/IOS-XE and Juniper Junos have been directly tested and worked without issue. However, if you discover any anomalies with any of these operating systems, please [open an issue](https://github.com/checktheroads/hyperglass/issues)._
- **BREAKING CHANGE**: [Scrapli](https://github.com/carlmontanari/scrapli) is now used for SSH connectivity to Cisco IOS, Cisco IOS-XE, Cisco IOS-XR, Cisco NX-OS Juniper Junos, and Arista EOS, which should improve the speed at which output is gathered from devices. _As of this release, Cisco IOS/IOS-XE and Juniper Junos have been directly tested and worked without issue. However, if you discover any anomalies with any of these operating systems, please [open an issue](https://github.com/thatmattlove/hyperglass/issues)._
### Changed
@ -196,31 +438,31 @@ $ hyperglass-agent send-certificate
- UI: Error messages couldn't be copied with the copy button
## 1.0.0-beta52 - 2020-07-19
### 1.0.0-beta.52 - 2020-07-19
### Added
- API route `/api/info`, which displays general system information such as the name of the organization and version of hyperglass.
- API docs configuration parameters for the `/api/info` route.
- [#63](https://github.com/checktheroads/hyperglass/issues/63): Minimum RAM requirements.
- [#63](https://github.com/thatmattlove/hyperglass/issues/63): Minimum RAM requirements.
- `hyperglass system-info` CLI command to gather system CPU, Memory, Disk, Python Version, hyperglass Version, & OS info. _Note: this information is only gathered if you run the command, and even then, is printed to the console and not otherwise shared or exported_.
### Changed
- Updated docs dependencies.
- Improved YAML alias & anchor docs.
- [#55](https://github.com/checktheroads/hyperglass/issues/55): Removed YAML alias & anchors from default examples to avoid confusion.
- [#55](https://github.com/thatmattlove/hyperglass/issues/55): Removed YAML alias & anchors from default examples to avoid confusion.
### Fixed
- API docs logo URL now displays correctly.
- [#62](https://github.com/checktheroads/hyperglass/issues/62): Added `epel-release` to CentOS installation instructions.
- [#59](https://github.com/checktheroads/hyperglass/issues/59): Fixed copy output for Juniper devices on non-table output query types.
- [#62](https://github.com/thatmattlove/hyperglass/issues/62): Added `epel-release` to CentOS installation instructions.
- [#59](https://github.com/thatmattlove/hyperglass/issues/59): Fixed copy output for Juniper devices on non-table output query types.
- [hyperglass-agent #6](https://github.com/hyperglass-agent/issues/6): Fixed hyperglass-agent documentation issues.
- Improve command customization docs.
- [#61](https://github.com/checktheroads/hyperglass/issues/61): Fixed copy output for table data. Output is now a bulleted list of parsed data.
- [#61](https://github.com/thatmattlove/hyperglass/issues/61): Fixed copy output for table data. Output is now a bulleted list of parsed data.
## 1.0.0-beta51 - 2020-07-13
### 1.0.0-beta.51 - 2020-07-13
### Changed
@ -229,10 +471,10 @@ $ hyperglass-agent send-certificate
### Fixed
- [#54](https://github.com/checktheroads/hyperglass/issues/54): A Junos parsing error caused routes with no communities to raise an error.
- [#54](https://github.com/thatmattlove/hyperglass/issues/54): A Junos parsing error caused routes with no communities to raise an error.
- Pre-validated config files are no longer logged on startup unless debugging is enabled.
## 1.0.0-beta50 - 2020-07-12
### 1.0.0-beta.50 - 2020-07-12
### Added
@ -249,10 +491,10 @@ $ hyperglass-agent send-certificate
### Fixed
- [#54](https://github.com/checktheroads/hyperglass/issues/54): A Junos structured/table output parsing error caused routes with multiple next-hops to raise an error.
- [#54](https://github.com/thatmattlove/hyperglass/issues/54): A Junos structured/table output parsing error caused routes with multiple next-hops to raise an error.
- RPKI validation no longer occurs twice (once on serialization of the output, once on validation of the API response).
## 1.0.0-beta49 - 2020-07-05
### 1.0.0-beta.49 - 2020-07-05
### Changed
@ -264,11 +506,11 @@ $ hyperglass-agent send-certificate
- Route lookups for private (RFC 1918) addresses failed due to an unnecessary lookup to [bgp.tools](https://bgp.tools)
## 1.0.0-beta48 - 2020-07-04
### 1.0.0-beta.48 - 2020-07-04
### Added
- New NOS: **VyOS**. [See docs for important caveats](https://hyperglass.io/docs/commands).
- New NOS: **VyOS**. [See docs for important caveats](https://hyperglass.dev/docs/commands).
### Fixed
@ -276,18 +518,18 @@ $ hyperglass-agent send-certificate
- When copying the opengraph image, the copied image was not deleted.
- Default traceroute help link now _actually_ points to the new docs site.
## 1.0.0-beta47 - 2020-07-04
### 1.0.0-beta.47 - 2020-07-04
### Added
- Opengraph images are now automatically generated in the correct format from any valid image file.
- Better color mode toggle icons (they now match [hyperglass.io](https://hyperglass.io)).
- Better color mode toggle icons (they now match [hyperglass.dev](https://hyperglass.dev)).
### Changed
- Improved SEO & Accessibility for UI.
- Default traceroute help link now points to new docs site.
- Slightly different default black & white colors (they now match [hyperglass.io](https://hyperglass.io)).
- Slightly different default black & white colors (they now match [hyperglass.dev](https://hyperglass.dev)).
- Various docs site improvements
### Fixed
@ -297,13 +539,13 @@ $ hyperglass-agent send-certificate
- Generated favicon manifest files now go to the correct directory.
- Various docs site fixes
## 1.0.0-beta46 - 2020-06-28
### 1.0.0-beta.46 - 2020-06-28
### Added
- Support for hyperglass-agent [0.1.5](https://github.com/checktheroads/hyperglass-agent)
- Support for hyperglass-agent [0.1.5](https://github.com/thatmattlove/hyperglass-agent)
## 1.0.0-beta45 - 2020-06-27
### 1.0.0-beta.45 - 2020-06-27
### Changed
@ -314,7 +556,7 @@ $ hyperglass-agent send-certificate
- Webhook construction bugs that caused webhooks not to send
- Empty response handling for table output
## 1.0.0-beta44 - 2020-06-26
### 1.0.0-beta.44 - 2020-06-26
### Added
@ -324,13 +566,13 @@ $ hyperglass-agent send-certificate
- If webhooks were enabled, a hung test connection to RIPEStat would cause the query to time out
## 1.0.0-beta43 - 2020-06-22
### 1.0.0-beta.43 - 2020-06-22
### Fixed
- Logo path handling in UI
## 1.0.0-beta42 - 2020-06-21
### 1.0.0-beta.42 - 2020-06-21
### Added
@ -338,4 +580,4 @@ $ hyperglass-agent send-certificate
### Changed
- **BREAKING CHANGE**: The `logo` section now requires the full path for logo files. See [the docs](https://hyperglass.io/docs/ui/logo) for details.
- **BREAKING CHANGE**: The `logo` section now requires the full path for logo files. See [the docs](https://hyperglass.dev/docs/ui/logo) for details.

View file

@ -8,7 +8,7 @@ This isnt an exhaustive list of things that you cant do. Rather, take it i
This code of conduct applies to all spaces managed by the hyperglass community. This includes mailing lists, the issue tracker, Telegram groups, Gitter communities, and any other forums created by the project team which the community uses for communication. In addition, violations of this code outside these spaces may affect a person's ability to participate within them.
If you believe someone is violating the code of conduct, we ask that you report it by emailing [conduct@hyperglass.io](mailto:conduct@hyperglass.io).
If you believe someone is violating the code of conduct, we ask that you report it by emailing [matt@hyperglass.dev](mailto:matt@hyperglass.dev).
**Be friendly and patient.** Be welcoming. We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.

View file

@ -1,18 +1,18 @@
hyperglass is primarily maintained by me, [Matt Love](https://github.com/checktheroads). This is my first ever open source application, and as such, it's kind of my "baby". When I first started writing hyperglass, I knew _nothing_ about development, Python, Javascript, or Github. I was a network engineer trying to solve a problem and learn a few things while I was at it.
hyperglass is primarily maintained by me, [Matt Love](https://github.com/thatmattlove). This was my first ever open source application, and as such, it's kind of my "baby". When I first started writing hyperglass, I knew _nothing_ about development, Python, JavaScript/TypeScript, or GitHub. I was a network engineer trying to solve a problem and learn a few things while I was at it.
Because I've been solo-maintaining and building hyperglass since around April 2019, I've become pretty particular about things that might seem trivial to someone just trying to help out. While I **absolutely welcome development contributions**, please don't be offended if pull requests are denied, or if I request things to be done a certain way. To help understand why, here are some of the development design goals for hyperglass:
Because I've been solo-maintaining and building hyperglass since around April 2019, I've become pretty particular about things that might seem trivial to someone just trying to help out. While I welcome development contributions, please don't be offended if pull requests are denied, if I request things to be done a certain way, or if I integrate something similar to your changes separately from your PR. To help understand why, here are some of the development design goals for hyperglass:
- **Pristine code quality**
- [Black](https://github.com/python/black) formatting for Python
- Strict adherence to ESLint/Prettier configs for Javascript/React
- _ZERO_ linting errors
- [Black](https://github.com/python/black) formatting for Python.
- Strict adherence to ESLint/Prettier configs for frontend code.
- _ZERO_ linting errors.
- Linting exceptions only used when there is _no other way_, and should be accompanied with comments about why there is no other way.
- **No hard-coding**
- Anything visible to the end-user _must_ be customizable by the administrator. If it's not, or can't be, leave code or PR comments as to why.
- This includes things like timeouts, error messages, etc.
- **Mobile & Accessible**
- All UI element must be available on both desktop and mobile devices
- UI must achieve a 100 Lighthouse/PageInsights score for accessibility
- All UI element must be available on both desktop and mobile devices.
- UI must achieve a 100 Lighthouse/PageInsights score for accessibility.
- **IPv6 Support**
- Any new device support must include IPv6 commands
- All frontend and backend code must support IPv6, both for running the application and processing queries
- Any new device support must include IPv6 commands.
- All frontend and backend code must support IPv6, both for running the application and processing queries.

24
Dockerfile Normal file
View file

@ -0,0 +1,24 @@
FROM python:3.12.3-alpine as base
WORKDIR /opt/hyperglass
ENV HYPERGLASS_APP_PATH=/etc/hyperglass
ENV HYPERGLASS_HOST=0.0.0.0
ENV HYPERGLASS_PORT=8001
ENV HYPERGLASS_DEBUG=false
ENV HYPERGLASS_DEV_MODE=false
ENV HYPERGLASS_REDIS_HOST=redis
ENV HYPEGLASS_DISABLE_UI=true
ENV HYPERGLASS_CONTAINER=true
COPY . .
FROM base as ui
WORKDIR /opt/hyperglass/hyperglass/ui
RUN apk add build-base pkgconfig cairo-dev nodejs npm
RUN npm install -g pnpm
RUN pnpm install -P
FROM ui as hyperglass
WORKDIR /opt/hyperglass
RUN pip3 install -e .
EXPOSE ${HYPERGLASS_PORT}
CMD ["python3", "-m", "hyperglass.console", "start"]

View file

@ -1,6 +1,6 @@
The Clear BSD License
Copyright (c) 2020 Matthew Love
Copyright (c) 2024 Matthew Love
All rights reserved.
Redistribution and use in source and binary forms, with or without

View file

@ -11,73 +11,60 @@
<div align="center">
[**Documentation**](https://hyperglass.io)&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;[**Screenshots**](https://hyperglass.io/screenshots)&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;[**Live Demo**](https://demo.hyperglass.io/)
[**Documentation**](https://hyperglass.dev)&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;[**Live Demo**](https://demo.hyperglass.dev/)
[![PyPI](https://img.shields.io/pypi/v/hyperglass?style=for-the-badge)](https://pypi.org/project/hyperglass/)
![PyPI - Downloads](https://img.shields.io/pypi/dm/hyperglass?color=%2340798C&style=for-the-badge)
[![GitHub Contributors](https://img.shields.io/github/contributors/checktheroads/hyperglass?color=40798C&style=for-the-badge)](https://github.com/checktheroads/hyperglass)
[![Gitter](https://img.shields.io/gitter/room/checktheroads/hyperglass?color=ff5e5b&style=for-the-badge)](https://gitter.im/hyperglass)
[![Telegram](https://img.shields.io/badge/chat-telegram-blue?style=for-the-badge&color=blue&logo=telegram)](https://t.me/hyperglasslg)
[![Frontend Tests](https://img.shields.io/github/workflow/status/checktheroads/hyperglass/Frontend%20Testing?label=Frontend%20Tests&style=for-the-badge)](https://github.com/checktheroads/hyperglass/actions?query=workflow%3A%Frontend+Testing%22)
[![Backend Tests](https://img.shields.io/github/workflow/status/checktheroads/hyperglass/Backend%20Testing?label=Backend%20Tests&style=for-the-badge)](https://github.com/checktheroads/hyperglass/actions?query=workflow%3A%Backend+Testing%22)
[![Installer Tests](https://img.shields.io/github/workflow/status/checktheroads/hyperglass/Installer%20Testing?label=Installer%20Tests&style=for-the-badge)](https://github.com/checktheroads/hyperglass/actions?query=workflow%3A%Installer+Testing%22)
[![Frontend Tests](https://img.shields.io/github/actions/workflow/status/thatmattlove/hyperglass/frontend.yml?label=Frontend%20Tests&style=for-the-badge)](https://github.com/thatmattlove/hyperglass/actions/workflows/frontend.yml)
[![Backend Tests](https://img.shields.io/github/actions/workflow/status/thatmattlove/hyperglass/backend.yml?label=Backend%20Tests&style=for-the-badge)](https://github.com/thatmattlove/hyperglass/actions/workflows/backend.yml)
<br/>
hyperglass is intended to make implementing a looking glass too easy not to do, with the lofty goal of improving the internet community at large by making looking glasses more common across autonomous systems of any size.
<br/>
⚠️ **v1.0.0** *is currently in beta. While everything should work, some things might not. Documentation and the live demo are not yet complete. For a fully working and documented version of hyperglass, **please go to the [v0 branch](https://github.com/checktheroads/hyperglass/tree/v0)**.*
</div>
### [Changelog](https://github.com/checktheroads/hyperglass/blob/v1.0.0/CHANGELOG.md)
### [Changelog](https://hyperglass.dev/changelog)
## Features
- BGP Route, BGP Community, BGP AS Path, Ping, & Traceroute
- BGP Route, BGP Community, BGP AS Path, Ping, & Traceroute, or [add your own commands](https://hyperglass.dev/configuration/directives).
- Full IPv6 support
- Customizable everything: features, theme, UI/API text, error messages, commands
- Built in support for:
- Arista EOS
- BIRD
- Cisco IOS-XR
- Cisco IOS/IOS-XE
- Cisco NX-OS
- FRRouting
- Huawei
- Juniper JunOS
- Mikrotik
- TNSR
- VyOS
- Configurable support for any other [supported platform](https://hyperglass.io/docs/platforms)
- Built-in support for:
- Arista EOS
- BIRD
- Cisco IOS
- Cisco NX-OS
- Cisco IOS-XR
- FRRouting
- Huawei VRP
- Juniper Junos
- Mikrotik
- Nokia SR OS
- OpenBGPD
- TNSR
- VyOS
- Configurable support for any other [supported platform](https://hyperglass.dev/platforms)
- Optionally access devices via an SSH proxy/jump server
- VRF support
- Access List/prefix-list style query control to whitelist or blacklist query targets on a per-VRF basis
- Access-list/prefix-list style query control to whitelist or blacklist query targets
- REST API with automatic, configurable OpenAPI documentation
- Modern, responsive UI built on [ReactJS](https://reactjs.org/), with [NextJS](https://nextjs.org/) & [Chakra UI](https://chakra-ui.com/), written in [TypeScript](https://www.typescriptlang.org/)
- Query multiple devices simultaneously
- Browser-based DNS-over-HTTPS resolution of FQDN queries
*To request support for a specific platform, please [submit a Github Issue](https://github.com/checktheroads/hyperglass/issues/new) with the **enhancement** label.*
*To request support for a specific platform, please [submit a Github Issue](https://github.com/thatmattlove/hyperglass/issues/new) with the **feature** label.*
### [Get Started →](https://hyperglass.io/)
### [Get Started →](https://hyperglass.dev/installation)
## Community
- [Slack](https://netdev.chat/)
- [Telegram](https://t.me/hyperglasslg)
- [Gitter](https://gitter.im/hyperglass)
- [Twitter](https://twitter.com/checktheroads)
- [Keybase](https://keybase.io/team/hyperglass)
Any users, potential users, or contributors of hyperglass are welcome to join and discuss usage, feature requests, bugs, and other things.
**hyperglass is developed with the express intention of being free to the networking community**.
*However, the hyperglass demo does cost [@checktheroads](https://github.com/checktheroads) $60/year for the [hyperglass.io](https://hyperglass.io) domain. If you're feeling particularly helpful and want to help offset that cost, small donations are welcome.*
*However, if you're feeling particularly helpful or generous, small donations are welcome.*
[![Donate](https://img.shields.io/badge/Donate-blue.svg?logo=paypal&style=for-the-badge)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZQFH3BB2B5M3E&source=url)
@ -85,10 +72,9 @@ Any users, potential users, or contributors of hyperglass are welcome to join an
hyperglass is built entirely on open-source software. Here are some of the awesome libraries used, check them out too!
- [FastAPI](https://fastapi.tiangolo.com/)
- [Netmiko](https://github.com/ktbyers/netmiko)
- [Scrapli](https://github.com/carlmontanari/scrapli)
- [Pydantic](https://pydantic-docs.helpmanual.io/)
- [Litestar](https://litestar.dev)
- [Pydantic](https://docs.pydantic.dev/latest/)
- [Chakra UI](https://chakra-ui.com/)
[![GitHub](https://img.shields.io/github/license/checktheroads/hyperglass?color=330036&style=for-the-badge)](https://github.com/checktheroads/hyperglass/blob/v1.0.0/LICENSE)
[![GitHub](https://img.shields.io/github/license/thatmattlove/hyperglass?color=330036&style=for-the-badge)](https://github.com/thatmattlove/hyperglass/blob/main/LICENSE)

48
biome.json Normal file
View file

@ -0,0 +1,48 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"organizeImports": {
"enabled": true
},
"files": {
"ignore": [
"node_modules",
"dist",
".next/",
"out/",
"favicon-formats.ts",
"custom.*[js, html]",
"hyperglass.json"
]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noUselessTypeConstraint": "off",
"noBannedTypes": "off"
},
"style": {
"noInferrableTypes": "off",
"noNonNullAssertion": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
}
}
},
"formatter": {
"indentStyle": "space",
"lineWidth": 100,
"indentWidth": 2
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"bracketSpacing": true,
"semicolons": "always",
"arrowParentheses": "asNeeded",
"trailingComma": "all"
}
}
}

21
compose.yaml Normal file
View file

@ -0,0 +1,21 @@
services:
redis:
image: "redis:alpine"
hyperglass:
depends_on:
- redis
environment:
- HYPERGLASS_APP_PATH=/etc/hyperglass
- HYPERGLASS_HOST=${HYPERGLASS_HOST-0.0.0.0}
- HYPERGLASS_PORT=${HYPERGLASS_PORT-8001}
- HYPERGLASS_DEBUG=${HYPERGLASS_DEBUG-false}
- HYPERGLASS_DEV_MODE=${HYPERGLASS_DEV_MODE-false}
- HYPERGLASS_REDIS_HOST=${HYPERGLASS_REDIS_HOST-redis}
- HYPEGLASS_DISABLE_UI=${HYPEGLASS_DISABLE_UI-false}
- HYPERGLASS_CONTAINER=${HYPERGLASS_CONTAINER-true}
- HYPERGLASS_ORIGINAL_APP_PATH=${HYPERGLASS_APP_PATH}
build: .
ports:
- "${HYPERGLASS_PORT-8001}:${HYPERGLASS_PORT-8001}"
volumes:
- ${HYPERGLASS_APP_PATH-/etc/hyperglass}:/etc/hyperglass

28
docs/.gitignore vendored Executable file → Normal file
View file

@ -1,20 +1,10 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env*
*.tsbuildinfo
*.tmp*
*.log
node_modules/
fonts/
.next
out
pages/changelog.mdx

View file

@ -1,33 +0,0 @@
# Website
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
### Installation
```
$ yarn
```
### Local Development
```
$ yarn start
```
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
```
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

29
docs/components/color.tsx Normal file
View file

@ -0,0 +1,29 @@
type ColorProps = {
hex: string;
noText?: boolean;
};
export const Color = (props: ColorProps) => {
const { hex, noText = false } = props;
return (
<span className="color-swatch-container">
<span className={["nx-rounded-sm", "color-swatch"].join(" ")} />
<code>{noText ? "" : hex}</code>
<style jsx>{`
span.color-swatch-container {
display: inline-flex;
align-items: ${noText ? "flex-end" : "center"};
justify-content: space-between;
}
span.color-swatch {
display: inline-flex;
background-color: ${hex};
height: 1.5rem;
width: 1.5rem;
padding: 0.5rem 0.5rem;
margin-right: ${noText ? "unset" : "0.5rem"};
}
`}</style>
</span>
);
};

View file

@ -0,0 +1,36 @@
import NextLink from "next/link";
import { Button } from "nextra/components";
const DocsIcon = () => (
<svg
width="16"
height="16"
fill="currentColor"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
className="bi bi-file-earmark-text-fill"
>
<title>Docs</title>
<path d="M9.293 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.707A1 1 0 0 0 13.707 4L10 .293A1 1 0 0 0 9.293 0M9.5 3.5v-2l3 3h-2a1 1 0 0 1-1-1M4.5 9a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1zM4 10.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m.5 2.5a.5.5 0 0 1 0-1h4a.5.5 0 0 1 0 1z" />
</svg>
);
export interface DocsButtonProps extends React.ComponentProps<"button"> {
href: string;
side?: "left" | "right";
}
export const DocsButton = (props: DocsButtonProps) => {
const { href, side = "left", ...rest } = props;
return (
<NextLink href={href}>
<Button
title="Docs"
className={`nx-p-0 nx-m${side === "left" ? "r" : "l"}-2`}
{...rest}
>
<DocsIcon />
</Button>
</NextLink>
);
};

View file

@ -0,0 +1,14 @@
export const NotSupported = (props: React.ComponentProps<"svg">) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="#edae49"
viewBox="0 0 16 16"
{...props}
>
<title>Not Supported</title>
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" />
</svg>
);

View file

@ -0,0 +1,44 @@
import { Code, Table, Td, Th, Tr } from "nextra/components";
import platforms from "~/platforms.json";
import { NotSupported } from "./not-supported-icon";
import { Supported } from "./supported-icon";
export const SupportedPlatforms = () => (
<ul className="nx-mt-2 first:nx-mt-0 ltr:nx-ml-6 rtl:nx-mr-6">
{platforms.reduce<React.ReactNode[]>((final, platform) => {
if (platform.native) {
const element = (
<li key={platform.name}>
<Supported style={{ display: "inline", marginRight: "0.5rem" }} />
{platform.name}
</li>
);
final.push(element);
}
return final;
}, [])}
</ul>
);
export const PlatformTable = () => (
<Table>
<tbody>
<Tr>
<Th>Platform Keys</Th>
<Th>Natively Supported</Th>
</Tr>
{platforms.map((spec) => (
<Tr key={spec.keys.join("--")}>
<Td>
{spec.keys.map((key) => (
<Code className="nx-mx-2" key={key}>
{key}
</Code>
))}
</Td>
<Td align="center">{spec.native ? <Supported /> : <NotSupported />}</Td>
</Tr>
))}
</tbody>
</Table>
);

View file

@ -0,0 +1,13 @@
export const Supported = (props: React.ComponentProps<"svg">) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="#35b246"
viewBox="0 0 16 16"
{...props}
>
<title>Supported</title>
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z" />
</svg>
);

20
docs/docs/.gitignore vendored
View file

@ -1,20 +0,0 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View file

@ -1,379 +0,0 @@
---
id: adding-devices
title: Adding Devices
sidebar_label: Adding Devices
keywords:
[hyperglass, authentication, ssl, proxy, access list, prefix list, acl, help]
description: Adding devices to hyperglass
---
import Link from "@docusaurus/Link";
import R from "../src/components/Required";
import MiniNote from "../src/components/MiniNote";
import Code from "../src/components/JSXCode";
<div class="table--full-width" />
## Adding Devices
To add, as an example, a Cisco router, add the following to your `devices.yaml`, with the relevant details changed for your device:
```yaml title="devices.yaml"
routers:
- name: router01.pop01
address: 10.0.0.1
network: AS65000
credential:
username: username
password: password
display_name: Phoenix, AZ
port: 22
nos: cisco_ios
vrfs:
- name: default
ipv4:
source_address: 192.0.2.1
ipv6:
source_address: 2001:db8::1
```
## All Device Parameters
| Parameter | Type | Description |
| :------------------ | :-----: | :----------------------------------------------------------------------------------------------------------------- |
| <R/> `name` | String | Device hostname. This is not user-facing. |
| <R/> `address` | String | Device management hostname or IP address. |
| <R/> `network` | String | Primary network this device is a member of. Used for device grouping. Usually something like 'AS65000'. |
| <R/> `display_name` | String | Device's user-facing name. |
| <R/> `port` | Integer | TCP port used to connect to the device. |
| <R/> `nos` | String | Network Operating System. <MiniNote>Must be a <Link to="platforms">supported platform</Link>.</MiniNote> |
| `structured_output` | Boolean | Disabled output parsing to structured data. |
| <R/>`credential` | | [Device Credential Configuration](#credential) |
| <R/>`vrfs` | | [Device VRF Configuration](#vrfs) |
| `proxy` | | [SSH Proxy Configuration](#proxy) |
| `ssl` | | [SSL Configuration](#ssl) for devices using [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent). |
### `proxy`
Any device that uses SSH (see [platforms](platforms) for breakdown) can be accessed through an intermediary SSH "proxy". The process is nearly identical to using local SSH tunneling, e.g. `ssh -L local_port:remote_device:remote_port username@proxy_server -p proxy_port`.
| Parameter | Type | Default | Description |
| :---------------- | :-----: | :------------ | :--------------------------------------------------------------------------------------------------------------- |
| <R/> `name` | String | | Proxy hostname. |
| <R/> `address` | String | | Proxy management hostname or IP address. |
| <R/> `credential` | | | [Proxy Credential Configuration](#credential) |
| `nos` | String | `'linux_ssh'` | Proxy's network operating system. <MiniNote>Must be a <Link to="platforms">supported platform</Link>.</MiniNote> |
| `port` | Integer | `22` | TCP port user to connect to the proxy. |
:::important
Currently, only `linux_ssh` has been tested and validated for use as an SSH proxy.
:::
### `credential`
While all devices require a credential mapping, the credential values themselves may be used in different ways depending on the device NOS. For SSH devices, the credential is used as a typical SSH username and password.
For HTTP devices (i.e. devices using [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent)), the username is ignored and the password is used as a secret for [JSON Web Token](https://tools.ietf.org/html/rfc7519) encoding/decoding.
| Parameter | Type | Description |
| :-------------- | :----- | :----------------------------------------------------------- |
| <R/> `username` | String | Username |
| `password` | String | Password <MiniNote>Passwords will never be logged</MiniNote> |
| `key` | Path | Path to SSH Private Key |
To use SSH key authentication, simply specify the path to the SSH private key with `key:`. If the key is encrypted, set the private key's password to the with the `password:` field, and hyperglass will use it to decrypt the SSH key.
### `ssl`
HTTP devices may optionally use SSL for the connection between hyperglass and the device. This is **disabled** by default, which means devices will use unencrypted HTTP by default.
If SSL is enabled, the public key of the device must be provided in the form of an accessible absolute file path. With SSL enabled and a valid certificate specified, every connection to the device will use HTTPS in addition to payload encoding with [JSON Web Tokens](https://tools.ietf.org/html/rfc7519).
| Parameter | Type | Description |
| :---------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enable` | Boolean | Enable or disable the use of SSL. <MiniNote>If enabled, a certificate file must be specified (hyperglass does not support connecting to a device over an unverified SSL session).</MiniNote> |
| <R/> `cert` | String | Absolute path to agent's public RSA key. |
### `vrfs`
The VRFs section is a list of available VRFs for a given device. Each VRF may be configured with the following fields:
| Parameter | Type | Description |
| :------------- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <R/> `name` | String | The VRF's name, as known **by the device**. <MiniNote>hyperglass sends this field to the device for queries, so it needs to match the device's configuration.</MiniNote> |
| `display_name` | String | The VRF's user-facing name. This field's value is visible in the UI. <MiniNote>If this is not specified, hyperglass will try to create a "pretty" display name based on the `name` field.</MiniNote> |
| `info` | | [Per-VRF Contextual Help Configuration](#info) |
| `ipv4` | | [VRF's IPv4 Configuration](#ipv4) |
| `ipv6` | | [VRF's IPv6 Configuration](#ipv6) |
#### `ipv4`
May be set to `null` to disable IPv4 for this VRF, on the parent device.
| Parameter | Type | Description |
| :-------------------- | :------ | :-------------------------------------------------------------------- |
| <R/> `source_address` | String | Device's source IPv4 address for directed queries (ping, traceroute). |
| `force_cidr` | Boolean | `true` | Convert IP host queries to actual advertised containing prefix length |
| `access_list` | | <Link to="#access_list">IPv4 Access List Configuration</Link> |
#### `ipv6`
May be set to `null` to disable IPv6 for this VRF, on the parent device.
| Parameter | Type | Default | Description |
| :-------------------- | :------ | :------ | :-------------------------------------------------------------------- |
| <R/> `source_address` | String | | Device's source IPv6 address for directed queries (ping, traceroute). |
| `force_cidr` | Boolean | `true` | Convert IP host queries to actual advertised containing prefix length |
| `access_list` | | | [IPv6 Access List Configuration](#access_list) |
:::note
The `force_cidr` option will ensure that a **BGP Route** query for an IP host (/32 IPv4, /128 IPv6) is converted to its containing prefix. For example, a query for `1.1.1.1` would be converted to a query for `1.1.1.0/24`. This is because not all platforms support a BGP lookup for a host (this is primary a problem with IPv6, but the option applies to both address families).
When `force_cidr`is set to `true`, hyperglass will perform a lookup via the [bgp.tools](https://bgp.tools) whois API to get the advertised prefix for an IP host.
:::
#### `access_list`
The `access_list` block can be thought of like a prefix-list from Cisco IOS. It is a list of rules, where the first matching rule is the action executed.
| Parameter | Type | Default | Description |
| :------------- | :------ | :-----------: | :-------------------------------------------------------------------------- |
| <R/> `network` | String | | This rule's IPv4 or IPv6 base prefix |
| `action` | String | `'permit'` | This rule's action. Must be `permit` or `deny` |
| `ge` | Integer | `0` | To match this rule, the target prefix must be greater than or equal to `ge` |
| `le` | Integer | `32` \| `128` | To match this rule, the target prefix must be less than or equal to `le` |
#### `info`
Each VRF may enable, disable, or customize the contextual help menu for each enabled query type. The following parameters may be defined under any query type:
| Parameter | Type | Default | Description |
| :-------- | :------ | :-----: | :-------------------------------------------------------------------------------------------------------------------------- |
| `enable` | Boolean | `true` | Enable or disable the help menu for this command. |
| `file` | String | | Path to a plain text or markdown file containing customized help information for this command. |
| `params` | Object | | Any arbitrary key/value pairs where the value will replace any occurrences of the key when wrapped in braces (e.g. `{key}`) |
For example:
```yaml title="devices.yaml"
routers:
- name: router01
vrfs:
- name: demo_vrf
info:
bgp_route:
enable: true
file: /etc/hyperglass/customer_bgp_route.md
params:
vrf_name: Customer A
ping:
enable: false
bgp_community:
enable: true
file: /etc/hyperglass/customer_bgp_community.md
params:
vrf_name: Customer A
community: "65000"
```
## Telnet
Telnet support is provided via the underlying device connection handling framework, [Netmiko](https://github.com/ktbyers/netmiko). To connect to a device via serial, add the suffix `_telnet` to the device's `nos` value and set the `port` value to `23`.
For example:
```yaml {3-4} title="devices.yaml"
routers:
- name: router01
nos: cisco_ios_telnet
port: 23
...
```
## Full Example
Below is a full example with nearly every available knob turned:
```yaml title="devices.yaml"
routers:
# HTTP/hyperglass-agent device
- name: router01
display_name: HTTP Router
address: 192.0.2.1
network:
name: primary
display_name: AS65000
credential:
username: madeup
password: txeTTIqwhKSJi4V3tefXQASf5AyGZ6cPsycS9nYLpKk
ssl:
enable: true
cert: /etc/hyperglass/certs/router01.pem
port: 8080
nos: frr
vrfs:
- name: default
ipv4:
source_address: 192.0.2.1
access_list:
- network: 10.0.0.0/8
action: deny
ge: 8
le: 32
- network: 0.0.0.0/0
action: permit
le: 24 # Only allow /24 or smaller prefixes
ipv6:
source_address: 2001:db8::1
access_list:
- network: ::/0
action: permit
proxy: null
# SSH/netmiko device
- name: router02
address: 10.0.0.1
network:
name: primary
display_name: AS65000
credential:
username: user
password: pass
display_name: SSH Router
port: 22
nos: cisco_ios
vrfs:
- name: default
ipv4:
source_address: 192.0.2.2
access_list:
- network: 10.0.0.0/8
action: deny
ge: 8
le: 32
- network: 0.0.0.0/0
action: permit
ipv6:
source_address: 2001:db8::2
access_list:
- network: ::/0
action: permit
le: 64 # Only allow /64 or smaller prefixes
- name: special_customer
display_name: Customer Name
ipv4:
source_address: 172.16.0.1
access_list:
- network: 172.16.0.0/16
action: allow
ipv6: null # disable IPv6 for this VRF
info:
bgp_route:
file: /etc/hyperglass/help/customer_bgp_route.md
params:
customer_name: Customer Name
proxy:
name: jump_server
address: 10.0.1.100
port: 22
credential:
username: user
password: pass
nos: linux_ssh
```
## YAML Anchors & Aliases
If you have a lot of devices with shared configuration parameters, you may want to look into **YAML Anchors and Aliases**. If you've never used them before, they can be pretty weird looking at first read. Atlassian [has a pretty decent guide](https://confluence.atlassian.com/bitbucket/yaml-anchors-960154027.html).
Here's an example of using this to share two sets of credentials among multiple devices:
```yaml title="devices.yaml"
my_credentials:
- credential: &credential1
username: madeup1
password: gY018mR4gx4sVqc0
- credential: &credential2
username: madeup2
password: 0eMEJ4ZpB6ofkiIF
routers:
- name: router01
credential: *credential1
- name: router02
credential: *credential2
- name: router03
credential: *credential1
- name: router04
credential: *credential2
```
:::important
Nothing other than the `routers` key is read by hyperglass. In the above example, `my_credentials` is just an arbitrary list of mappings, is completely optional, and can be named whatever you want.
:::
For a more complex example, here's an example of how to use YAML aliases & anchors to share a common VRF configuration among multiple devices, while overriding key variables such as the `source_address` key:
```yaml title="devices.yaml"
my_vrfs:
- &default
name: default
display_name: Global
ipv4:
access_list: &default_ipv4_acl
- network: 10.0.0.0/8
action: deny
- network: 192.168.0.0/16
action: deny
- network: 172.16.0.0/12
action: deny
- network: 0.0.0.0/0
action: permit
ge: 8
le: 24
ipv6:
access_list: &default_ipv6_acl
- network: ::/0
action: permit
ge: 32
le: 64
- &customer_a
name: customer_a
display_name: Customer A
ipv4:
access_list: &customer_a_ipv4_acl
- network: 10.0.0.0/8
action: permit
- network: 0.0.0.0/0
action: deny
ipv6: null
routers:
- name: router01
vrfs:
- <<: *default
ipv4:
source_address: 192.0.2.1
access_list: *default_ipv4_acl
ipv6:
source_address: 2001:db8::1
access_list: *default_ipv6_acl
- <<: *customer_a
ipv4:
source_address: 10.0.0.1
access_list: *customer_a_ipv4_acl
- name: router02
vrfs:
- <<: *default
ipv4:
source_address: 192.0.2.2
access_list: *default_ipv4_acl
ipv6:
source_address: 2001:db8::2
access_list: *default_ipv6_acl
- <<: *customer_a
ipv4:
source_address: 10.0.0.2
access_list: *customer_a_ipv4_acl
```

View file

@ -1,81 +0,0 @@
---
id: installation
title: Linux Agent Installation
sidebar_label: Installation
keywords: [configuration, linux, frr, frrouting, bird, agent]
description: Install hyperglass-agent on your system
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::important In Progress
Documentation for [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is in progress!
:::
## Installation
### Dependencies
On the Linux server running [FRRouting](https://frrouting.org/) or [BIRD](https://bird.network.cz/), make sure Python 3.6+ is installed:
<Tabs
defaultValue="debian"
values={[
{ label: 'Ubuntu', value: 'ubuntu' },
{ label: 'Debian', value: 'debian' },
{ label: 'RHEL/CentOS', value: 'rhel' }]}>
<TabItem value="ubuntu">
```shell-session
$ sudo apt install -y python3.6-dev python3-pip
```
</TabItem>
<TabItem value="debian">
```shell-session
$ sudo apt install -y python3 python3-pip libssl-dev
```
</TabItem>
<TabItem value="rhel">
You can install python from the CentOS 7 repository:
```shell-session
$ sudo yum install python3-devel python3-pip
```
But you can also use the [SCL repository](https://www.softwarecollections.org/en/scls/rhscl/rh-python36/)
```shell-session
$ sudo yum install centos-release-scl
$ sudo yum install rh-python36
```
</TabItem>
</Tabs>
You can then verify your Python 3 version:
```shell-session
$ python3 --version
Python 3.6.9
```
### Application
Now that Python 3.6+ is installed, you can install the hyperglass agent:
```shell-session
$ pip3 install hyperglass-agent
```
:::important More coming soon
Documentation for [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is in progress!
:::

View file

@ -1,64 +0,0 @@
---
id: parameters
title: Agent Configuration Parameters
sidebar_label: Parameters
keywords: [hyperglass, agent, hyperglass-agent, configuration, parameters]
description: hyperglass-agent configuration parameters.
---
import M from "../../src/components/MiniNote";
import PL from "../../src/components/PageLink";
<div class="table--full-width" />
## Configuration File
hyperglass-agent configuration consists of one [YAML](https://yaml.org/) configuration files:
- `config.yaml`
The configuration file may be located in one of the following directories:
- `/etc/hyperglass-agent`
- `~/hyperglass-agent`
## Global Settings
| Parameter | Type | Default | Description |
| :------------------ | :-----: | :------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------- |
| `debug` | Boolean | `false` | Enable application-wide debug mode. **This will generate a log of logs!** |
| `listen_address` | String | `'0.0.0.0'` | Local IPv4/IPv6 Address the hyperglass-agent application listens on to respond to hyperglass queries. |
| `listen_port` | Integer | `8080` or `8443` | Local TCP port the hyperglass-agent application listens on to respond to hyperglass queries. |
| `mode` | String | `'frr'` | FRRouting or BIRD agent mode. |
| `secret` | String | Randomly generated | Password used to sign [JWT](https://jwt.io) tokens. <M>The <code>secret</code> must match the <code>password</code> in hyperglass.</M> |
| `valid_duration` | Integer | `60` | Duration in seconds for which any query is valid. Used as the `exp` claim in the JWT. |
| `not_found_message` | String | `'{target} not found. ({afi})'` | Message returned if the response is empty. `{target}` will be replaced with the `query_target` and `{afi}` will be replaced with the address-family. |
### Subsections
From the top level, the following subsections may be defined and configured:
| Section | Description | All Options |
| :-------- | :------------------------------------- | :-----------------------: |
| `ssl` | Redis server & cache timeout settings. | <PL to="#ssl">➡️</PL> |
| `logging` | API documentation settings. | <PL to="#logging">➡️</PL> |
## SSL
| Parameter | Type | Default | Description |
| :-------- | :------: | :------------------------------ | :----------------------------------------- |
| `enable` | Boolean | `true` | Enable or disable the SSL/HTTPS. |
| `cert` | FilePath | `<install path>/agent_cert.pem` | Valid path to SSL certificate public key. |
| `key` | FilePath | `<install path>/agent_key.pem` | Valid path to SSL certificate private key. |
While you can use your own SSL certificates, hyperglass-agent will generate self-signed certificates for you by default. They will be generated during the [setup process](setup.mdx), or you can run the `hyperglass-agent certificate` command.
## Logging
By default, hyperglass-agent writes all log messages to a log file located at `/tmp/hyperglass-agent.log`. This behavior and other file logging parameters may be overridden if needed:
| Parameter | Type | Default | Description |
| :---------- | :------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `directory` | FilePath | `/tmp/` | Directory at which to write the log file `hyperglass-agent.log`. Use `false` to disable file logging. |
| `format` | String | `'text'` | `'text'` for plain text non-structured logging, `'json'` for JSON structured logging. If JSON is enabled, the log file name will be `hyperglass-agent.log.json` |
| `max_size` | String | `'50MB'` | Maximum log file size before old logs are overwritten. |

View file

@ -1,55 +0,0 @@
---
id: setup
title: Linux Agent Setup
sidebar_label: Setup
keywords: [configuration, linux, frr, frrouting, bird, agent]
description: Configure hyperglass-agent
---
import M from "../../src/components/MiniNote";
:::caution Time & NTP
Before you get too far, check to make sure your hyperglass server and hyperglass-agent system are both properly synchronized with an NTP server. During the setup process and on every interaction, hyperglass and hyperglass-agent exchange [JWT](https://jwt.io/) tokens with a relatively short window (**60 seconds, by default**) in which to validate the payload. If the system clock on either system is askew by too much, this exchange can fail.
:::
## Setup
To automatically create an application directory, generate SSL certificates, generate and symlink a systemd file, and generate a random secret, run:
```shell-session
$ hyperglass-agent setup
```
During the setup process, you'll be prompted to:
- Select an installation directory.<M>Must be <code>/etc/hyperglass-agent</code> or <code>~/hyperglass-agent</code></M>
- Update hyperglass's `devices.yaml` file with a generated secret
- Verify the hostname of the device. <M>The hostname you verify is used to generate the agent's SSL certificate, and needs to be DNS-resolvable by hyperglass.</M>
- Select IP addresses from the device's interfaces that hyperglass would use to communicate with the agent. <M>The IP addresses are added as Subject Alternative Names to the generated SSL certificate, so that you can point hyperglass to the agent by IP address if needed, but still leverage SSL validation.</M>
- Enter the URL of your hyperglass. <M>hyperglass-agent will send the public key of your SSL certificate to hyperglass, so that future communication between hyperglass and hyperglass-agent is authenticated and encrypted.</M>
After these prompts, the agent's SSL public & private keys and a configuration file will be generated and saved to your installation directory. A systemd service file will also be generated, saved to your installation directory, and symlinked to `/etc/systemd/system/hyperglass-agent.service`.
:::note
You can also run the setup wizard with certain options disabled, if needed:
```shell-session
$ hyperglass-agent setup --help
Usage: hyperglass-agent setup [OPTIONS]
Run the setup wizard
Options:
--no-config Don't regenerate config file
--no-certs Don't regenerate certificates
--no-systemd Don't generate a systemd file
--no-send Don't send the SSL certificate to hyperglass
--force Force regeneration of config file
-h, --help Show this message and exit.
```
:::
:::important More coming soon
Documentation for [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is in progress!
:::

View file

@ -1,132 +0,0 @@
---
id: commands
title: Command Customization
sidebar_label: Command Customization
keywords:
[
hyperglass,
commands,
customize,
cisco,
ios,
ios-xe,
ios-xr,
juniper,
junos,
arista,
eos,
huawei,
vrp,
]
description: Custom Commands
---
hyperglass comes with built in support for the following platforms:
- Cisco IOS & IOS-XE
- Cisco IOS-XR
- Juniper JunOS
- Arista EOS
- Huawei VRP
- VyOS
:::warning VyOS & VRFs
As of `vyos-1.3-rolling-202007050117` which is the latest release VyOS has been tested with hyperglass, VyOS does not support BGP or other dynamic routing protocols in a VRF. As such, the default BGP commands for VyOS **omit the VRF from the command**.
:::
Default commands for each of these network operating systems are built into hyperglass. However, you may override any of them or even add commands for another Network Operating System (NOS), as long as it's [supported](platforms).
To define custom commands, add a `commands.yaml` file to your installation directory (`/etc/hyperglass`,
`~/hyperglass`).
Each command definition carries the following structure:
```yaml title="commands.yaml"
command_name:
ipv4_default:
bgp_route: ...
bgp_aspath: ...
bgp_community: ...
ping: ...
traceroute: ...
ipv6_default:
bgp_route: ...
bgp_aspath: ...
bgp_community: ...
ping: ...
traceroute: ...
ipv4_vpn:
bgp_route: ...
bgp_aspath: ...
bgp_community: ...
ping: ...
traceroute: ...
ipv6_vpn:
bgp_route: ...
bgp_aspath: ...
bgp_community: ...
ping: ...
traceroute: ...
```
`ipv4_default` and `ipv6_default` reference the commands used in the default routing table/VRF, while `ipv4_vpn` and `ipv6_vpn` reference the commands used in **any** configured VRF. Every command will have the following keywords replaced:
| Keyword | Description |
| :--------- | :--------------------------------------------------------------- |
| `{target}` | Query Target (IP address, community, AS Path). |
| `{vrf}` | If it's a VRF query, the [name of the VRF](adding-devices#vrfs). |
## Overriding Built-In Commands
As an example, you could override the default Juniper `bgp_route` command for the default routing table like this:
```yaml {4} title="commands.yaml"
---
juniper:
ipv4_default:
bgp_route: "show route protocol bgp {target} terse"
```
If the NOS key (`juniper`, in this case) matches the [supported platform key](platforms), only the command you specify will be overridden.
## Adding a Custom Command Set
You can define any arbitrary set of commands to use for any supported device. When defining a custom command, **you must define _all_ commands**, even if they're disabled in your [configuration](query-settings) or otherwise unused.
```yaml title="commands.yaml"
---
special_commands:
ipv4_default:
bgp_route: "show ip route {target}"
bgp_aspath: "show ip bgp as-path {target}"
bgp_community: "show ip bgp community {target}"
ping: "ping {target}"
traceroute: "traceroute {target}"
ipv6_default:
bgp_route: "show ipv6 route {target}"
bgp_aspath: "show ipv6 bgp as-path {target}"
bgp_community: "show ipv6 bgp community {target}"
ping: "ping6 {target}"
traceroute: "traceroute6 {target}"
ipv4_vpn:
bgp_route: "show ip route {target} vrf {vrf}"
bgp_aspath: "show ip bgp as-path {target} vrf {vrf}"
bgp_community: "show ip bgp community {target} vrf {vrf}"
ping: "ping {target} vrf {vrf}"
traceroute: "traceroute {target} vrf {vrf}"
ipv6_vpn:
bgp_route: "show ipv6 route {target} vrf {vrf}"
bgp_aspath: "show ipv6 bgp as-path {target} vrf {vrf}"
bgp_community: "show ipv6 bgp community {target} vrf {vrf}"
ping: "ping6 {target} vrf {vrf}"
traceroute: "traceroute6 {target} vrf {vrf}"
```
After adding the custom command to `commands.yaml`, reference its name under the device's `commands:` key in `devices.yaml`:
```yaml {4} title="devices.yaml"
---
routers:
- name: specialrouter01
commands: special_commands
```

View file

@ -1,139 +0,0 @@
---
id: getting-started
title: Getting Started
sidebar_label: Getting Started
keywords: [install, configuration]
description: Getting started with hyperglass
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
## Automatic installation
If your system runs on:
- Ubuntu Linux
- ~~CentOS/Red Had Linux~~
- macOS (requires [homebrew](https://brew.sh))
You should be able to proceed with the automatic installation:
```shell-session
$ curl https://install.hyperglass.io | sudo bash
```
:::caution Piping to bash
You should be <i>very</i> worried when someone asks you to do what I just did. Downloading a bash script from the internet and piping it to `bash` with root privileges is a terrible idea, unless you fully trust the source. Please don't trust me - go [look at the code](https://github.com/checktheroads/hyperglass/blob/v1.0.0/install.sh) and determine for your self if it's safe to execute. If you feel it's not, please proceed with the manual installation (and [tell me why](https://github.com/checktheroads/hyperglass/issues), so I can fix it).
:::
## Manual Installation
### System Dependencies
#### Python
hyperglass is written in Python 3 and requires Python version 3.6 as a minimum dependency.
If you're confident upgrading your system's version of Python won't break your system (many Linux operating systems rely heavily on Python for package management and other system functions), you can install Python 3.6:
<Tabs
defaultValue="debian"
values={[
{ label: 'Debian/Ubuntu', value: 'debian' },
{ label: 'RHEL/CentOS', value: 'rhel' }]}>
<TabItem value="debian">
```shell-session
$ sudo apt install -y python3.6-dev python3-pip
```
</TabItem>
<TabItem value="rhel">
Documentation for CentOS is still in-progress. However, it's been determined that these dependencies _may_ also be required, depending on the version of CentOS:
```shell-session
$ sudo yum install libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel \
freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \
harfbuzz-devel fribidi-devel libraqm-devel libimagequant-devel \
libxcb-devel ncurses-devel
```
Until further testing with CentOS can be done, you should install the above dependencies _before_ installing Python 3. You may have to uninstall and re-install Python 3 if these dependencies weren't already installed.
You can install python from the CentOS 7 repository:
```shell-session
$ sudo yum install python3-devel python3-pip
```
But you can also use the [SCL repository](https://www.softwarecollections.org/en/scls/rhscl/rh-python36/)
```shell-session
$ sudo yum install centos-release-scl
$ sudo yum install rh-python36
```
</TabItem>
</Tabs>
You can then verify your Python 3 version:
```shell-session
$ python3 --version
Python 3.6.9
```
#### Other Dependencies
The hyperglass UI is written in [ReactJS](https://reactjs.org/). As such, some Javascript dependencies are required. hyperglass also relies on [Redis](https://redis.io/) for caching purposes.
<Tabs
defaultValue="debian"
values={[
{ label: 'Debian/Ubuntu', value: 'debian' },
{ label: 'RHEL/CentOS', value: 'rhel' }]}>
<TabItem value="debian">
```shell-session
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt update
$ sudo apt install -y nodejs yarn redis-server
$ sudo systemctl enable redis-server
$ sudo systemctl restart redis-server
```
</TabItem>
<TabItem value="rhel">
```shell-session
$ curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
$ curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
$ sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
$ sudo yum -y install gcc-c++ make nodejs yarn redis
$ sudo systemctl enable redis
$ sudo systemctl restart redis
```
</TabItem>
</Tabs>
### Application
```shell-session
$ pip3 install hyperglass
```

View file

@ -1,53 +0,0 @@
---
id: introduction
title: Introduction
sidebar_label: Introduction
description: Welcome to hyperglass
---
import Link from "@docusaurus/Link";
import useBaseUrl from "@docusaurus/useBaseUrl";
import classnames from "classnames";
import styles from "./styles.module.css";
## What is hyperglass?
**hyperglass** is an open source network looking glass written by a network engineer for other network engineers. The purpose of a looking glass is to provide customers, peers, and complete strangers with unattended visibility into the an operator's network.
hyperglass was created with the lofty goal of benefiting the internet community at-large by providing a faster, easier, and more secure way for operators to provide looking glass services to their customers, peers, and other network operators.
## Features
- BGP Route, BGP Community, BGP AS Path, Ping, & Traceroute
- Full IPv6 support
- Customizable everything: features, theme, UI/API text, error messages, commands
- Built in support for:
- Arista EOS
- BIRD
- Cisco IOS-XR
- Cisco IOS/IOS-XE
- Cisco NX-OS
- FRRouting
- Huawei
- Juniper JunOS
- Mikrotik
- TNSR
- VyOS
- Configurable support for any other [supported platform](platforms.mdx)
- Optionally access devices via an SSH proxy/jump server
- VRF support
- Access List/prefix-list style query control to whitelist or blacklist query targets on a per-VRF basis
- REST API with automatic, configurable OpenAPI documentation
- Modern, responsive UI built on [ReactJS](https://reactjs.org/), with [NextJS](https://nextjs.org/) & [Chakra UI](https://chakra-ui.com/)
- Query multiple devices simultaneously
- Browser-based DNS-over-HTTPS resolution of FQDN queries
<Link
className={classnames(
"button button--outline button--secondary button--lg",
styles.getStarted
)}
to={useBaseUrl("docs/getting-started")}
>
Get Started
</Link>

View file

@ -1,30 +0,0 @@
---
id: license
title: License
sidebar_label: License
keywords: [hyperglass, license, open source]
description: hyperglass License
---
import Datetime from "../src/components/Datetime";
import styles from "./styles.module.css";
### The Clear BSD License
Copyright © <Datetime className={styles.year} year/> Matthew Love
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,124 +0,0 @@
---
id: logging
title: Logging & Webhooks
sidebar_label: Logging & Webhooks
keywords: [hyperglass, logging, webhook, hooks, syslog]
description: hyperglass Logging
---
hyperglass supports multiple types of logging, for both application troubleshooting and general reporting.
<div class="table--full-width" />
## File Logging
By default, hyperglass writes all log messages to a log file located at `/tmp/hyperglass.log`. This behavior and other file logging parameters may be overridden if needed:
| Parameter | Type | Default | Description |
| :---------- | :----: | :------- | :------------------------------------------------- |
| `directory` | String | `'/tmp'` | Valid directory where the log file can be written. |
| `format` | String | `'text'` | Log format - may be either `'text'` or `'json'`. |
| `max_size` | String | `'50MB'` | Maximum log file size before logs are rotated. |
The `logging` subsection contains additional subsections of its own for configuring other logging methods:
| Section | Description | All Options |
| :------- | :-------------------- | :------------------------------------: |
| `syslog` | Syslog settings | <PageLink to="#syslog">➡️</PageLink> |
| `http` | HTTP webhook settings | <PageLink to="#webhooks">➡️</PageLink> |
:::note
You do not have to set `enable: false` to disable syslogging or webhooks - if there is no configuration under the `syslog` or `http` subsections, it the option is disabled by default. The `enable` option exists for easy toggling without having to delete the other settings.
:::
## Syslog
If syslogging is enabled, all of the same log messages written to the file and/or stdout will be forwarded to the syslog server.
| Parameter | Type | Default | Description |
| :-------- | :-----: | :------ | :------------------------------------------------ |
| `enable` | Boolean | `true` | Optionally disable syslogging even if configured. |
| `host` | String | | Syslog target IP address or hostname. |
| `port` | Integer | `514` | Syslog target UDP port number. |
## Webhooks
If http logging is enabled, an HTTP POST will be sent to the configured target every time a query is submitted, _after_ it is validated.
| Parameter | Type | Default | Description |
| :----------- | :-----: | :---------- | :-------------------------------------------------------------------------------------------------------- |
| `enable` | Boolean | `true` | Optionally disable webhooks even if configured. |
| `host` | String | | HTTP URL to webhook target. |
| `headers` | Mapping | | Any arbitrary mappings, which will be sent as HTTP headers. |
| `params` | Mapping | | Any arbitrary mappings, which will be sent as URL parameters (e.g. `http://example.com/log?param=value`). |
| `verify_ssl` | Boolean | `true` | Verify SSL certificate of target. |
| `timeout` | Integer | `5` | Time in seconds before request times out. |
| `provider` | String | `'generic'` | Webhook provider. |
### Supported Providers
| Provider | Parameter Value |
| :--------------------------------------------------------------------------------------------------- | --------------: |
| Generic | `'generic'` |
| [Microsoft Teams](https://www.microsoft.com/en-us/microsoft-365/microsoft-teams/group-chat-software) | `'msteams'` |
| [Slack](https://slack.com/) | `'slack'` |
### Authentication
Basic and API key authentication are supported.
| Parameter | Type | Default | Description |
| :--------- | :----: | :-------- | :------------------------------------------------------------------------ |
| `mode` | String | `'basic'` | Authentication mode. Must be `'basic'` or `'api_key'` |
| `username` | String | | Username for basic authentication. |
| `password` | String | | Password for basic authentication, or API Key for API key authentication. |
:::important
If `api_key` is used, the header `X-API-Key: {key}` is added to the request, where `{key}` is the password.
:::
### Webhook Data Structure
If the `provider` field is set to `'generic'`, the webhook will POST JSON data in the following format:
```json
{
"query_location": "router01",
"query_type": "bgp_route",
"query_vrf": "default",
"query_target": "1.1.1.0/24",
"headers": {
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36",
"referer": "http://lg.example.com/",
"accept-encoding": "gzip, deflate, br",
"accept-language": "en-US,en;q=0.9,fr;q=0.8,lb;q=0.7,la;q=0.6"
},
"source": "192.0.2.1",
"network": {
"prefix": "192.0.2.0/24",
"asns": ["64496"]
}
}
```
## Full example
```yaml title="hyperglass.yaml"
logging:
directory: /var/log
format: json
max_size: 10 MB
syslog:
host: syslog.example.com
http:
host: "https://example.com/logs"
authentication:
mode: basic
username: your username
password: your password
headers:
X-Special-Header: your header value
params:
app: hyperglass # URL would be https://example.com/logs?app=hyperglass
verify_ssl: false
```

View file

@ -1,53 +0,0 @@
---
id: messages
title: Messages
sidebar_label: Messages
keywords: [configuration, messages, text, ui, customization]
description: hyperglass messages configuration
---
import Link from "@docusaurus/Link";
import Code from "../src/components/JSXCode";
All user-facing status messages can be customized if needed.
<div class="table--full-width" />
| Parameter | Type | Default | Description |
| :--------------------- | :----: | :-------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `acl_denied` | String | `'"{target} is a member of {denied_network}, which is not allowed."'` | Displayed when a query target is explicitly denied by a matched VRF's ACL entry. `{target}` and `{denied_network}` will be replaced with the denied query target and the ACL entry that caused it to be denied. |
| `acl_not_allowed` | String | `'{target} is not allowed.'` | Displayed when a query target is implicitly denied by a matched VRF's ACL. `{target}` will be replaced with the denied query target. |
| `authentication_error` | String | `'Authentication error occurred.'` | Displayed when hyperglass is unable to authenticate to a configured device. Usually, this indicates a configuration error. `{device_name}` and `{error}` will be replaced with the device in question and the specific connection error. |
| `connection_error` | String | `'Error connecting to {device_name}: {error}'` | Displayed when hyperglass is unable to connect to a configured device. Usually, this indicates a configuration error. `{device_name}` and `{error}` will be replaced with the device in question and the specific connection error. |
| `feature_not_enabled` | String | `'{feature} is not enabled for {device_name}.'` | Displayed when a query type is submitted that is not supported or disabled. The UI performs validation of supported query types prior to submitting any requests, so this is primarily relevant to the hyperglass API. `{feature}` and `{device_name}` will be replaced with the disabled feature and the selected device/location. |
| `general` | String | `'Something went wrong.'` | Displayed when generalized errors occur. Seeing this error message may indicate a bug in hyperglass, as most other errors produced are highly contextual. If you see this in the wild, try enabling <Link to="/docs/configuration#global-settings"><Code>debug</Code></Link> mode and review the logs to pinpoint the source of the error. |
| `invalid_field` | String | `'{input} is an invalid {field}.'` | Displayed when a query field contains an invalid or unsupported value. `{input}` and `{field}` will be replaced with the invalid input value and corresponding field name. |
| `invalid_input` | String | `'{target} is not a valid {query_type} target.'` | Displayed when a query target's value is invalid in relation to the corresponding query type. `{target}` and `{query_type}` will be replaced with the invalid target and corresponding query type. |
| `no_input` | String | `'{field} must be specified.'` | Displayed when no a required field is not specified. `{field}` will be replaced with the `display_name` of the field that was omitted. |
| `no_output` | String | `'The query completed, but no matching results were found.'` | Displayed when hyperglass can connect to a device and execute a query, but the response is empty. |
| `no_response` | String | `'No response.'` | Displayed when hyperglass can connect to a device, but no output is able to be read. Seeing this error may indicate a bug in hyperglass or one of its dependencies. If you see this in the wild, try enabling <Link to="/docs/configuration#global-settings"><Code>debug</Code></Link> mode and review the logs to pinpoint the source of the error. |
| `parsing_error` | String | `'An error occurred while parsing the query output.'` | Displayed when hyperglass can connect to a device and execute a query, but the response cannot be parsed. |
| `request_timeout` | String | `'Request timed out.'` | Displayed when the <Link to="/docs/configuration#global-settings"><Code>request_timeout</Code></Link> time expires. |
| `vrf_not_associated` | String | `'VRF {vrf_name} is not associated with {device_name}.'` | Displayed when a query request's VRF field value contains a VRF that is not configured or associated with the corresponding location/device. The UI automatically filters out VRFs that are not configured on a selected device, so this error is most likely to appear when using the hyperglass API. `{vrf_name}` and `{device_name}` will be replaced with the VRF in question and corresponding device. |
| `vrf_not_found` | String | `'VRF {vrf_name} is not defined.'` | Displayed when a query VRF is not configured on any devices. The UI only shows configured VRFs, so this error is most likely to appear when using the hyperglass API. `{vrf_name}` will be replaced with the VRF in question. |
## Example
```yaml title="hyperglass.yaml"
messages:
acl_denied: "{target} is a member of {denied_network}, which is not allowed."
acl_not_allowed: "{target} is not allowed."
authentication_error: Authentication error occurred.
connection_error: "Error connecting to {device_name}: {error}"
feature_not_enabled: "{feature} is not enabled for {device_name}."
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.
no_response: No response.
parsing_error: An error occurred while parsing the query output.
request_timeout: Request timed out.
vrf_not_associated: VRF {vrf_name} is not associated with {device_name}.
vrf_not_found: VRF {vrf_name} is not defined.
```

View file

@ -1,90 +0,0 @@
---
id: parameters
title: Configuration Parameters
sidebar_label: Parameters
keywords: [hyperglass, configuration, parameters]
description: hyperglass configuration parameters.
---
import MiniNote from "../src/components/MiniNote";
import PageLink from "../src/components/PageLink";
hyperglass is meant to be _extremely_ customizable, but with reasonable defaults that most operators won't need to override. Even though there are a _lot_ of configuration options, all of them can be left untouched and hyperglass will work (although, it's recommended to at least set the organization name).
:::tip Validation
On the back end, hyperglass uses strict configuration schema validation, so it's virtually impossible to configure hyperglass incorrectly without receiving a contextual warning about what's missing or incorrect about a configuration.
:::
## Configuration Files
hyperglass configuration consists of three separate [YAML](https://yaml.org/) configuration files:
- `hyperglass.yaml`
- Defines configuration parameters for the application and UI
<MiniNote>This file is not required for hyperglass to run</MiniNote>
- `devices.yaml`
- Defines devices (routers), SSH proxy servers, and credentials
<MiniNote>
This file <strong>is required</strong> for hyperglass to run
</MiniNote>
- `commands.yaml`
- Defines commands for custom network operating systems, or overrides default hyperglass command sets.
<MiniNote>This file is not required for hyperglass to run</MiniNote>
Configuration files may be located in one of the following directories:
- `/etc/hyperglass`
- `~/hyperglass`
## Global Settings
The following global settings can be set in `hyperglass.yaml`:
| Parameter | Type | Default | Description |
| :--------------------- | :--------------: | :----------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `debug` | Boolean | `false` | Enable application-wide debug mode. **This will generate a lot of logs!** |
| `developer_mode` | Boolean | `false` | If enabled, the hyperglass backend (Python) and frontend (React/Javascript) applications are "unlinked", so that React tools can be used for front end development. A `<Debugger />` convenience component is also displayed in the UI for easier UI development.' |
| `primary_asn` | String | `'65000'` | Your network's primary ASN. This field is used to set some useful defaults such as the subtitle and PeeringDB URL. |
| `org_name` | String | `'Beloved Hyperglass User'` | Your organization's name. This field is used in the UI & API documentation to set fields such as `<meta/>` HTML tags for SEO and the terms & conditions footer component. |
| `site_title` | String | `'hyperglass'` | The name of your hyperglass site. This field is used in the UI & API documentation to set fields such as the `<title/>` HTML tag, and the terms & conditions footer component. |
| `site_description` | String | `'{org_name} Network Looking Glass'` | A short description of your hyperglass site. This field is used in th UI & API documentation to set the `<meta name="description"/>` tag. `{org_name}` may be used to insert the value of the `org_name` field. |
| `site_keywords` | List | | Keywords pertaining to your hyperglass site. This field is used to generate `<meta name="keywords"/>` HTML tags, which helps tremendously with [SEO](https://support.google.com/webmasters/answer/7451184). |
| `request_timeout` | Integer | `90` | Global timeout in seconds for all requests. The UI uses this field's exact value when submitting queries. The backend uses this field's value, minus one second, for its own timeout handling. This is to ensure a contextual timeout error is presented to the end user in the event of a backend application timeout. |
| `listen_address` | String | `'localhost'` | Local IPv4/IPv6 Address the hyperglass application listens on to serve web traffic. |
| `listen_port` | Integer | `8001` | Local TCP port the hyperglass application listens on to serve web traffic. |
| `cors_origins` | List | `[]` | Allowed [CORS](https://developer.mozilla.org/docs/Web/HTTP/CORS) hosts. By default, no CORS hosts are allowed. |
| `netmiko_delay_factor` | Integer \| Float | `0.1` | Override the [Netmiko global delay factor](https://ktbyers.github.io/netmiko/docs/netmiko/index.html). |
:::note
The `netmiko_delay_factor` parameter should only be used if you're experiencing strange SSH connection issues. By default, Netmiko uses a `global_delay_factor` of `1`, which tends to be a bit slow for running a simple show command. hyperglass overrides this to `0.1` by default, but you can override this to whatever value suits your environment if needed.
:::
### Subsections
From the top level, the following subsections may be defined and configured:
| Section | Description | All Options |
| :----------- | :-------------------------------------------------- | :-------------------------------------------: |
| `cache` | Redis server & cache timeout settings. | <PageLink to="response-caching">➡️</PageLink> |
| `docs` | API documentation settings. | <PageLink to="rest-api">➡️</PageLink> |
| `logging` | File, syslog, and webhook settings. | <PageLink to="logging">➡️</PageLink> |
| `messages` | Customize almost all user-facing UI & API messages. | <PageLink to="messages">➡️</PageLink> |
| `queries` | Enable, disable, or configure query types. | <PageLink to="query-settings">➡️</PageLink> |
| `structured` | Configure structured data features. | <PageLink to="table-output">➡️</PageLink> |
| `web` | Web UI & branding settings. | <PageLink to="ui/configuration">➡️</PageLink> |
### Example
```yaml title="hyperglass.yaml"
debug: false
developer_mode: false
org_name: Beloved Hyperglass User
site_title: hyperglass
site_description: "{org_name} Network Looking Glass"
site_keywords: [hyperglass, looking glass, routing, bgp]
request_timeout: 30
listen_address: "127.0.0.1"
listen_port: 8001
log_file: /tmp/hyperglass.log
cors_origins: [lg.example.com, 192.0.2.1]
```

View file

@ -1,99 +0,0 @@
---
id: platforms
title: Supported Platforms
sidebar_label: Supported Platforms
description: Platforms supported by hyperglass
---
## HTTP
<div class="table--full-width" />
The following platforms use [hyperglass-agent](agent/installation.mdx) for connection handling. When configuring the `nos` property of a device, use the value in the **Key** column.
| Name | Key |
| --------- | ------ |
| BIRD | `bird` |
| FRRouting | `frr` |
## SSH
The following platforms use [Netmiko](https://github.com/ktbyers/netmiko) or [Scrapli](https://github.com/carlmontanari/scrapli) for connection handling. When configuring the `nos` property of a device, use the value in the **Key** column.
| Name | Key |
| ------------------------- | --------------------- |
| A10 | `a10` |
| Accedian | `accedian` |
| Alcatel AOS | `alcatel_aos` |
| Alcatel SROS | `alcatel_sros` |
| Apresia Systems AEOS | `apresia_aeos` |
| Arista vEOS | `arista_eos` |
| Aruba | `aruba_os` |
| Avaya ERS | `avaya_ers` |
| Avaya VSP | `avaya_vsp` |
| Calix B6 | `calix_b6` |
| Check Point GAiA | `checkpoint_gaia` |
| Ciena SAOS | `ciena_saos` |
| Cisco ASA | `cisco_asa` |
| Cisco IOS | `cisco_ios` |
| Cisco NX-OS | `cisco_nxos` |
| Cisco SG-300 | `cisco_s300` |
| Cisco IOS-XE | `cisco_xe` |
| Cisco IOS-XR | `cisco_xr` |
| Citrix Netscaler | `netscaler` |
| CloudGenix ION | `cloudgenix_ion` |
| Coriant | `coriant` |
| Dell OS6 | `dell_os6` |
| Dell OS9 | `dell_os9` |
| Dell OS10 | `dell_os10` |
| Dell PowerConnect | `dell_powerconnect` |
| Endace | `endace` |
| Eltex | `eltex` |
| Eltex ESR | `eltex_esr` |
| Enterasys | `enterasys` |
| Extreme | `extreme` |
| Extreme ERS | `extreme_ers` |
| Extreme EXOS | `extreme_exos` |
| Extreme/Brocade NetIron | `extreme_netiron` |
| Extreme NOS | `extreme_nos` |
| Extreme/Brocade SLX | `extreme_slx` |
| Extreme/Brocade VDX | `extreme_vdx` |
| Extreme VSP | `extreme_vsp` |
| Extreme Wing | `extreme_wing` |
| F5 LTM | `f5_ltm` |
| F5 TMSH | `f5_tmsh` |
| F5 Linux | `f5_linux` |
| Flex VNF | `flexvnf` |
| Fortinet | `fortinet` |
| Generic Terminal Server | `generic_termserver` |
| HPE/3COM Comware | `hp_comware` |
| HPE ProCurve | `hp_procurve` |
| Huawei | `huawei` |
| Huawei VRPv8 | `huawei_vrpv8` |
| IPInfusion OcNOS | `ipinfusion_ocnos` |
| Juniper | `juniper` |
| Juniper JunOS | `juniper_junos` |
| Juniper ScreenOS | `juniper_screenos` |
| Keymile | `keymile` |
| Keymile NOS | `keymile_nos` |
| Linux | `linux` |
| Mikrotik RouterOS | `mikrotik_routeros` |
| Mikrotik SwitchOS | `mikrotik_switchos` |
| Mellanox | `mellanox` |
| Mellanox MLNX-OS | `mellanox_mlnxos` |
| MRV LX | `mrv_lx` |
| MRV Optiswitch | `mrv_optiswitch` |
| Nokia SROS | `nokia_sros` |
| OneAccess OneOS | `oneaccess_oneos` |
| OVS Linux | `ovs_linux` |
| Palo Alto Networks PAN-OS | `paloalto_panos` |
| Pluribus | `pluribus` |
| Quanta Mesh | `quanta_mesh` |
| RAD ETX | `rad_etx` |
| Ruckus/Brocade FastIron | `ruckus_fastiron` |
| Ruijie OS | `ruijie_os` |
| TNSR | `tnsr` |
| Ubuiquiti EdgeRouter | `ubiquiti_edge` |
| Ubuiquiti EdgeSwitch | `ubiquiti_edgeswitch` |
| Vyatta VyOS | `vyatta_vyos` |
| VyOS | `vyos` |

View file

@ -1,119 +0,0 @@
---
id: production
title: Production
sidebar_label: Production
description: Running hyperglass in production
---
## System Requirements
### CPU
In order to function properly in a production environment, hyperglass leverages [Gunicorn](https://gunicorn.org/) as an application-layer HTTP server. You don't really need to know anything about Gunicorn to use hyperglass, but there is one important factor: each Gunicorn "worker" (a process, or thread, in essence) directly maps to the number of CPU cores on your hyperglass system. Per the [Gunicorn docs](https://docs.gunicorn.org/en/latest/settings.html#workers), hyperglass uses the conservative value of 2x workers per CPU core.
To determine the number of CPU cores on the system, Python's [multiprocessing](https://docs.python.org/3/library/multiprocessing.html) library, and the number of cores returned _does_ factor in hyperthreading. For example, if your system has 4 cores provisioned, and the processors support hyperthreading, hyperglass will see this as 8 cores, and will provision 2 workers per core, for a final result of 16 workers.
#### Why does this matter?
While hyperglass is, to the extent possible, fully [asynchronous](https://docs.python.org/3/library/asyncio.html) (which means tasks may be run while waiting on other tasks to complete), this asynchronism is currently only applicable to **each request**. This means that with a single worker process, while one request is being processed, a second request must wait until the first request completes. If the first request is long-running for whatever reason, the second request may time out (this also applies to running multiple queries at the same time, in the same session).
To combat this, hyperglass uses the above worker strategy. **Ultimately, it's important to provision the appropriate number of CPU cores, corresponding to the number of concurrent sessions you might expect to have in your environment** (keeping in mind that if your system supports hyperthreading, each core equates to two workers).
:::note
When [debug](configuration.mdx#global-settings) is set to `true`, the number of workers is set to 1.
:::
### Memory
Testing shows that hyperglass is extremely memory efficient at runtime. For example, running 4 simulations BGP Route queries, with two devices utilizing [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent), and two devices utilizing SSH, the server increased RAM utilization by about 20MB during execution, and went back down afterwards.
However, at build time, there are some fairly memory-intensive tasks which _will_ time out or cause strange errors without the proper amount of RAM. Testing suggests **2GB of RAM is sufficient**, however **4GB is the ideal minimum amount of RAM**.
### Storage
At **build**, hyperglass consumes approximately **196 MB** of storage. 194 MB of this is front-end dependencies, which are downloaded and installed when running a UI build. The other 2 MB is the hyperglass code itself. Once again, the minimum system requirements for most Linux distributions should be sufficient.
## Reverse Proxy
You'll want to run hyperglass behind a reverse proxy in production to serve the static files more efficiently and offload SSL. Any reverse proxy should work, but hyperglass has been specifically tested with [Caddy](https://caddyserver.com/) and [NGINX](https://www.nginx.com/). Sample configs for both can be found below.
### Caddy
The following file can be placed anywhere, and referenced at runtime with `sudo caddy run -config <file name>`. The highlighted lines should be replaced with your installation's specific variables.
```text {1,2,4,5,8,11} title="Caddy"
lg.example.com:443 {
tls person@example.com
file_server {
root /etc/hyperglass/static/ui
index /etc/hyperglass/static/ui/index.html
}
file_server /custom {
root /etc/hyperglass/static/custom
}
file_server /images {
root /etc/hyperglass/static/images
}
reverse_proxy localhost:8001
}
```
:::tip
The `tls` directive will tell Caddy to automatically use Let's Encrypt to generate SSL certificates for hyperglass.
:::
### NGINX
The following file can be placed at `/etc/nginx/sites-enabled/hyperglass`. It supports IPv6, and will automatically redirect to HTTPS. The highlighted lines should be replaced with your installation's specific variables.
```nginx {4,9,10,17,19} title="NGINX"
server {
listen 80;
listen [::]:80;
server_name lg.example.com;
return 301 https://$host$request_uri;
}
server {
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate <path to cert chain>
ssl_certificate_key <path to key>
client_max_body_size 2M;
server_name lg.example.com;
root /etc/hyperglass/static;
location / {
try_files $uri $uri/ /ui /ui/$uri =404;
index /ui/index.html;
}
location /openapi.json {
try_files $uri @proxy_to_app;
}
location /custom/ {
try_files $uri $uri/ /custom;
}
location /images/ {
try_files $uri $uri/ /images;
}
location /api {
try_files $uri @proxy_to_app;
}
location @proxy_to_app {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://[::1]:8001;
}
}
```

View file

@ -1,162 +0,0 @@
---
id: query-settings
title: Query Settings
sidebar_label: Query Settings
keywords: [hyperglass, queries]
description: hyperglass query types
---
import Code from "../src/components/JSXCode";
import MiniNote from "../src/components/MiniNote";
import RP from "../src/components/RegexPattern";
<div class="table--full-width" />
Each query type may be disabled, enabled, or customized. The `display_name` parameter defines how the query type will be displayed in the UI's Query Type select element.
## `bgp_route`
| Parameter | Type | Default | Description |
| :------------- | :-----: | :------------ | :----------------------------------------------------- |
| `enable` | Boolean | `true` | Enable or disable the BGP Route query type. |
| `display_name` | String | `'BGP Route'` | Text displayed for the BGP Route query type in the UI. |
#### Example
<!-- prettier-ignore -->
```yaml title="hyperglass.yaml"
queries:
bgp_route:
display_name: BGP Route
enable: true
```
## `bgp_community`
| Parameter | Type | Default | Description |
| :------------- | :-----: | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enable` | Boolean | `true` | Enable or disable the BGP Community query type. |
| `display_name` | String | `'BGP Community'` | Text displayed for the BGP Community query type in the UI. |
| `mode` | String | `'input'` | `input` mode requires the user to type the community value in the target element. `select` mode allows the user to select a community from a preconfigured list of communities. |
| `communities` | | | [BGP Community Definitions](#community-definitions) for `select` mode. |
| `pattern` | | | [BGP Community Regular Expression Patterns](#community-patterns) for `input` mode. |
### Community Definitions
If using `select` mode, you may define a list of communities the users can choose from. Each community definition uses the following schema:
| Parameter | Type | Description | Example |
| :------------- | :----: | :--------------------- | :----------------------- |
| `community` | String | Community value | `'64496:1001'` |
| `display_name` | String | Community display name | `'64496:1001'` |
| `description` | String | Community description | `'North America Routes'` |
#### Example
```yaml title="hyperglass.yaml"
queries:
bgp_community:
enable: true
mode: select
communities:
- community: 64496:1001
display_name: 64496:1001
description: North America Routes
- community: 64496:1002
display_name: 64496:1002
description: Europe Routes
```
### Community Patterns
If using `input` mode, hyperglass allows you to override the default regular expression patterns used to validate UI and API queries. hyperglass supports [Decimal (well known)](https://tools.ietf.org/html/rfc1997) communities, [Extended AS](https://tools.ietf.org/html/rfc4360) communities, and [Large](https://tools.ietf.org/html/rfc8092) communities.
| Parameter | Type | Default | Description |
| :------------ | :----: | :--------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- |
| `decimal` | String | <RP pattern="community_decimal"/> | Regular expression pattern for validating decimal type BGP Community strings. |
| `extended_as` | String | <RP pattern="community_extended"/> | Regular expression pattern for validating extended AS type BGP Community strings, e.g. `65000:1` |
| `large` | String | <RP pattern="community_large"/> | Regular expression pattern for validating [large community](http://largebgpcommunities.net/) strings, e.g. `65000:65001:65002` |
#### Example
<!-- prettier-ignore -->
```yaml title="hyperglass.yaml"
queries:
bgp_community:
enable: true
mode: input
pattern:
decimal: '^[0-9]{1,10}$'
extended_as: '^([0-9]{0,5})\:([0-9]{1,5})$'
large: '^([0-9]{1,10})\:([0-9]{1,10})\:[0-9]{1,10}$'
```
:::caution
Regular expression patterns must be enclosed in single quotes, e.g. `'^.*$'`
:::
## `bgp_aspath`
| Parameter | Type | Default | Description |
| :------------- | :-----: | :-------------- | :---------------------------------------------------------------------- |
| `enable` | Boolean | `true` | Enable or disable the BGP AS Path query type. |
| `display_name` | String | `'BGP AS Path'` | Text displayed for the BGP AS Path query type in the UI. |
| `pattern` | | | [BGP AS Path Settings & Regular Expression Patterns](#as-path-patterns) |
#### Example
<!-- prettier-ignore -->
```yaml title="hyperglass.yaml"
queries:
bgp_aspath:
display_name: BGP AS Path
enable: true
pattern:
asdot: '^(\^|^\_)((\d+\.\d+)\_|(\d+\.\d+)\$|(\d+\.\d+)\(\_\.\+\_\))+$'
asplain: '^(\^|^\_)(\d+\_|\d+\$|\d+\(\_\.\+\_\))+$'
mode: asplain
```
### AS Path Patterns
AS Path regular expression patterns may also be customized, should you wish to more granularly control what your network considers a valid AS Path pattern. hyperglass makes two "modes" available for validation - [**`asplain`** and **`asdot`**](https://tools.ietf.org/html/rfc5396).
| Parameter | Type | Default | Description |
| :-------- | :----: | :----------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode` | String | `'asplain'` | Set ASN display mode. This field is dependent on how your network devices are configured. <MiniNote>Must be <Code>asplain</Code> or <Code>asdot</Code></MiniNote> |
| `asplain` | String | <RP pattern="aspath_asplain"/> | Regular expression pattern for validating **asplain** type BGP AS Path queries. |
| `asdot` | String | <RP pattern="aspath_asdot"/> | Regular expression pattern for validating **asdot** type BGP AS Path queries. |
## `ping`
| Parameter | Type | Default | Description |
| :------------- | :-----: | :------- | :------------------------------------------------ |
| `enable` | Boolean | `true` | Enable or disable the Ping query type. |
| `display_name` | String | `'Ping'` | Text displayed for the Ping query type in the UI. |
#### Example
<!-- prettier-ignore -->
```yaml title="hyperglass.yaml"
queries:
ping:
display_name: Ping
enable: true
```
## `traceroute`
| Parameter | Type | Default | Description |
| :------------- | :-----: | :------------- | :------------------------------------------------------ |
| `enable` | Boolean | `true` | Enable or disable the Traceroute query type. |
| `display_name` | String | `'Traceroute'` | Text displayed for the Traceroute query type in the UI. |
#### Example
<!-- prettier-ignore -->
```yaml title="hyperglass.yaml"
queries:
traceroute:
display_name: Traceroute
enable: true
```

View file

@ -1,35 +0,0 @@
---
id: response-caching
title: Response Caching
sidebar_label: Response Caching
keywords: [configuration, cache, timeout]
description: hyperglass caching configuration
---
hyperglass uses [Redis](https://redis.io/) for cache storage. Every query is cached and automatically expired from the cache after a configurable timeout period.
Common Redis parameters are configurable, in case you already have a dedicated Redis server you'd prefer to use, instead of running it on the same server as hyperglass:
| Parameter | Type | Default | Description |
| :---------- | :-----: | :------------ | :----------------------------------------------------------------------------------------------------- |
| `host` | String | `'localhost'` | Redis server IP address or hostname. |
| `port` | Integer | `6379` | Redis server TCP port. |
| `database` | Integer | `1` | Database ID for hyperglass. |
| `password` | String | `None` | Password for [Redis password authentication](https://redis.io/topics/security#authentication-feature). |
| `timeout` | Integer | `120` | Time in seconds query output will be kept in the Redis cache. |
| `show_text` | Boolean | `true` | Show the [cache message](ui/text) in the hyperglass UI. |
:::important Caching
hyperglass caches every query response to a Redis database, and always responds to a request with the cached value. If hyperglass receives a query for which it has no matching cached entry, the query parameters are used to created a new cache entry, hyperglass executes the request normally, writes the response to the cache, and then returns the response to the end user.
:::
## Example
```yaml title="hyperglass.yaml"
cache:
database: 0
host: localhost
port: 6379
show_text: true
timeout: 120
```

View file

@ -1,86 +0,0 @@
---
id: rest-api
title: REST API
sidebar_label: REST API
keywords: [configuration, api, rest]
description: Configure the REST API
---
import Link from "@docusaurus/Link";
import MiniNote from "../src/components/MiniNote";
import Code from "../src/components/JSXCode";
import PageLink from "../src/components/PageLink";
The hyperglass API is based on the powerful [FastAPI](https://fastapi.tiangolo.com/) framework, which includes automatic API documentation using the [OpenAPI](https://www.openapis.org/) specification. If you plan to provide your users with API access to your hyperglass instance, it is highly recommended to leave this enabled.
FastAPI provides built in support for both [Swagger UI](https://swagger.io/tools/swagger-ui/) and [Redoc](https://redocly.github.io/redoc/), which are open source projects that create a pretty web UI from an OpenAPI specification.
## Settings
| Parameter | Type | Default | Description |
| :------------ | :-----: | :--------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enable` | Boolean | `true` | Enable or disable the API documentation. |
| `title` | String | `'{site_title} API Documentation'` | API documentation title. `{site_title}` will be replaced with the <Link to="/docs/configuration#global-settings"><Code>site_title</Code></Link> parameter. |
| `description` | String | | API documentation description appearing below the title. |
| `base_url` | String | `'https://lg.example.net'` | The base URL for your hyperglass site. Used by OpenAPI for dynamically creating hyperlinks. |
| `mode` | String | `'redoc'` | OpenAPI UI library to use for the hyperglass API docs. <MiniNote>Must be <Code>redoc</Code> or <Code>swagger</Code></MiniNote> |
| `uri` | String | `'/api/docs'` | HTTP URI/path where API documentation can be accessed. |
| `openapi_uri` | String | `'/openapi.json'` | Path to the automatically generated `openapi.json` file. |
| `queries` | | | `/queries` endpoint settings <PageLink to="#queries">➡️</PageLink> |
| `query` | | | `/query` endpoint settings <PageLink to="#query">➡️</PageLink> |
| `devices` | | | `/devices` endpoint settings <PageLink to="#devices">➡️</PageLink> |
### `queries`
| Parameter | Type | Default | Description |
| :------------ | :----: | :--------------------------------- | :----------------------------------------------------------- |
| `title` | String | `'Supported Queries'` | Displayed as the header text above the API endpoint section. |
| `description` | String | `'List of supported query types.'` | Displayed inside each API endpoint section. |
| `summary` | String | `'Query Types'` | Displayed beside the API endpoint URI. |
### `query`
| Parameter | Type | Default | Description |
| :------------ | :----: | :----------------------------------------- | :----------------------------------------------------------- |
| `title` | String | `'Submit Query'` | Displayed as the header text above the API endpoint section. |
| `description` | String | `'Request a query response per-location.'` | Displayed inside each API endpoint section. |
| `summary` | String | `'Query the Looking Glass'` | Displayed beside the API endpoint URI. |
### `devices`
| Parameter | Type | Default | Description |
| :------------ | :----: | :---------------------------------------------------------------------------------------------- | :----------------------------------------------------------- |
| `title` | String | `'Devices'` | Displayed as the header text above the API endpoint section. |
| `description` | String | `'List of all devices/locations with associated identifiers, display names, networks, & VRFs.'` | Displayed inside each API endpoint section. |
| `summary` | String | `'Devices List'` | Displayed beside the API endpoint URI. |
## Example
```yaml title="hyperglass.yaml"
docs:
base_url: https://lg.example.net
description: ""
devices:
description:
List of all devices/locations with associated identifiers, display
names, networks, & VRFs.
summary: Devices List
title: Devices
enable: true
mode: redoc
openapi_uri: /openapi.json
queries:
description: List of supported query types.
summary: Query Types
title: Supported Queries
query:
description: Request a query response per-location.
summary: Query the Looking Glass
title: Submit Query
title: "{site_title} API Documentation"
uri: /api/docs
```
:::note From the developer
I'm partial to Redoc, partially because I find it to be more aesthetically pleasing, and partially because it's written in [ReactJS](https://reactjs.org/), just like the hyperglass UI. At some point, I plan to migrate away from the built-in Redoc page and integrate Redoc directly with hyperglass.
:::

View file

@ -1,82 +0,0 @@
---
id: setup
title: Setup
sidebar_label: Setup
keywords: [install, setup]
description: hyperglass Setup
---
import Link from "@docusaurus/Link";
After hyperglass is [installed](getting-started.mdx), you can run the `hyperglass --help` command to see the available options:
```shell-session
$ hyperglass --help
Usage: hyperglass [OPTIONS] COMMAND [ARGS]...
hyperglass Command Line Interface
Options:
-v, --version 🔢 hyperglass version
-h, --help 🙏 Show this help message
Commands:
build-ui 🦋 Create a new UI build
clear-cache 🧼 Clear the Redis cache
secret 🔒 Generate agent secret
setup 🧰 Run the setup wizard
start 🚀 Start web server
```
## Setup Wizard
To start the setup wizard, run `hyperglass setup`.
You'll receive the following prompts:
### Installation Directory
```shell-session
[?] Choose a directory for hyperglass: /Users/ml/hyperglass
> /home/user/hyperglass
/etc/hyperglass
```
hyperglass requires a directory on your system to store configuration files, the web UI, logos, etc. You may choose between the current user's home directory or `/etc`.
### Systemd Service
```shell-session
Do you want to generate a systemd service file? [y/N]:
```
hyperglass also includes a [systemd](https://systemd.io/) service file, which can be installed if you use systemd. If selected, a systemd service file will be generated and copied to the installation directory. Then, it will be symlinked to `/etc/systemd/system`. All you need to do to enable the service is run:
```shell-session
$ sudo systemctl enable hyperglass
```
## UI Build
After running the setup, the `build-ui` command needs to be run for the first time. This command creates the required file structure for the UI, initializes frontend dependencies, and generates favicons.
:::note
If your system's compute resources are too low, the `build-ui` step will likely fail. See the [system requirements](production.mdx) section for more information.
:::
```shell-session
$ hyperglass build-ui
✅ Completed UI build in development mode
```
## Startup
To start hyperglass at the console run `hyperglass start`.
:::important
hyperglass won't start without a `devices.yaml` file. See the [Adding Devices](adding-devices.mdx) section for instructions on how add devices.
:::
```shell-session
$ hyperglass start
```

View file

@ -1,11 +0,0 @@
.getStarted[class][class]:not(.button--active):not(:hover) {
color: var(--ifm-color-secondary);
}
.getStarted[class][class]:not(.button--active):hover {
color: var(--ifm-color-white);
}
.year {
color: var(--ifm-color-primary);
}

View file

@ -1,67 +0,0 @@
---
id: table-output
title: Table Output
sidebar_label: Table Output
description: Configure structured data parameters
---
Devices that support responding to a query with structured or easily parsable data can have their response data placed into an easier to read table (or JSON, when using the [REST API](rest-api)). Currently, the following platforms have structured data supported in hyperglass:
- Juniper Junos
:::note
Unlike with standard text output, devices with structured data enabled do not support customization of their commands. This is because the response must be something hyperglass is preconfigured to understand and parse, so hyperglass must maintain control over the specific command to run for a given platform.
:::
<div class="table--full-width" />
The `structured` subsection contains multiple subsections of its own:
| Section | Description | All Options |
| :------------ | :--------------------------------- | :---------------------------------------: |
| `communities` | Include or exclude BGP communities | <PageLink to="#communities">➡️</PageLink> |
| `rpki` | Configure RPKI validation | <PageLink to="#rpki">➡️</PageLink> |
## `communities`
| Parameter | Type | Default | Description |
| :-------- | :----: | :------: | :------------------------------------------------------------------------------------------------------------------------------------ |
| `mode` | String | `'deny'` | `'deny'` denies any matching patterns and permits anything else. `'permit'` only permits matching patterns and denies everything else |
| `items` | List | `[]` | List of regular expression patterns to match |
:::note Regular Expressions with YAML
If you're using any regex patterns with special characters, you'll probably need to wrap the patterns in single quotes, to denote a raw string. For example:
```yaml
normal_string: Normal String
raw_string: '^Raw\sString$'
```
:::
## `rpki`
| Parameter | Type | Default |
| :-------- | :----: | :--------: |
| `mode` | String | `'router'` |
### `router` mode
`router` mode uses the RPKI state from the perspective of the router. This means if your network is not using Origin Validation, the RPKI state will be shown as "Not Verified". Otherwise, the corresponding RPKI state will be shown.
### `external` mode
`external` mode takes each prefix, the last ASN in the `AS_PATH` and requests the RPKI validation state via the [Cloudflare RPKI Portal](https://rpki.cloudflare.com/).
## Example
```yaml title="hyperglass.yaml"
structured:
communities:
mode: permit
items:
- '65000:\d+'
- '65[1-4]00:\d+'
rpki:
mode: external
```

View file

@ -1,105 +0,0 @@
---
id: configuration
title: UI Configuration
sidebar_label: Configuration
keywords: [hyperglass, looking glass, web ui, gui, theme, colors, branding]
description: Customize the Web UI
---
import Link from "@docusaurus/Link";
import R from "../../src/components/Required";
import MiniNote from "../../src/components/MiniNote";
import Code from "../../src/components/JSXCode";
import PageLink from "../../src/components/PageLink";
## Build
hyperglass is build with [NextJS](https://nextjs.org/), a [React](https://reactjs.org/)-based UI framework that supports server-side rendering and static exporting, which contribute to hyperglass's speed and SEO-friendliness. At startup, hyperglass creates a new "UI build", which is a static export of the site and includes some elements of the [configuration](parameters).
This UI build process can be run manually via the hyperglass CLI:
```shell-session
$ hyperglass build-ui
✅ Completed UI build in production mode
```
Or with the `--build` CLI flag on startup:
```shell-session
$ hyperglass start --build
```
The UI build will run automatically any time the hyperglass configuration or version changes.
## Sections
<div class="table--full-width" />
The `web` subsection contains multiple subsections of its own, should you wish to customize various aspects of the UI:
| Section | Description | All Options |
| :-------------- | :----------------------------- | :-----------------------------------------: |
| `credit` | Developer credit & GitHub Link | <PageLink to="#credit">➡️</PageLink> |
| `dns_provider` | DNS over HTTPS Provider | <PageLink to="#dns_provider">➡️</PageLink> |
| `external_link` | Link to external site | <PageLink to="#external_link">➡️</PageLink> |
| `greeting` | Greeting Modal | <PageLink to="#greeting">➡️</PageLink> |
| `logo` | Logo & Favicons | <PageLink to="logo">➡️</PageLink> |
| `opengraph` | [OpenGraph](https://ogp.me/) | <PageLink to="#opengraph">➡️</PageLink> |
| `terms` | Terms & Conditions | <PageLink to="#terms">➡️</PageLink> |
| `text` | Text, title, & names | <PageLink to="text">➡️</PageLink> |
| `theme` | Colors & Fonts | <PageLink to="theme">➡️</PageLink> |
### `credit`
| Parameter | Type | Default | Description |
| :-------- | :-----: | :-----: | :--------------------------------------------------------------------------------------- |
| `enable` | Boolean | `true` | Enable or disable the display of developer credit & link to hyperglass GitHub repository |
:::note From the developer
If your organization's policy allows, and you don't mind, I request that you keep `credit` enabled. Remember: my goal for this project is get more networks to use looking glasses to make all of our lives easier. Because it's primarily other network operators who will use this tool to begin with, I'd love for any operators that use your looking glass to know where they can get their own.
:::
### `dns_provider`
| Parameter | Type | Default | Description |
| :-------- | :----: | :------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | String | `'cloudflare'` | DNS over HTTPS provider for in-browser DNS resolution. Cloudflare & Google supported. <MiniNote>Must be <Code>cloudflare</Code> or <Code>google</Code></MiniNote> |
### `external_link`
| Parameter | Type | Default | Description |
| :-------- | :-----: | :---------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enable` | Boolean | `true` | Enable or disable the display of an external link |
| `title` | String | `'PeeringDB'` | Link title/label |
| `url` | String | `'https://www.peeringdb.com/asn/{primary_asn}'` | Target URL. `{primary_asn}` will be replaced with the `primary_asn` value from <Link to="/docs/configuration#global-settings">Global Settings</Link> |
### `greeting`
| Parameter | Type | Default | Description |
| :--------- | :-----: | :----------- | :------------------------------------------------------------------------------------------- |
| `enable` | Boolean | `false` | Enable or disable the greeting modal. |
| `file` | String | | Path to a [markdown](https://www.markdownguide.org/) file containing the modal body content. |
| `title` | String | `'Welcome'` | Modal title. |
| `button` | String | `'Continue'` | Button text. |
| `required` | Boolean | `false` | If `true` the user must click the button in order to submit a query. |
### `opengraph`
If you're not familiar with [OpenGraph](https://ogp.me/), it's the thing that generates the pretty pictures, titles, and descriptions for links when you post them to sites/tools such as Facebook, Twitter, Slack, etc.
By default, [this Opengraph image](/opengraph.jpg) is set. If you define one with `image`, hyperglass will automatically generate an Opengraph image using the following methodology:
- If the image is already 1200x630, it will be used
- If the image is or is not 1200x630, but contains transparency (like in a `.png` formatted image), it will be converted to a JPEG file with the [`black`](theme#colors) used as the background color.
| Parameter | Type | Description |
| :-------- | :----: | :---------------------- |
| `image` | String | Path to opengraph image |
### `terms`
| Parameter | Type | Default | Description |
| :-------- | :-----: | :-------- | :-------------------------------------------------------------------------------------------- |
| `enable` | Boolean | `true` | Enable or display the display of terms & conditions |
| `file` | String | | Path to a plain text or markdown file with content to override the default terms & conditions |
| `title` | String | `'Terms'` | Terms & conditions title |

View file

@ -1,72 +0,0 @@
---
id: example
title: Example UI Configuration
sidebar_label: Example
keywords:
[hyperglass, looking glass, web ui, gui, theme, colors, branding, example]
description: See how to the hyperglass UI should be configured.
---
## Example
```yaml title="hyperglass.yaml"
web:
credit:
enable: true
dns_provider:
name: cloudflare
external_link:
enable: true
title: PeeringDB
url: https://www.peeringdb.com/asn/{primary_asn}
help_menu:
enable: true
file: null
title: Help
logo:
dark: /home/ubuntu/hyperglass/hyperglass-light.svg
light: /home/ubuntu/hyperglass/hyperglass-dark.svg
favicon: /home/ubuntu/hyperglass/hyperglass-icon.svg
height: null
width: "75%"
opengraph:
image: /home/ubuntu/hyperglass/hyperglass-opengraph.png
terms:
enable: true
file: null
title: Terms
text:
cache: Results will be cached for 2 minutes.
fqdn_tooltip: "Use {protocol}"
query_location: Location
query_target: Target
query_type: Query Type
query_vrf: Routing Table
subtitle: AS65001
title: hyperglass
title_mode: text_only
theme:
default_color_mode: light
colors:
black: "#121212"
blue: "#314cb6"
cyan: "#118ab2"
danger: "#d84b4b"
error: "#ff6b35"
gray: "#c1c7cc"
green: "#35b246"
orange: "#ff6b35"
pink: "#f2607d"
primary: "#118ab2"
purple: "#8d30b5"
red: "#d84b4b"
secondary: "#314cb6"
success: "#35b246"
teal: "#35b299"
warning: "#edae49"
white: "#f7f7f7"
yellow: "#edae49"
fonts:
body: Nunito
mono: Fira Code
```

View file

@ -1,99 +0,0 @@
---
id: logo
title: Logo
sidebar_label: Logo
keywords: [hyperglass, looking glass, web ui, gui, branding, logo]
description: Customize the Logo & Favicon
---
## `logo`
| Parameter | Type | Default | Description |
| :-------- | :-----: | :-------------- | :-------------------------------------------- |
| `light` | String | hyperglass logo | Path to logo that will be used in light mode |
| `dark` | String | hyperglass logo | Path to logo that will be used in dark mode |
| `favicon` | String | hyperglass icon | Path to logo that will be used as the favicon |
| `width` | String | `100%` | Maximum logo width as a percentage |
| `height` | Integer | | Maximum logo height as a percentage |
### Favicon
It's very easy to customize the favicon imaged used by hyperglass. If you're not familiar with the term, the favicon is the icon used by the browser in tabs, windows, or bookmarks:
![](/screenshots/screenshot-favicons.jpg)
During the [UI build process](setup.mdx#ui-build) hyperglass automatically generates favicon files in all of the many formats required for cross-platform, cross-browser support.
#### Supported Formats
- `.jpg`
- `.jpeg`
- `.png`
- `.svg`
:::caution Icon File Size
Generating the favicons is very CPU-intensive, and therefore has the tendency of timing out if the icon file is very large. If you receive a timeout error when starting hyperglass or running the `hyperglass build-ui` command, try reducing the size of the icon file. **File sizes of around 200 KB** have been known to succeed without too much overhead.
:::
The following icons types are generated:
```
android-chrome-36x36.png
android-chrome-48x48.png
android-chrome-72x72.png
android-chrome-96x96.png
android-chrome-144x144.png
android-chrome-192x192.png
android-chrome-256x256.png
android-chrome-384x384.png
android-chrome-512x512.png
apple-touch-icon-57x57.png
apple-touch-icon-60x60.png
apple-touch-icon-72x72.png
apple-touch-icon-76x76.png
apple-touch-icon-114x114.png
apple-touch-icon-120x120.png
apple-touch-icon-144x144.png
apple-touch-icon-152x152.png
apple-touch-icon-167x167.png
apple-touch-icon-180x180.png
apple-touch-icon-1024x1024.png
apple-touch-icon-precomposed.png
apple-touch-icon.png
apple-touch-startup-image-640x1136.png
apple-touch-startup-image-750x1334.png
apple-touch-startup-image-828x1792.png
apple-touch-startup-image-1125x2436.png
apple-touch-startup-image-1136x640.png
apple-touch-startup-image-1242x2208.png
apple-touch-startup-image-1242x2688.png
apple-touch-startup-image-1334x750.png
apple-touch-startup-image-1536x2048.png
apple-touch-startup-image-1620x2160.png
apple-touch-startup-image-1668x2224.png
apple-touch-startup-image-1668x2388.png
apple-touch-startup-image-1792x828.png
apple-touch-startup-image-2048x1536.png
apple-touch-startup-image-2048x2732.png
apple-touch-startup-image-2160x1620.png
apple-touch-startup-image-2208x1242.png
apple-touch-startup-image-2224x1668.png
apple-touch-startup-image-2388x1668.png
apple-touch-startup-image-2436x1125.png
apple-touch-startup-image-2688x1242.png
apple-touch-startup-image-2732x2048.png
coast-228x228.png
favicon-16x16.png
favicon-32x32.png
favicon-48x48.png
favicon.ico
firefox_app_60x60.png
firefox_app_128x128.png
firefox_app_512x512.png
mstile-70x70.png
mstile-144x144.png
mstile-150x150.png
mstile-310x150.png
mstile-310x310.png
yandex-browser-50x50.png
```

View file

@ -1,38 +0,0 @@
---
id: text
title: Text
sidebar_label: Text
keywords: [hyperglass, looking glass, web ui, gui, branding, text, messages]
description: Customize the text used in the web UI
---
## `text`
| Parameter | Type | Default | Description |
| :--------------- | :----: | :-------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cache_prefix` | String | `'Results cached for '` | Text displayed with the cache timeout countdown. |
| `cache_icon` | String | `'Cached Response from {time}'` | Text displayed when a user hovers over the lightning bolt icon, which is displayed when a response from the server was a cached response. `{time}` is replaced with the _original_ query's timestamp. |
| `completed_time` | String | `'Completed in {seconds}'` | Text displayed when a user hovers over the success icon for a query result. `{seconds}` will be replaced with 'n seconds' where n is the time a query took to complete. |
| `fqdn_message` | String | `'Your browser has resolved {fqdn} to'` | Text displayed when prompting a user to select a resolve IPv4 or IPv6 address for an FQDN query. |
| `fqdn_error` | String | `'Unable to resolve {fqdn}'` | Text displayed when an FQDN is not resolvable. |
| `fqdn_button` | String | `'Try Again'` | Button text used when an FQDN is not resolvable. |
| `query_location` | String | `'Location'` | Query Location (router) form label. |
| `query_target` | String | `'Target'` | Query Target (IP/hostname/community/AS Path) form label. |
| `query_type` | String | `'Query Type'` | Query Type (BGP Route, Ping, Traceroute, etc.) form label. |
| `query_vrf` | String | `'Routing Table'` | Query VRF form label. |
| `subtitle` | String | `'Network Looking Glass'` | Subtitle text. value. |
| `title` | String | `'hyperglass'` | Title text. |
| `title_mode` | String | `'text_only'` | Set the title mode. <MiniNote>Must be <Code>text_only</Code>, <Code>logo_only</Code>, <Code>logo_subtitle</Code>, or <Code>all</Code></MiniNote> |
### Title Mode
The `title_mode` parameter behaves in the following manner:
<div className="table--full-width" />
| Mode | Behavior |
| --------------- | ------------------------------------------------------------------- |
| `text_only` | Shows the [`title`](#text) and [`subtitle`](#text) only. |
| `logo_only` | Shows the [`logo`](ui/logo) only. |
| `logo_subtitle` | Shows the [`logo`](ui/logo) and [`subtitle`](#text) only. |
| `all` | Shows the [`logo`](ui/logo), [`title`](#text), [`subtitle`](#text). |

View file

@ -1,58 +0,0 @@
---
id: theme
title: Theme
sidebar_label: Theme
keywords: [hyperglass, looking glass, web ui, gui, branding, theme]
description: Customize Theme
---
import Color from "../../src/components/Color";
import Font from "../../src/components/Font";
import PageLink from "../../src/components/PageLink";
## `theme`
### Parameters
| Parameter | Type | Description |
| :------------------- | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------- |
| `default_color_mode` | String | Sets the default color mode. Must be `light` or `dark`. If no default mode is specified, hyperglass will use the browser's preferred color mode. |
### Subsections
| Section | Description | All Options |
| :------- | :----------- | :----------------------------------: |
| `colors` | Theme colors | <PageLink to="#colors">➡️</PageLink> |
| `fonts` | Theme fonts | <PageLink to="#fonts">➡️</PageLink> |
#### `colors`
| Parameter | Type | Default | Description |
| :---------- | :----: | :--------------------- | :------------------------------------- |
| `primary` | String | | Primary accent color |
| `secondary` | String | | Secondary accent color |
| `success` | String | | Success message/status color |
| `warning` | String | | Warning message/status color |
| `error` | String | | Error message/status color |
| `danger` | String | | Danger message/status color |
| `dark` | String | <Color hex="#121212"/> | Used as background color in dark mode |
| `light` | String | <Color hex="#f5f6f7"/> | Used as background color in light mode |
| `red` | String | <Color hex="#d84b4b"/> | Used as `danger` color if undefined |
| `orange` | String | <Color hex="#ff6b35"/> | Used as `error` color if undefined |
| `yellow` | String | <Color hex="#edae49"/> | Used as `warning` color if undefined |
| `green` | String | <Color hex="#35b246"/> | Used as `success` color if undefined |
| `cyan` | String | <Color hex="#118ab2"/> | Used as `primary` color if undefined |
| `blue` | String | <Color hex="#314cb6"/> | Used as `secondary` color if undefined |
| `teal` | String | <Color hex="#35b299"/> | |
| `pink` | String | <Color hex="#f2607d"/> | |
| `purple` | String | <Color hex="#8d30b5"/> | |
| `gray` | String | <Color hex="#c1c7cc"/> | |
#### `fonts`
Currently, only [Google Fonts](https://fonts.google.com/) are supported.
| Parameter | Type | Default | Description |
| :-------- | :----: | :----------------------- | :-------------------------------------- |
| `body` | String | <Font name="Nunito"/> | Main body font |
| `mono` | String | <Font name="Fira Code"/> | Monospace font, used for command output |

View file

@ -1,25 +0,0 @@
---
id: upgrading
title: Upgrading hyperglass
sidebar_label: Upgrading
keywords: [hyperglass, looking glass, upgrade, upgrading, version]
description: How to upgrade hyperglass
---
## Upgrade Process
To upgrade hyperglass, stop the currently-running service and upgrade via PyPI:
```shell-session
$ sudo systemctl stop hyperglass
$ sudo pip3 install -U hyperglass
```
## Check Current version
To check the current version of hyperglass, run the following command:
```shell-session
$ sudo hyperglass --version
hyperglass version: 1.0.0-beta.19
```

View file

@ -1,100 +0,0 @@
const githubURL = "https://github.com/checktheroads/hyperglass";
const { googleTrackingId, algoliaKey } = process.env;
const docusaurusConfig = {
title: "hyperglass",
tagline: "the network looking glass that tries to make the internet better.",
url: "https://hyperglass.io",
baseUrl: "/",
favicon: "img/favicon.ico",
organizationName: "checktheroads",
projectName: "hyperglass",
themeConfig: {
image: "opengraph.jpg",
googleAnalytics: {
trackingID: googleTrackingId || " ",
anonymizeIP: false,
},
algolia: {
apiKey: algoliaKey || "dev",
indexName: "hyperglass",
},
navbar: {
links: [
{ to: "docs/introduction", label: "Docs", position: "left" },
{ to: "screenshots", label: "Screenshots", position: "left" },
{ href: "https://demo.hyperglass.io", label: "Demo", position: "left" },
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Introduction",
to: "docs/introduction",
},
{
label: "Getting Started",
to: "docs/getting-started",
},
{
label: "Configuration",
to: "docs/parameters",
},
],
},
{
title: "Community",
items: [
{
label: "Telegram",
href: "https://t.me/hyperglasslg",
},
{
label: "Gitter",
href: "https://gitter.im/hyperglass",
},
{
label: "Keybase",
href: "https://keybase.io/team/hyperglass",
},
],
},
{
title: "Social",
items: [
{
label: "GitHub",
href: githubURL,
},
{
label: "Twitter",
href: "https://twitter.com/checktheroads",
},
],
},
],
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl: githubURL + "/edit/v1.0.0/docs/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
plugins: ["@docusaurus/plugin-google-analytics"],
};
module.exports = docusaurusConfig;

80
docs/favicon-formats.ts Normal file
View file

@ -0,0 +1,80 @@
interface Favicon {
rel: string | null;
dimensions: [number, number];
image_format: string;
prefix: string;
}
export default [
{ dimensions: [48, 48], image_format: "ico", prefix: "favicon", rel: null },
{ dimensions: [16, 16], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [32, 32], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [64, 64], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [96, 96], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [180, 180], image_format: "png", prefix: "favicon", rel: "icon" },
{
dimensions: [57, 57],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [60, 60],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [72, 72],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [76, 76],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [114, 114],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [120, 120],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [144, 144],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [152, 152],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [167, 167],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [180, 180],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{ dimensions: [70, 70], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [270, 270], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [310, 310], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [310, 150], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [196, 196], image_format: "png", prefix: "favicon", rel: "shortcut icon" },
] as Favicon[];

View file

@ -1,34 +0,0 @@
const fs = require("fs");
const globby = require("globby");
const prettier = require("prettier");
(async () => {
const pages = await globby(["docs/**/*{.js,.mdx}"]);
const sitemap = `
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${pages
.map((page) => {
const path = page
.replace("pages", "")
.replace(".js", "")
.replace(".mdx", "");
const route = path === "/index" ? "" : path;
console.log("Added entry to sitemap:", path, route);
return `
<url>
<loc>${`https://hyperglass.io/${route}`}</loc>
</url>
`;
})
.join("")}
</urlset>
`;
const formatted = prettier.format(sitemap, {
parser: "html",
});
fs.writeFileSync("static/sitemap.xml", formatted);
})();

8
docs/global.d.ts vendored Normal file
View file

@ -0,0 +1,8 @@
declare global {
namespace NodeJS {
interface ProcessEnv {
NODE_ENV: 'development' | 'production';
CF_PAGES_BRANCH: string;
}
}
}

7
docs/global.module.css Normal file
View file

@ -0,0 +1,7 @@
.logo {
color: #d84b4b;
}
html[class~=dark] .logo {
color: #fff;
}

5
docs/next-env.d.ts vendored Normal file
View file

@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

35
docs/next.config.mjs Normal file
View file

@ -0,0 +1,35 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import withNextra from "nextra";
function copyChangelog() {
const dir = path.dirname(fileURLToPath(import.meta.url));
const src = path.resolve(dir, "..", "CHANGELOG.md");
const data = fs.readFileSync(src);
const replaced = data.toString().replace("# Changelog\n\n", "");
const dst = path.resolve(dir, "pages", "changelog.mdx");
fs.writeFileSync(dst, replaced);
}
copyChangelog();
/**
* @type {import('nextra').NextraConfig}
*/
const nextraConfig = {
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
};
/**
* @type {import('next').NextConfig}
*/
const config = {
images: {
unoptimized: true,
},
output: "export",
};
export default withNextra(nextraConfig)(config);

48
docs/package.json Executable file → Normal file
View file

@ -1,42 +1,24 @@
{
"name": "docs",
"version": "0.0.0",
"name": "hyperglass-docs",
"version": "2.0.0",
"description": "hyperglass documentation",
"private": true,
"scripts": {
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy"
"dev": "next dev",
"start": "next start",
"typecheck": "tsc --noEmit"
},
"author": "thatmattlove <matt@hyperglass.dev>",
"license": "BSD-3-Clause-Clear",
"dependencies": {
"@docusaurus/core": "^2.0.0-alpha.58",
"@docusaurus/preset-classic": "^2.0.0-alpha.58",
"classnames": "^2.2.6",
"globby": "^11.0.1",
"prismjs": "^1.19.0",
"prop-types": "^15.7.2",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"use-media": "^1.4.0"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
"next": "^14.1.1",
"nextra": "3.0.0-alpha.24",
"nextra-theme-docs": "3.0.0-alpha.24",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"prettier": "^2.0.5"
},
"prettier": {
"[yaml]": {
"singleQuote": true
}
"@types/node": "^20.11.24",
"typescript": "^5.3.3"
}
}

42
docs/pages/_meta.tsx Normal file
View file

@ -0,0 +1,42 @@
export default {
index: { title: "Introduction", theme: { breadcrumb: false } },
"---": {
type: "separator",
},
installation: "Installation",
configuration: "Configuration",
platforms: "Platforms",
plugins: "Plugins",
documentation: {
title: "Documentation",
type: "menu",
items: {
installation: {
title: "Installation",
href: "/installation",
},
configuration: {
title: "Configuration",
href: "/configuration",
},
plugins: {
title: "Plugins",
href: "/plugins",
},
changelog: {
title: "Changelog",
href: "/changelog",
},
license: {
title: "License",
href: "/license",
},
},
},
demo: {
title: "Demo",
type: "page",
href: "https://demo.hyperglass.dev",
newWindow: true,
},
};

View file

@ -0,0 +1,7 @@
export default {
overview: "Overview",
config: "Config File",
devices: "Devices File",
directives: "Directives File",
examples: "Examples",
};

View file

@ -0,0 +1,44 @@
---
title: Configuration File
description: hyperglass config.yaml file reference
---
The `config.yaml` file is broken into multiple sections:
## Top Level Parameters
| Parameter | Type | Default Value | Description |
| :----------------- | :-------------- | :------------------------------- | :------------------------------------------------------------ |
| `org_name` | String | Beloved Hyperglass User | Your organization's name. |
| `plugins` | List of Strings | | List of hyperglass [plugins](/plugins) to load. |
| `primary_asn` | String | 65000 | Your organization's primary ASN. Used to set default UI text. |
| `request_timeout` | Number | 90 | Global timeout in seconds for all requests. |
| `site_description` | String | `org_name` Network Looking Glass | `<meta>` description, also used in the API documentation. |
| `site_title` | String | `org_name` | Browser title, also used in the default terms & conditions. |
#### Example with Defaults
```yaml filename="config.yaml"
org_name: Beloved Hyperglass User
plugins: []
primary_asn: 65000
request_timeout: 90
site_description: Beloved Hyperglass User Network Looking Glass
site_title: Beloved Hyperglass User
```
## Other Configuration Sections
| Parameter | Docs | Description |
| :----------- | :--------------------------------------------------------------------- | :--------------------------------------------------------------- |
| `cache` | [Caching Docs](/configuration/config/caching.mdx) | Customize how hyperglass caches responses. |
| `logging` | [Logging Docs](/configuration/config/logging.mdx) | Customize file logging, syslog, webhooks, etc. |
| `messages` | [Messages Docs](/configuration/config/messages.mdx) | Customize messages shown to users. |
| `structured` | [Structured Output Docs](/configuration/config/structured-ouptput.mdx) | Customize how hyperglass handles structured output from devices. |
| `web` | [Web UI Docs](/configuration/config/web-ui.mdx) | Customize the look and feel of hyperglass's web UI. |
## Caveats
### Arista EOS
For whatever reason, the tested version of Arista EOS does not supply certain details about routes in its JSON output when running commands `show ip bgp regex <pattern>` or `show ip bgp community <community>`. Specifically, the the route's timestamp and any attached communities are not supplied. When these commands are used with Arista EOS, hyperglass sets the timestamp to the current time, and the community to an empty list.

View file

@ -0,0 +1,8 @@
export default {
"api-docs": "API Docs",
caching: "Caching",
logging: "Logging & Webhooks",
messages: "Messages",
"structured-output": "Structured Output",
"web-ui": "Web UI",
};

View file

@ -0,0 +1,72 @@
## API Docs
hyperglass automatically generates documentation for the REST API. The `docs` section allows users to customize the look, feel, and text used for the REST API documentation.
| Parameter | Type | Default Value | Description |
| :----------------- | :------ | :----------------------------- | :---------------------------------------------------------------------------------------------- |
| `docs.base_url` | String | https://lg.example.com | Used for REST API samples. See the [demo](https://demo.hyperglass.dev/api/docs) for an example. |
| `docs.enable` | Boolean | `true` | Enable or disable the REST API documentation. |
| `docs.path` | String | /api/docs | Path to the REST API documentation. |
| `docs.title` | String | `site_title` API Documentation | API docs title. Uses the `site_title` parameter from the [global](#global) parameters. |
| `docs.description` | String | | API docs description. Appears below the title. |
The documentation for API endpoints follow a common schema:
- `devices`
- `info`
- `queries`
- `query`
### Schema
| Parameter | Type | Description |
| :------------ | :----- | :------------------------------------------------------------------------------- |
| `title` | String | API endpoint title, displayed as the header text above the API endpoint section. |
| `description` | String | API endpoint description, displayed inside each API endpoint section. |
| `summary` | String | API endpoint summary, displayed beside the API endpoint path. |
### Parameters
| Parameter | Default Value |
| :------------------------- | :------------------------------------------------------------------------------------------ |
| `docs.devices.title` | Devices |
| `docs.devices.description` | List of all devices/locations with associated identifiers, display names, networks, & VRFs. |
| `docs.devices.summary` | Devices List |
| `docs.info.title` | System Information |
| `docs.info.description` | General information about this looking glass. |
| `docs.info.summary` | System Information |
| `docs.queries.title` | Supported Queries |
| `docs.queries.description` | List of supported query types. |
| `docs.queries.summary` | Query Types |
| `docs.query.title` | Supported Query |
| `docs.query.description` | Request a query response per-location. |
| `docs.query.summary` | Query the Looking Glass |
#### Example with Defaults
```yaml filename="config.yaml"
docs:
base_url: https://lg.example.com
enable: true
mode: redoc
path: /api/docs
title: Beloved Hyperglass User Looking Glass API Documentation
description: null
# API Endpoints ↓
devices:
title: Devices
description: List of all devices/locations with associated identifiers, display names, networks, & VRFs.
summary: Devices List
info:
title: System Information
description: General information about this looking glass.
summary: System Information
queries:
title: Supported Queries
description: List of supported query types.
summary: Query Types
query:
title: Supported Query
description: Request a query response per-location.
summary: Query the Looking Glass
```

View file

@ -0,0 +1,16 @@
## Cache
hyperglass automatically caches responses to reduce the number of times devices are queried for the same information.
| Parameter | Type | Default Value | Description |
| :---------------- | :------ | :------------ | :------------------------------------------------------------------------------ |
| `cache.timeout` | Number | 120 | Number of seconds for which to cache device responses. |
| `cache.show_text` | Boolean | True | If true, an indication that a user is viewing cached information will be shown. |
### Example with Defaults
```yaml filename="config.yaml"
cache:
timeout: 120
show_text: true
```

View file

@ -0,0 +1,90 @@
## Logging
Console, file, HTTP, and/or syslog logging configuration.
| Parameter | Type | Default Value | Description |
| :---------- | :----- | :------------ | :---------------------------------------------- |
| `directory` | String | /tmp | Path to directory where logs will be created. |
| `format` | String | text | Log text format, must be `text` or `json`. |
| `max_size` | String | 50MB | Maximum log file size before being overwritten. |
### Syslog
| Parameter | Type | Default Value | Description |
| :-------- | :----- | :------------ | :---------------------- |
| `host` | String | | Syslog target host. |
| `port` | Number | 514 | Syslog target UDP port. |
##### Syslog Example
```yaml filename="config.yaml" copy
logging:
syslog:
host: log.example.com
port: 514
```
### HTTP Logging
If enabled, logs will be sent by HTTP `POST` method.
| Parameter | Type | Default Value | Description |
| :----------- | :------ | :------------ | :---------------------------------------------- |
| `provider` | String | generic | Must be `generic`, `msteams`, or `slack`. |
| `host` | String | | URL |
| `headers` | Map | | |
| `params` | Map | | |
| `verify_ssl` | Boolean | true | Enable or disable SSL certificate verification. |
| `timeout` | Number | 5 | HTTP connection timeout in seconds. |
#### Authentication
Authentication is supported using HTTP basic authentication or an API key.
| Parameter | Type | Default Value | Description |
| :----------------------------- | :----- | :------------ | :--------------------------------------------------------------------------------------------------------- |
| `http.authentication.mode` | String | basic | Must be `basic` or `api_key`. |
| `http.authentication.username` | String | | Basic authentication username if `mode` is set to `basic`. |
| `http.authentication.password` | String | | Basic authentication password if `mode` is set to `basic`, or API key value if `mode` is set to `api_key`. |
| `http.authentication.header` | String | X-API-Key | Header name if `mode` is set to `api_key`. |
#### Examples
##### Generic
```yaml filename="config.yaml" copy
logging:
http:
provider: generic
host: https://httpbin.org
headers:
x-special-header: super special header value
params:
source: hyperglass
verify_ssl: true
timeout: 5
authentication:
mode: basic
username: your username
password: super secret password
```
In the above example, hyperglass will send a `POST` request to `https://httpbin.org?source=hyperglass` with Basic Authentication headers set.
##### Microsoft Teams Webhook
```yaml filename="config.yaml" copy
logging:
http:
provider: msteams
host: <MS Teams webhook URL>
```
##### Slack
```yaml filename="config.yaml" copy
logging:
http:
provider: slack
host: <Slack webhook URL>
```

View file

@ -0,0 +1,23 @@
## Message Customization
hyperglass provides as much control over user-facing text/messages as possible. The following messages may be adjusted as needed:
| Parameter | Type | Default Value | Description |
| :------------------------------ | :----- | :------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `messages.authentication_error` | String | Authentication error occurred. | Displayed when hyperglass is unable to authenticate to a device. Usually, this indicates a configuration error. |
| `messages.connection_error` | String | Error connecting to \{device_name\}: \{error\} | Displayed when hyperglass is unable to connect to a device. Usually, this indicates a configuration error. `{device_name}` and `{error}` will be used to display the device in question and the specific connection error. |
| `messages.general` | String | Something went wrong. | Displayed when errors occur that hyperglass didn't anticipate or handle correctly. Seeing this error message may indicate a bug in hyperglass. If you see this in the wild, try enabling [debug mode](#global) and review the logs to pinpoint the source of the error. |
| `messages.invalid_input` | String | \{target\} is not valid. | Displayed when a query target's value is invalid in relation to the corresponding query type. `{target}` will be used to display the invalid target. |
| `messages.invalid_query` | String | \{target\} is not a valid \{query_type\} target. | Displayed when a query target's value is invalid in relation to the corresponding query type. `{target}` and `{query_type}` may be used to display the invalid target and corresponding query type. |
| `messages.no_input` | String | \{field\} must be specified. | Displayed when a required field is not specified. `{field}` will be used to display the name of the field that was omitted. |
| `messages.no_output` | String | The query completed, but no matching results were found. | Displayed when hyperglass can connect to a device and execute a query, but the response is empty. |
| `messages.not_found` | String | \{type\} '\{name\}' not found. | Displayed when an object property does not exist in the configuration. `{type}` corresponds to a user-friendly name of the object type (for example, 'Device'), `{name}` corresponds to the object name that was not found. |
| `messages.request_timeout` | String | Request timed out. | Displayed when the [`request_timeout`](#global) time expires. |
| `messages.target_not_allowed` | String | \{target\} is not allowed. | Displayed when a query target is implicitly denied by a configured rule. `{target}` will be used to display the denied query target. |
##### Example
```yaml filename="config.yaml"
message:
general: Something with wrong.
```

View file

@ -0,0 +1,61 @@
## Structured
Devices that support responding to a query with structured or easily parsable data can have their response data placed into an easier to read table (or JSON, when using the REST API). Currently, the following platforms have structured data supported in hyperglass:
- Arista EOS
- Juniper Junos
When structured output is available, hyperglass checks the RPKI state of each BGP prefix returned using one of two methods:
1. From the router's perspective
2. From the perspective of [Cloudflare's RPKI Service](https://rpki.cloudflare.com/)
Additionally, hyperglass provides the ability to control which BGP communities are shown to the end user.
| Parameter | Type | Default Value | Description |
| :----------------------------- | :-------------- | :------------ | :---------------------------------------------------------------------------------------------------------------------------- |
| `structured.rpki.mode` | String | router | Use `router` to use the router's view of the RPKI state (1 above), or `external` to use Cloudflare's view (2 above). |
| `structured.communities.mode` | String | deny | Use `deny` to deny any communities listed in `structured.communities.items`, or `permit` to _only_ permit communities listed. |
| `structured.communities.items` | List of Strings | | List of communities to match. |
### RPKI Examples
#### Show RPKI State from the Device's Perspective
```yaml filename="config.yaml" copy {2}
structured:
rpki:
mode: router
```
#### Show RPKI State from a Public/External Perspective
```yaml filename="config.yaml" copy {2}
structured:
rpki:
mode: external
```
### Community Filtering Examples
#### Deny Listed Communities by Regex pattern
```yaml filename="config.yaml" {5-6}
structured:
communities:
mode: deny
items:
- '^65000:1\d+$' # don't show any communities starting with 65000:1. 65000:1234 would be denied, but 65000:4321 would be permitted.
- "65000:2345" # don't show the 65000:2345 community.
```
#### Permit only Listed Communities
```yaml filename="config.yaml" {5-6}
structured:
communities:
mode: permit
items:
- "^65000:.*$" # permit any communities starting with 65000, but no others.
- "1234:1" # permit only the 1234:1 community.
```

View file

@ -0,0 +1,294 @@
import { Callout } from "nextra/components";
import { Color } from "~/components/color";
## Web UI
hyperglass provides extensive customization options for the look and feel of the web UI.
| Parameter | Type | Default Value | Description |
| :-------------------------- | :----- | :------------ | :----------------------------------------------------------------------------------------------------------------------------------------- |
| `web.location_display_mode` | String | auto | Show the locations field as a `dropdown`, `gallery`. When using `auto`, if there are more than 5 location groups, `dropdown` will be used. |
| `web.custom_javascript` | String | | Path to a javascript file that will be loaded with the website. |
| `web.custom_html` | String | | Path to a custom HTML file that will be loaded with the website and rendered beneath the app. |
### DNS over HTTPS
[DNS over HTTPS](https://www.rfc-editor.org/rfc/rfc8484) is used to look up an FQDN query target from the perspective of the user's browser.
| Parameter | Type | Default Value | Description |
| :------------------ | :----- | :------------------------------------- | :-------------------------------------------------------------------------- |
| `dns_provider.name` | String | cloudflare | If `cloudflare` or `google` are provided, no URL is necessary. |
| `dns_provider.url` | String | `https://cloudflare-dns.com/dns-query` | Provide a custom DNS over HTTPS URL if you'd like to use your own resolver. |
### Logo
| Parameter | Type | Default Value | Description |
| :----------------- | :--------------- | :------------ | :------------------------------------------------- |
| `web.logo.light` | String | | Path to logo to show in light mode. |
| `web.logo.dark` | String | | Path to logo to show in dark mode. |
| `web.logo.favicon` | String | | Path to icon/logo from which to generate favicons. |
| `web.logo.width` | Number or String | 100% | Width of logo, either as pixels or a percentage. |
| `web.logo.height` | Number or String | | Height of logo, either as pixels or a percentage. |
##### Example
```yaml filename="config.yaml" copy
web:
logo:
light: /path/to/light-logo.svg
dark: /path/to/dark-logo.svg
favicon: /path/to/favicon.svg
width: 100%
height: null
```
### Greeting
The greeting is an optional modal/popup window that will present itself to users in the Web UI. It can be used for anything you want; for example:
- A data privacy acknowledgement that must be acknowledged prior to proceeding
- Information about your company
- Instructions on how to use hyperglass
| Parameter | Type | Default Value | Description |
| :---------------------- | :------ | :------------ | :--------------------------------------------------------------------------------------------------- |
| `web.greeting.enable` | Boolean | False | Enable or disable the greeting. |
| `web.greeting.file` | String | | Path to markdown or plain text file that contains greeting content. |
| `web.greeting.title` | String | Welcome | Text to be used as the greeting title. |
| `web.greeting.button` | String | Continue | Text to be used for the button that acknowledges/closes the greeting. |
| `web.greeting.required` | Boolean | False | If `true`, users cannot close the modal or run any queries until the greeting has been acknowledged. |
##### Example
```yaml filename="config.yaml" copy
web:
greeting:
enable: true
file: /path/to/your/file.md
title: Welcome
button: Continue
required: false
```
### OpenGraph
[OpenGraph](https://ogp.me/) is the thing that generates the pretty pictures, titles, and descriptions for links when you post them to sites/tools such as Facebook, Twitter, Slack, etc. By default, [this Opengraph image](/opengraph.jpg) is used, but you can provide your own image. You don't need to worry about sizing or formatting it properly, hyperglass will handle this for you.
| Parameter | Type | Default Value | Description |
| :-------------------- | :----- | :------------ | :---------------------------- |
| `web.opengraph.image` | String | | Path to your OpenGraph image. |
### Highlighting
hyperglass can highlight special values in your router output and provide users with additional information about the content. For example, your organization's BGP communities or IP address space can be visually highlighted, and a tooltip can be shown when a user hovers over the highlighted value.
Each value you wish to be highlighted is defined with the following schema:
| Parameter | Type | Default Value | Description |
| :-------- | :----- | :------------ | :------------------------------------------------------ |
| `pattern` | String | | RegEx pattern or string to match against router output. |
| `label` | String | | Tooltip value when the highlighted text is hovered. |
| `color` | String | | Color name from [`web.theme.colors`](#colors). |
##### Example
```yaml filename="config.yaml" copy
web:
highlight:
- pattern: "65000:1234"
label: Special snowflake community that does a thing
color: primary
- pattern: '^192\.0\.2\.[0-9]+$'
label: Magical IP Address
color: blue
```
### Menus
hyperglass can show completely-customizable menus in the footer. Each menu can be configured with the following schema:
| Parameter | Type | Default Value | Description |
| :-------- | :----- | :------------ | :------------------------------------------------------------------------------------------------------------------------- |
| `title` | String | | Menu title, will be the text that shows on footer. |
| `content` | String | | Plain text or markdown content of the menu or path to a file that contains plain text or markdown content. |
| `side` | String | left | Side of the footer with which the menu will be grouped. |
| `order` | Number | 0 | Optionally specify an order for each menu item. If not specified, menus will be rendered in the order they are configured. |
##### Example
```yaml filename="config.yaml" copy
web:
menus:
- title: Terms & Conditions
content:
| **Don't** break stuff!
_please_
side: right
order: 1
- title: Help
content: /path/to/help/file.md
side: left
order: 0
```
### Links
hyperglass can show customizable links to anything you think your users might find helpful. Each link can be configured with the following schema:
| Parameter | Type | Default Value | Description |
| :---------- | :------ | :------------ | :-------------------------------------------------------------------------------------------------------------------- |
| `title` | String | | Link text. |
| `url` | String | | Link URL. |
| `show_icon` | Boolean | True | If `true`, an icon indicating the link is an external link is shown. |
| `side` | String | left | Side of the footer with which the link will be grouped. |
| `order` | Number | 0 | Optionally specify an order for each link. If not specified, links will be rendered in the order they are configured. |
##### Example
```yaml filename="config.yaml" copy
web:
links:
- title: PeeringDB
url: https://www.peeringdb.com/65000
show_icon: true
side: right
order: 1
- title: Our Website
url: https://example.com
show_icon: false
side: left
order: 0
```
### Credit
| Parameter | Type | Default | Description |
| :-------- | :-----: | :-----: | :--------------------------------------------------------------------------------------- |
| `enable` | Boolean | `true` | Enable or disable the display of developer credit & link to hyperglass GitHub repository |
<Callout emoji="❤️" type="info">
**Note from the Developer**
<br /> If your organization's policy allows, and you don't mind, I request that you keep `credit`
enabled. Remember: my goal for this project is get more networks to use looking glasses to make all
of our lives easier. Because it's primarily other network operators who will use this tool to begin
with, I'd love for any operators that use your looking glass to know where they can get their own.
</Callout>
### Text
Most of the text in the hyperglass UI can be overridden to suit your needs.
| Parameter | Type | Default Value | Description |
| :--------------------------- | :----- | :------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `web.text.title_mode` | String | logo_only | See [title mode section](#title-mode) |
| `web.text.title` | String | hyperglass | Title text. |
| `web.text.subtitle` | String | Network Looking Glass | Subtitle text. |
| `web.text.query_location` | String | Location | Text used to label the query location (router) field. |
| `web.text.query_type` | String | Query Type | Text used to label the query type (directive) field. |
| `web.text.query_target` | String | Target | Text used to label the query target field. |
| `web.text.fqdn_tooltip` | String | Use \{protocol\} | Tooltip text used when a user hovers over the FQDN tooltip. |
| `web.text.fqdn_message` | String | Your browser has resolved \{fqdn\} to | Text used when prompting a user to select a resolve IPv4 or IPv6 address for an FQDN query. |
| `web.text.fqdn_error` | String | Unable to resolve \{fqdn\} | Text used when an FQDN is not resolvable. |
| `web.text.fqdn_error_button` | String | Try Again | Button text used when an FQDN is not resolvable. |
| `web.text.cache_prefix` | String | Results cached for | Text displayed with the cache timeout countdown. |
| `web.text.cache_icon` | String | Cached from \{time\} UTC | Text used when a user hovers over the cache icon, which is displayed when a response was a cached response. `{time}` is replaced with the _original_ query's timestamp. |
| `web.text.complete_time` | String | Completed in \{seconds\} | Text used when a user hovers over the success icon for a query result. `{seconds}` will be replaced with 'n seconds' where n is the time a query took to complete. |
| `web.text.rpki_invalid` | String | Invalid | Text used in table output when a route's RPKI status is invalid. |
| `web.text.rpki_valid` | String | Valid | Text used in table output when a route's RPKI status is valid. |
| `web.text.rpki_unknown` | String | No ROAs Exist | Text used in table output when a route's RPKI status is unknown. |
| `web.text.rpki_unverified` | String | Not Verified | Text used in table output when a route's RPKI status is unverified. |
| `web.text.no_communities` | String | No Communities | Text used in table output when a route has no communities. |
| `web.text.ip_error` | String | Unable to determine IP Address | Error displayed if hyperglass is unable to determine the user's IP. |
| `web.text.no_ip` | String | No \{protocol\} Address | Text displayed if the user doesn't have an IP address of \{protocol\} (IPv4 or IPv6). |
| `web.text.ip_select` | String | Select an IP Address | Text used to label the IP Address selection for the user's IP. |
| `web.text.ip_button` | String | My IP | Text used for the user IP button. |
#### Title Mode
Available title modes are:
| `title_mode` Value | Action |
| :----------------- | :------------------------------------------------------------------ |
| `logo_only` | Only the logo is displayed, no title or subtitle will be visible. |
| `text_only` | Only the title and subtitle are displayed, no logo will be visible. |
| `logo_subtitle` | Only the logo and subtitle are displayed, no title will be visible. |
| `all` | Logo, title, and subtitle will all be visible. |
##### Example
```yaml filename="config.yaml"
web:
text:
title: Our Looking Glass
subtitle: Company Name, Inc.
title_mode: text_only
```
### Theme
hyperglass allows you to customize the colors and fonts used in the Web UI.
| Parameter | Type | Default Value | Description |
| :----------------------------- | :----- | :------------ | :--------------------------------------------------------------------------------------------------------------- |
| `web.theme.default_color_mode` | String | | Set hyperglass's default color mode. By default, the user's system preference is used. Must be `light` or `dark` |
#### Colors
##### Intrinsic Colors
| Parameter | Default Value |
| :------------------------ | :---------------------- |
| `web.theme.colors.black` | <Color hex="#000000" /> |
| `web.theme.colors.white` | <Color hex="#ffffff" /> |
| `web.theme.colors.dark` | <Color hex="#010101"/> |
| `web.theme.colors.light` | <Color hex="#f5f6f7"/> |
| `web.theme.colors.gray` | <Color hex="#c1c7cc"/> |
| `web.theme.colors.red` | <Color hex="#d84b4b"/> |
| `web.theme.colors.orange` | <Color hex="#ff6b35"/> |
| `web.theme.colors.yellow` | <Color hex="#edae49"/> |
| `web.theme.colors.green` | <Color hex="#35b246"/> |
| `web.theme.colors.blue` | <Color hex="#314cb6"/> |
| `web.theme.colors.teal` | <Color hex="#35b299"/> |
| `web.theme.colors.cyan` | <Color hex="#118ab2"/> |
| `web.theme.colors.pink` | <Color hex="#f2607d"/> |
| `web.theme.colors.purple` | <Color hex="#8d30b5"/> |
##### Functional Colors
| Parameter | Default Value |
| :--------------------------- | :--------------------- |
| `web.theme.colors.primary` | <Color hex="#118ab2"/> |
| `web.theme.colors.secondary` | <Color hex="#314cb6"/> |
| `web.theme.colors.success` | <Color hex="#35b246"/> |
| `web.theme.colors.warning` | <Color hex="#edae49"/> |
| `web.theme.colors.error` | <Color hex="#ff6b35"/> |
| `web.theme.colors.danger` | <Color hex="#d84b4b"/> |
###### Example
To override hyperglass's primary color, it's recommended to override its mapped intrinsic color. For example, to override the default primary color to <Color hex="#00ffff" noText /> cyan:
```yaml filename="config.yaml"
web:
theme:
colors:
cyan: "#00ffff"
```
#### Fonts
hyperglass's fonts are loaded from [Google Fonts](https://fonts.google.com/). Any Google font name may be specified to override the default fonts.
| Parameter | Type | Default Value | Description |
| :--------------------- | :----- | :------------ | :--------------------------------------------------------------------------------------- |
| `web.theme.fonts.body` | String | Nunito | Font for all standard body text, including headings. |
| `web.theme.fonts.mono` | String | Fire Code | Font for all monospace text such as inline code or code blocks, including device output. |
##### Example
```yaml filename="config.yaml"
web:
theme:
fonts:
body: Inter
```

View file

@ -0,0 +1,135 @@
import { Callout } from "nextra/components";
import { SupportedPlatforms } from "~/components/platforms";
import { DocsButton } from "~/components/docs-button";
## Device Configuration Parameters
Each configured device may have the following parameters:
| Parameter | Type | Default Value | Description |
| :------------------ | :-------------- | :------------ | :----------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | String | | Display name of the device. |
| `description` | String | | Description of the device, displayed as a subtle label. |
| `avatar` | String | | Path to an avatar/logo image for this site. Used when [`web.location_display_mode`](/configuration/config/web-ui.mdx) is set to `gallery`. |
| `address` | String | | IPv4 address, IPv6 address, or hostname of the device. |
| `group` | String | | Group name, used to visually group devices in the UI. |
| `port` | Number | | TCP port on which to connect to the device. |
| `platform` | String | | Device platform/OS. Must be a [supported platform](/platforms.mdx). |
| `structured_output` | Boolean | True | Disable structured output for a device that supports it. |
| `directives` | List of Strings | | Enable referenced directives configured in the [directives config file](/configuration/directives.mdx). |
| `driver` | String | netmiko | Specify which driver to use for this device. Currently, only `netmiko` is supported. |
| `driver_config` | Mapping | | Mapping/dict of options to pass to the connection driver. |
| `attrs` | Mapping | | Mapping/dict of variables, as referenced in configured directives. |
| `credential` | Mapping | | Mapping/dict of a [credential configuration](/configuration/devices/credentials.mdx). |
| `http` | Mapping | | Mapping/dict of [HTTP client options](/configuration/devices/http-device.mdx), if this device is connected via HTTP. |
| `proxy` | Mapping | | Mapping/dict of [SSH proxy config](/configuration/devices/ssh-proxy.mdx) to use for this device's requests. |
<Callout type="tip">
hyperglass ships with predefined [directives](/configuration/directives.mdx) (commands) for the following [platforms](platforms.mdx):
<SupportedPlatforms />
All built in directives require that the following `attrs` be defined on each device using the directive:
| Attribute | Value |
| :-------- | :-------------------------------------------------------- |
| `source4` | IPv4 address used to source Ping and Traceroute commands. |
| `source6` | IPv6 address used to source Ping and Traceroute commands. |
**Example**
```yaml filename="devices.yaml" {5-7} copy
devices:
- name: New York, NY
address: 192.0.2.1
platform: cisco_ios
attrs:
source4: 192.0.2.1
source6: "2001:db8::1"
```
</Callout>
<Callout type="warning">
If you do not utilize IPv6 in your network, you'll need to create your own directive that only
has IPv4 commands.
</Callout>
## Examples
### Simple
```yaml filename="devices.yaml" copy
devices:
- name: New York, NY
address: 192.0.2.1
platform: cisco_ios
credential:
username: you
password: your password
- name: San Francisco, CA
address: 192.0.2.2
platform: juniper
credential:
username: you
password: your password
```
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
{" "}
<DocsButton href="/configuration/directives" /> With Directives
</h3>
In this example, an additional directive `cisco-show-lldp-neighbors` is added to the built-in directives.
```yaml filename="devices.yaml" copy {8-9}
devices:
- name: New York, NY
address: 192.0.2.1
platform: cisco_ios
credential:
username: you
password: your password
directives:
- cisco-show-lldp-neighbors
```
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
{" "}
<DocsButton href="/configuration/directives" /> Disable Built-in Directives
</h3>
In this example, _only_ the `cisco-show-lldp-neighbors` directive will be available. Built-in directives are disabled.
```yaml filename="devices.yaml" copy {8-10}
devices:
- name: New York, NY
address: 192.0.2.1
platform: cisco_ios
credential:
username: you
password: your password
directives:
- builtin: false
- cisco-show-lldp-neighbors
```
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
{" "}
<DocsButton href="/configuration/directives" /> Enable Specifc Built-in Directives
</h3>
In this example, only specified built-in directives are made available.
```yaml filename="devices.yaml" copy {8-9}
devices:
- name: New York, NY
address: 192.0.2.1
platform: cisco_ios
credential:
username: you
password: your password
directives:
- builtin: [bgp_route, traceroute]
```

View file

@ -0,0 +1,5 @@
export default {
credentials: "Credentials",
"http-device": "HTTP Device",
"ssh-proxy": "SSH Proxy",
};

View file

@ -0,0 +1,35 @@
Each device must be configured with credentials with which hyperglass can log into the device and execute commands.
## Credential Configuration
| Parameter | Type | Default Value | Description |
| :-------------------- | :----- | :------------ | :----------------------------------------------------- |
| `credential.username` | String | | Username to use for authentication to the device. |
| `credential.password` | String | | Password to use for authentication to the device. |
| `credential.key` | String | | Path to SSH key used for authentication to the device. |
### Examples
#### Username & Password
```yaml filename="devices.yaml" copy {5-7}
devices:
- name: New York, NY
address: 192.0.2.1
platform: cisco_ios
credential:
username: you
password: your password
```
#### SSH Private Key
```yaml filename="devices.yaml" copy {5-7}
devices:
- name: San Francisco, CA
address: 192.0.2.2
platform: juniper
credential:
username: you
key: /path/to/your/ssh/key
```

View file

@ -0,0 +1,85 @@
hyperglass supports collecting output from a generic HTTP endpoint.
## HTTP Configuration
| Parameter | Type | Default Value | Description |
| :---------------------- | :------ | :------------ | :--------------------------------------------------------------------------------------------------------------------- |
| `http.attribute_map` | Mapping | | Mapping/dict of hyperglass query fields as keys, and hyperglass query field replacements as values. |
| `http.basic_auth` | Mapping | | If basic authentication is required, provide a mapping/dict containing the basic authentication username and password. |
| `http.body_format` | String | json | Body format, options are `json` `yaml` `xml` `text` |
| `http.follow_redirects` | Boolean | `false` | Follow HTTP redirects from server. |
| `http.headers` | Mapping | | Mapping/dict of http headers to append to requests. |
| `http.method` | String | GET | HTTP method to use for requests. |
| `http.path` | String | / | HTTP URI/Path. |
| `http.query` | Mapping | | Mapping/Dict of URL Query Parameters. |
| `http.retries` | Number | 0 | Number of retries to perform before request failure. |
| `http.scheme` | String | https | HTTP schema, must be `http` or `https` |
| `http.source` | String | | Request source IP address. |
| `http.ssl_ca` | String | | Path to SSL CA certificate file for SSL validation. |
| `http.ssl_client` | String | | Path to client SSL certificates for request. |
| `http.timeout` | Number | 5 | Request timeout in seconds. |
| `http.verify_ssl` | Boolean | `true` | If `false`, invalid certificates for HTTPS hosts will be ignored. |
### Example
#### Basic
The following example will send an HTTP POST request to `https://192.0.2/path/to/query/device` with HTTP basic authentication, and will not verify the SSL certificate.
```yaml filename="devices.yaml" copy
devices:
- name: New York, NY
address: 192.0.2.1
http:
path: /path/to/query/device
method: POST
verify_ssl: false
basic_auth:
username: you
password: your password
```
Given the following hyperglass query:
| Field | Value |
| :------------- | :------------------ |
| Query Target | `192.0.2.0/24` |
| Query Location | `your_location` |
| Query Type | `example_directive` |
The body of the request will be:
```json
{
"query_target": "192.0.2.0/24",
"query_location": "your_location",
"query_type": "example_directive"
}
```
#### Non-HTTPS Request
The following example will send an HTTP GET request to `http://192.0.2.1/path/to/query/device`:
```yaml filename="devices.yaml" {6} copy
devices:
- name: New York, NY
address: 192.0.2.1
http:
path: /path/to/query/device
scheme: http
```
#### Header Authentication
The following example will send an HTTP GET request to `https://192.0.2.1/path/to/query/device` with an `Authorization` header:
```yaml filename="devices.yaml" {6-7} copy
devices:
- name: New York, NY
address: 192.0.2.1
http:
path: /path/to/query/device
headers:
Authorization: your special token
```

View file

@ -0,0 +1,30 @@
In cases where access to the devices is secured behind a "jump box" or other intermediary server/device, hyperglass can use SSH local port forwarding to SSH to an intermedary device first, and then to the device.
## SSH Proxy Configuration
| Parameter | Type | Default Value | Description |
| :----------------- | :------ | :------------ | :----------------------------------------------------------------------------------- |
| `proxy.address` | String | | IPv4 address, IPv6 address, or hostname of SSH proxy. |
| `proxy.port` | Number | 22 | TCP port to use for connecting to the SSH proxy. |
| `proxy.platform` | String | linux_ssh | Currently, only `linux_ssh` is supported. |
| `proxy.credential` | Mapping | | Mapping/dict of a [credential configuration](/configuration/config/credentials.mdx). |
### Examples
#### Use an SSH Proxy When Connecting to a Device
```yaml filename="devices.yaml" copy
devices:
- name: New York, NY
address: 192.0.2.1
credential:
username: you
password: your password
proxy:
address: 203.0.113.1
credential:
username: your proxy username
password: your proxy password
```
In the above example, the credentials `your proxy username`/`your proxy password` will be used to authenticate from the hyperglass server to the SSH proxy, and the credentials `you`/`your password` will be used to authentiate from the SSH proxy to the device.

View file

@ -0,0 +1,186 @@
import { Callout } from "nextra/components";
## What is a directive?
<Callout type="tip">
A <strong style={{color: "#ff5e5b"}}>directive</strong> is a defined configuration for one or more **commands** to run on a device. For example, a BGP Route query is a built-in directive. A directive defines:
- What command (or commands) to run on the device
- Type of UI field, text input or select
- If the field can accept multiple values
- Help information to show about the directive
- Validation rules
</Callout>
Each directive has the following options:
| Parameter | Type | Default Value | Description |
| :------------------- | :-------------- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | String | | Display name of the directive. |
| `rules` | List of Rules | | List of [rule configs](#rules) |
| `field` | Mapping | | Mapping/dict of [fields config](#fields) |
| `info` | String | | File path to markdown-formatted help information about the directive. |
| `plugins` | List of Strings | | List of plugin names to use with this directive. |
| `groups` | List of Strings | | List of names by which directives are grouped in the UI. |
| `multiple` | Boolean | `false` | Command supports receiving multiple values. For example, Cisco IOS's `show ip bgp community` accepts multiple communities as arguments. |
| `multiple_separator` | String | `" "` | String by which multiple values are separated. For example, a list of values `[65001, 65002, 65003]` would be rendered as `65001 65002 65003` for when the command is run. |
## Rules
A rule is a way of saying "if a query target matches the rule's conditions, run this command".
| Parameter | Type | Default Value | Description |
| :---------- | :-------------- | :------------ | :--------------------------------------------------------------------------------------------- |
| `condition` | String | | Regular expression to match or IP prefix in which the value being evaluated must be contained. |
| `action` | String | permit | `permit` or `deny` the directive target when this rule is matched. |
| `commands` | List of Strings | | Commands to run when this rule matches. `{target}` is replaced with the query target. |
### IP Rule
| Parameter | Type | Default Value | Description |
| :------------------ | :------ | :------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ge` | Number | 0 | Prefix length greater than defined will be matched. |
| `le` | Number | 32,128 | `32` for IPv4 evaluations, `128` for IPv6 evaluations. Prefix length less than defined will be matched. |
| `allow_reserved` | Boolean | `false` | Allow reserved ([RFC1918](https://www.rfc-editor.org/rfc/rfc1918), [RFC5735](https://www.rfc-editor.org/rfc/rfc5735), [RFC5737](https://www.rfc-editor.org/rfc/rfc5737.html), etc.) addresses to pass validation. |
| `allow_unspecified` | Boolean | `false` | Allow unspecified addresses (`0.0.0.0` `::`) to pass validation. |
| `allow_loopback` | Boolean | `false` | Allow [loopback addresses](https://www.rfc-editor.org/rfc/rfc1700.html) (`127.0.0.0/8` `::1`) to pass validation. |
#### Examples
##### Require IPv4 Queries between /8 and /24
```yaml filename="directives.yaml" {5-6} /{target} {mask}/ copy
your-directive:
name: IP Route
rules:
- condition: 0.0.0.0/0
ge: 8
le: 24
command: "show ip route {target} {mask}"
```
Given a query target of 198.18.0.0/15, the command run on the device would be:
```none /198.18.0.0 255.254.0.0/
show ip route 198.18.0.0 255.254.0.0
```
##### Deny a Specific Prefix
```yaml filename="directives.yaml" {5} copy
your directive:
name: BGP Route
rules:
- condition: "192.0.2.0/24"
action: deny
- condition: "0.0.0.0/0"
command: "show ip bgp {target}"
```
In this example, a query of any IP address or prefix contained within 192.0.2.0/24 will result in an error.
##### Run Multiple Commands
```yaml filename="directives.yaml" /{target}/ {6-7} copy
your-directive:
name: BGP Communities
rules:
- condition: "65000:[0-9]+"
commands:
- "show route table inet.0 community {target} detail"
- "show route table inet6.0 community {target} detail"
```
In this example, a query of `65000:1` would result in the following commands being sent to the device:
```none /65000:1/
show route table inet.0 community 65000:1 detail
show route table inet6.0 community 65000:1 detail
```
The output for both commands will be shown as the query result.
### Regex Validation
To validate input by regex pattern, just specify a regex pattern as the `condition`
```yaml filename="directives.yaml" copy
your-directive:
name: DNS Query
rules:
- condition: '^.+\.yourdomain\.com$'
```
### No Validation
```yaml filename="directives.yaml" /{target}/ copy {4}
your-directive:
name: IP Route
rules:
- condition: null
command: show ip route {target}
```
In this example, any query would pass, regardless of query input. For instance, if a user selected this directive/query type and queried `your mom`, the real command sent to the device will be:
```none /your mom/
show ip route your mom
```
## Fields
### Text Input
| Parameter | Type | Default Value | Description |
| :------------ | :----- | :------------ | :---------------------------------------------------- |
| `description` | String | | Field description, displayed as a label or help text. |
| `validation` | String | | Regex pattern to validate text input. |
### Select
| Parameter | Type | Default Value | Description |
| :------------ | :-------------- | :------------ | :---------------------------------------------------- |
| `description` | String | | Field description, displayed as a label or help text. |
| `options` | List of Options | | |
#### Options
Each select option uses the following schema:
| Parameter | Type | Default Value | Description |
| :------------ | :----- | :------------ | :------------------------------------------------------- |
| `description` | String | | Field description, displayed as a label or help text. |
| `name` | String | | If specified, will be used as the option's display name. |
| `value` | String | | Option value sent to the device. |
### Examples
Example of a text directive expecting a string value matching a regex pattern:
```yaml filename="directives.yaml" copy {6-7}
your-directive:
name: IP Route
rules:
- condition: null
command: show ip route {target}
field:
validation: '[0-9a-f\.\:]+'
```
Example of a select directive:
```yaml filename="directives.yaml" copy {6-12}
your-directive:
name: BGP Community
rules:
- condition: null
command: show ip bgp community {target}
field:
options:
- value: "65001:1"
description: Provider A Routes
- value: "65001:2"
description: Provider B Routes
```

Some files were not shown because too many files have changed in this diff Show more