Query Settings

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

ParameterTypeDefaultDescription
enableBooleantrueEnable or disable the BGP Route query type.
display_nameString'BGP Route'Text displayed for the BGP Route query type in the UI.

Example

hyperglass.yaml
queries:
bgp_route:
display_name: BGP Route
enable: true

bgp_community

ParameterTypeDefaultDescription
enableBooleantrueEnable or disable the BGP Community query type.
display_nameString'BGP Community'Text displayed for the BGP Community query type in the UI.
modeString'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.
communitiesBGP Community Definitions for select mode.
patternBGP Community Regular Expression 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:

ParameterTypeDescriptionExample
communityStringCommunity value'64496:1001'
display_nameStringCommunity display name'64496:1001'
descriptionStringCommunity description'North America Routes'

Example

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) communities, Extended AS communities, and Large communities.

ParameterTypeDefaultDescription
decimalString'^[0-9]{1,10}$'Regular expression pattern for validating decimal type BGP Community strings.
extended_asString'^([0-9]{0,5})\:([0-9]{1,5})$'Regular expression pattern for validating extended AS type BGP Community strings, e.g. 65000:1
largeString'^([0-9]{1,10})\:([0-9]{1,10})\:[0-9]{1,10}$'Regular expression pattern for validating large community strings, e.g. 65000:65001:65002

Example

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

ParameterTypeDefaultDescription
enableBooleantrueEnable or disable the BGP AS Path query type.
display_nameString'BGP AS Path'Text displayed for the BGP AS Path query type in the UI.
patternBGP AS Path Settings & Regular Expression Patterns

Example

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.

ParameterTypeDefaultDescription
modeString'asplain'Set ASN display mode. This field is dependent on how your network devices are configured.
Must be asplain or asdot
asplainString'^(\^|^\_)(\d+\_|\d+\$|\d+\(\_\.\+\_\))+$'Regular expression pattern for validating asplain type BGP AS Path queries.
asdotString'^(\^|^\_)((\d+\.\d+)\_|(\d+\.\d+)\$|(\d+\.\d+)\(\_\.\+\_\))+$'Regular expression pattern for validating asdot type BGP AS Path queries.

ping

ParameterTypeDefaultDescription
enableBooleantrueEnable or disable the Ping query type.
display_nameString'Ping'Text displayed for the Ping query type in the UI.

Example

hyperglass.yaml
queries:
ping:
display_name: Ping
enable: true

traceroute

ParameterTypeDefaultDescription
enableBooleantrueEnable or disable the Traceroute query type.
display_nameString'Traceroute'Text displayed for the Traceroute query type in the UI.

Example

hyperglass.yaml
queries:
traceroute:
display_name: Traceroute
enable: true