Add enable_hostname_label option to telementry stanza (#7902)

This commit is contained in:
Michel Vocks 2019-12-02 09:26:46 +01:00 committed by GitHub
parent 66bb372fca
commit beeec81df7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -2270,6 +2270,7 @@ func (c *ServerCommand) setupTelemetry(config *server.Config) (*metricsutil.Metr
metricsConf := metrics.DefaultConfig("vault")
metricsConf.EnableHostname = !telConfig.DisableHostname
metricsConf.EnableHostnameLabel = telConfig.EnableHostnameLabel
// Configure the statsite sink
var fanout metrics.FanoutSink

View file

@ -166,7 +166,8 @@ type Telemetry struct {
StatsiteAddr string `hcl:"statsite_address"`
StatsdAddr string `hcl:"statsd_address"`
DisableHostname bool `hcl:"disable_hostname"`
DisableHostname bool `hcl:"disable_hostname"`
EnableHostnameLabel bool `hcl:"enable_hostname_label"`
// Circonus: see https://github.com/circonus-labs/circonus-gometrics
// for more details on the various configuration options.