diff --git a/hyperglass/configuration/commands.yaml.example b/hyperglass/configuration/commands.yaml.example new file mode 100644 index 0000000..4e74c2d --- /dev/null +++ b/hyperglass/configuration/commands.yaml.example @@ -0,0 +1,78 @@ +--- +# cisco_ios: +# ipv4_default: +# bgp_aspath: show bgp ipv4 unicast quote-regexp "{target}" +# bgp_community: show bgp ipv4 unicast community {target} +# bgp_route: show bgp ipv4 unicast {target} | exclude pathid:|Epoch +# ping: ping {target} repeat 5 source {source} +# traceroute: traceroute {target} timeout 1 probe 2 source {source} +# ipv4_vrf: +# bgp_aspath: show bgp vpnv4 unicast vrf {vrf} quote-regexp "{target}" +# bgp_community: show bgp vpnv4 unicast vrf {vrf} community {target} +# bgp_route: show bgp vpnv4 unicast vrf {vrf} {target} +# ping: ping vrf {vrf} {target} repeat 5 source {source} +# traceroute: traceroute vrf {vrf} {target} timeout 1 probe 2 source {source} +# ipv6_default: +# bgp_aspath: show bgp ipv6 unicast quote-regexp "{target}" +# bgp_community: show bgp ipv6 unicast community {target} +# bgp_route: show bgp ipv6 unicast {target} | exclude pathid:|Epoch +# ping: ping {afi} {target} repeat 5 source {source} +# traceroute: traceroute ipv6 {target} timeout 1 probe 2 source {source} +# ipv6_vrf: +# bgp_aspath: show bgp vpnv6 unicast vrf {vrf} quote-regexp "{target}" +# bgp_community: show bgp vpnv6 unicast vrf {vrf} community {target} +# bgp_route: show bgp vpnv6 unicast vrf {vrf} {target} +# ping: ping vrf {vrf} {target} repeat 5 source {source} +# traceroute: traceroute vrf {vrf} {target} timeout 1 probe 2 source {source} + +# cisco_xr: +# dual: +# bgp_aspath: show bgp all unicast regexp {target} | utility egrep -v "\(BGP |Table|Non-stop\)" +# bgp_community: show bgp all unicast community {target} | utility egrep -v "\(BGP|Table |Non-stop\)" +# ipv4: +# bgp_route: show bgp ipv4 unicast {target} | util egrep \(BGP routing table entry|Path\#|aggregated by|Origin |Community:|validity| from \) +# ping: ping ipv4 {target} count 5 source {src_addr_ipv4} +# traceroute: traceroute ipv4 {target} timeout 1 probe 2 source {source} +# ipv6: +# bgp_route: show bgp ipv6 unicast {target} | util egrep \(BGP routing table entry|Path\#|aggregated by|Origin |Community:|validity| from \) +# ping: ping ipv6 {target} count 5 source {src_addr_ipv6} +# traceroute: traceroute ipv6 {target} timeout 1 probe 2 source {source} + +# huawei: +# ipv4_default: +# bgp_aspath: display bgp routing-table regular-expression {target} +# bgp_community: display bgp routing-table regular-expression {target} +# bgp_route: display bgp routing-table {target} +# ping: ping -c 5 -a {source} {target} +# traceroute: tracert -q 2 -f 1 -a {source} {target} +# ipv4_vrf: +# bgp_aspath: display bgp vpnv4 vpn-instance {vrf} routing-table regular-expression {target} +# bgp_community: display bgp vpnv4 vpn-instance {vrf} routing-table regular-expression{target} +# bgp_route: display bgp vpnv4 vpn-instance {vrf} routing-table {target} +# ping: ping -vpn-instance {vrf} -c 5 -a {source} {target} +# traceroute: tracert -q 2 -f 1 -vpn-instance {vrf} -a {source} {target} +# ipv6_default: +# bgp_aspath: display bgp ipv6 routing-table regular-expression {target} +# bgp_community: display bgp ipv6 routing-table community {target} +# bgp_route: display bgp ipv6 routing-table {target} +# ping: ping ipv6 -c 5 -a {source} {target} +# traceroute: tracert ipv6 -q 2 -f 1 -a {source} {target} +# ipv6_vrf: +# bgp_aspath: display bgp vpnv6 vpn-instance {vrf} routing-table regular-expression {target} +# bgp_community: display bgp vpnv6 vpn-instance {vrf} routing-table regular-expression {target} +# bgp_route: display bgp vpnv6 vpn-instance {vrf} routing-table {target} +# ping: ping vpnv6 vpn-instance {vrf} -c 5 -a {source} {target} +# traceroute: tracert -q 2 -f 1 vpn-instance {vrf} -a {source} {target} + +# juniper: +# dual: +# bgp_aspath: show route protocol bgp aspath-regex {target} +# bgp_community: show route protocol bgp community {target} +# ipv4: +# bgp_route: show route protocol bgp table inet.0 {target} detail +# ping: ping inet {target} count 5 source {src_addr_ipv4} +# traceroute: traceroute inet {target} wait 1 source {source} +# ipv6: +# bgp_route: show route protocol bgp table inet6.0 {target} detail +# ping: ping inet6 {target} count 5 source {src_addr_ipv6} +# traceroute: traceroute inet6 {target} wait 1 source {source} \ No newline at end of file diff --git a/hyperglass/configuration/devices.yaml.example b/hyperglass/configuration/devices.yaml.example new file mode 100644 index 0000000..31a0feb --- /dev/null +++ b/hyperglass/configuration/devices.yaml.example @@ -0,0 +1,46 @@ +--- +router: + edge01_hnl01: + address: 192.0.2.1 + commands: cisco_ios + credential: default + display_name: New York, NY + location: nyc01 + network: primary + nos: cisco_ios + port: 22 + proxy: null + vrfs: + default: + ipv4: + source_address: 192.0.2.1 + ipv6: + source_address: 2001:db8::1 +credential: + default: + username: hyperglass + password: secret + +proxy: + servername: + address: 10.0.0.1 + port: 22 + username: hyperglass + password: secret + nos: linux_ssh + ssh_command: ssh -l {username} {host} | tee /home/hyperglass/sshlog.log + +network: + primary: + display_name: Company Network + +vrf: + default: + access_list: + - deny: 192.168.0.0/16 + - deny: 172.16.0.0/12 + - deny: 2001:db8::/32 + - allow: 0.0.0.0/0 + display_name: Global + ipv4: true + ipv6: true \ No newline at end of file diff --git a/hyperglass/configuration/hyperglass.yaml.example b/hyperglass/configuration/hyperglass.yaml.example new file mode 100644 index 0000000..6662e69 --- /dev/null +++ b/hyperglass/configuration/hyperglass.yaml.example @@ -0,0 +1,127 @@ +--- +# general: +# debug: false +# google_analytics: '' +# org_name: The Company +# primary_asn: '65001' +# redis_host: localhost +# redis_port: 6379 +# request_timeout: 30 +# requires_ipv6_cidr: +# - cisco_ios +# - cisco_nxos + +# branding: +# danger: '#a21024' +# dark: '#383541' +# light: '#fbfffe' +# primary: '#40798c' +# secondary: '#330036' +# warning: '#eec643' +# credit: +# enable: true +# font: +# mono: Fira Code +# primary: Nunito +# help_menu: +# enable: true +# logo: +# favicons: ui/images/favicons/ +# path: ui/images/hyperglass-dark.png +# width: 384 +# peering_db: +# enable: true +# site_name: hyperglass +# terms: +# enable: true +# text: +# bgp_aspath: BGP AS Path +# bgp_community: BGP Community +# bgp_route: BGP Route +# error404: +# button: Home +# subtitle: '{uri} isn''t a thing' +# title: Error +# error500: +# button: Home +# subtitle: Something Went Wrong +# title: Error +# error504: +# message: Unable to reach {target} +# info: Help +# peeringdb: PeeringDB +# ping: Ping +# query_location: Location +# query_target: Target +# query_type: Query +# subtitle: AS{primary_asn} +# terms: Terms +# title: hyperglass +# title_mode: logo_only +# traceroute: Traceroute +# vrf: VRF + +# features: +# bgp_aspath: +# enable: true +# regex: +# asdot: ^(\^|^\_)((\d+\.\d+)\_|(\d+\.\d+)\$|(\d+\.\d+)\(\_\.\+\_\))+$ +# asplain: ^(\^|^\_)(\d+\_|\d+\$|\d+\(\_\.\+\_\))+$ +# mode: asplain +# bgp_community: +# enable: true +# regex: +# 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}$ +# bgp_route: +# enable: true +# cache: +# redis_id: 0 +# show_text: true +# text: Results will be cached for 2 minutes. +# timeout: 120 +# max_prefix: +# enable: false +# ipv4: 24 +# ipv6: 64 +# message: Prefix length must be smaller than /{m}. {i} is too specific. +# ping: +# enable: true +# rate_limit: +# query: +# button: Try Again +# message: Query limit of 5 per minute reached. Please wait one minute and try +# again. +# period: minute +# rate: 5 +# title: Query Limit Reached +# redis_id: 1 +# site: +# button: Try Again +# period: minute +# rate: 60 +# subtitle: You have accessed this site more than 60 times in the last minute. +# title: Limit Reached +# traceroute: +# enable: true + +# 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}' +# directed_cidr: '{query_type} queries can not be in CIDR format.' +# 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.' +# max_prefix: Prefix length must be shorter than /{max_length}. {target} is too specific. +# no_input: '{field} must be specified.' +# no_location: A location must be selected. +# no_matching_vrfs: No VRFs Match +# no_query_type: A query type must be specified. +# noresponse_error: No response. +# request_timeout: Request timed out. +# requires_ipv6_cidr: '{device_name} requires IPv6 BGP lookups to be in CIDR notation.' +# vrf_not_associated: VRF {vrf_name} is not associated with {device_name}. \ No newline at end of file