Add option to set nodename instead of hostname on telemetry values

This commit is contained in:
Jorge Marey
2016-12-13 22:10:39 +01:00
parent fccf115c56
commit a39cebb744
5 changed files with 11 additions and 0 deletions

View File

@@ -621,6 +621,10 @@ func (c *Command) setupTelemetry(config *Config) error {
metricsConf := metrics.DefaultConfig("nomad")
metricsConf.EnableHostname = !telConfig.DisableHostname
if telConfig.UseNodeName {
metricsConf.HostName = config.NodeName
metricsConf.EnableHostname = true
}
// Configure the statsite sink
var fanout metrics.FanoutSink