From db27b85033586b07993550aada2d685284f2db85 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Mon, 21 Sep 2015 13:53:49 -0700 Subject: [PATCH] agent: adding Atlas and Region to output --- command/agent/command.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/command/agent/command.go b/command/agent/command.go index 3dc49b7de..41ebd3953 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -262,6 +262,13 @@ func (c *Command) Run(args []string) int { info["client"] = strconv.FormatBool(config.Client.Enabled) info["log level"] = config.LogLevel info["server"] = strconv.FormatBool(config.Server.Enabled) + info["region"] = fmt.Sprintf("%s (DC: %s)", config.Region, config.Datacenter) + if config.Atlas != nil && config.Atlas.Infrastructure != "" { + info["atlas"] = fmt.Sprintf("(Infrastructure: '%s' Join: %v)", + config.Atlas.Infrastructure, config.Atlas.Join) + } else { + info["atlas"] = "" + } // Sort the keys for output infoKeys := make([]string, 0, len(info))