From 902c3973db81e69e9a6f4205e2ac5af24c123a9a Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 20 Oct 2016 17:46:04 -0700 Subject: [PATCH] Print the version and client node ID --- client/client.go | 1 + command/agent/command.go | 1 + 2 files changed, 2 insertions(+) diff --git a/client/client.go b/client/client.go index dfc19a25c..18825f873 100644 --- a/client/client.go +++ b/client/client.go @@ -257,6 +257,7 @@ func NewClient(cfg *config.Config, consulSyncer *consul.Syncer, logger *log.Logg // Start collecting stats go c.collectHostStats() + c.logger.Printf("[INFO] client: Node ID %q", c.Node().ID) return c, nil } diff --git a/command/agent/command.go b/command/agent/command.go index d54b1d7a3..f66924763 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -446,6 +446,7 @@ func (c *Command) Run(args []string) int { // Compile agent information for output later info := make(map[string]string) + info["version"] = fmt.Sprintf("%s%s", config.Version, config.VersionPrerelease) info["client"] = strconv.FormatBool(config.Client.Enabled) info["log level"] = config.LogLevel info["server"] = strconv.FormatBool(config.Server.Enabled)