Configuration - nuclearfurnace/oscilloscope GitHub Wiki

Preface

All configuration is based off of Archaius, and so we use config.properties. You can edit this file ahead of time, and move it into the resources folder so it's present when building a fat JAR. Alternatively, you can specify the path to it on the command line so that it can be polled for updates.

More information can be found here: Using a local file as the configuration source. It is also possible to point Archaius as database sources, etc, but we won't cover that here.

In general, the format to follow is:

name.of.key = value

Oscilloscope Configuration

oscilloscope.discovery.providers

Type: string list, comma-separated

Default: empty

Controls which discovery providers are loaded. A discovery provider is a particular method of finding available clusters: ELBs, Consul, statically configured, etc.

Available providers:

  • static
  • consul
  • elb

Example usage:

oscilloscope.discovery.providers = consul,elb

oscilloscope.discovery.providers.static

Type: string list, comma-separated

Default: empty

Configures a list of static clusters to be exposed. These individual clusters are specified further by creating a list of hostname/port values using a configuration value in the format of oscilloscope.discovery.providers.static.<cluster name>. That configuration value takes a comma-separated list of entries in the form of <hostname/IP>:<port>. Port cannot be omitted.

Example usage:

oscilloscope.discovery.providers.static = svc-prod,svc-staging
oscilloscope.discovery.providers.static.svc-prod = 127.0.0.1:8080,127.0.0.1:8081
oscilloscope.discovery.providers.static.svc-staging = 127.0.0.1:8082,127.0.0.1:8083

oscilloscope.discovery.providers.static.uri_template

Type: string

Default: http://{HOSTNAME}:{PORT}/hystrix.stream

Configures the URL format to use when trying to reach out to each individual Hystrix endpoint in a cluster. {HOSTNAME} and {PORT} are the only two replacement tokens available.

Example usage:

oscilloscope.discovery.providers.static.uri_template = https://{HOSTNAME}/svc/hystrix.stream

oscilloscope.discovery.providers.consul.uri_template

Type: string

Default: http://{HOSTNAME}:{PORT}/hystrix.stream

Configures the URL format to use when trying to reach out to each individual Hystrix endpoint in a cluster. {HOSTNAME} and {PORT} are the only two replacement tokens available.

Example usage:

oscilloscope.discovery.providers.consul.uri_template = https://{HOSTNAME}/svc/hystrix.stream

oscilloscope.discovery.providers.elb.uri_template

Type: string

Default: http://{HOSTNAME}:{PORT}/hystrix.stream

Configures the URL format to use when trying to reach out to each individual Hystrix endpoint in a cluster. {HOSTNAME} and {PORT} are the only two replacement tokens available.

Example usage:

oscilloscope.discovery.providers.elb.uri_template = https://{HOSTNAME}/svc/hystrix.stream

oscilloscope.discovery.providers.elb.use_private_address

Type: boolean

Default: true

Configures whether or not Oscilloscope talks to the individual Hystrix endpoints in an ELB over their public or private address. This might be pertinent to you if, for some reason, you're running Oscilloscope in EC2-Classic and your ELBs/instances in VPC, or vise versa.

Example usage:

oscilloscope.discovery.providers.elb.use_private_address = false

oscilloscope.discovery.providers.elb.tag_name

Type: string

Default: features

Configures the name of the tag to look for on ELBs. For non-static providers, we use some piece of metadata, like tags, to figure out if a resource is Hystrix "enabled". For ELBs, we look for a specific tag with the presence of the string hystrix in its value.

Example usage:

oscilloscope.discovery.providers.elb.tag_name = svc_features
⚠️ **GitHub.com Fallback** ⚠️