From aa9bee1fc851ea44568afaedd2804e440443c759 Mon Sep 17 00:00:00 2001 From: Michel Vocks Date: Mon, 2 Dec 2019 09:26:46 +0100 Subject: [PATCH] Add enable_hostname_label option to telementry stanza (#7902) --- command/server.go | 1 + command/server/config.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/command/server.go b/command/server.go index 8a267a08b87e..10f93b50758b 100644 --- a/command/server.go +++ b/command/server.go @@ -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 diff --git a/command/server/config.go b/command/server/config.go index d558019adf25..41f9150f2bce 100644 --- a/command/server/config.go +++ b/command/server/config.go @@ -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.