Add the host tag always. Fixes #4
This commit is contained in:
2
agent.go
2
agent.go
@@ -46,13 +46,13 @@ func NewAgent(config *Config) (*Agent, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
agent.Hostname = hostname
|
agent.Hostname = hostname
|
||||||
|
}
|
||||||
|
|
||||||
if config.Tags == nil {
|
if config.Tags == nil {
|
||||||
config.Tags = map[string]string{}
|
config.Tags = map[string]string{}
|
||||||
}
|
}
|
||||||
|
|
||||||
config.Tags["host"] = agent.Hostname
|
config.Tags["host"] = agent.Hostname
|
||||||
}
|
|
||||||
|
|
||||||
return agent, nil
|
return agent, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user