Skip to content

Commit

Permalink
Enable kernel.version on Windows
Browse files Browse the repository at this point in the history
Previously, this value was guarded against running on Windows
because it called the `uname` command which is unlikely to
be there.

This change now sets the value from gopsutil, which might
well be an empty string.

Signed-off-by: Dave Walker (Daviey) <[email protected]>
  • Loading branch information
Daviey committed Mar 1, 2017
1 parent 5875bc1 commit 5d484dc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions client/fingerprint/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ func (f *HostFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (b
node.Attributes["os.version"] = hostInfo.PlatformVersion

node.Attributes["kernel.name"] = runtime.GOOS
node.Attributes["kernel.version"] = ""

if runtime.GOOS != "windows" {
node.Attributes["kernel.version"] = hostInfo.KernelVersion
}
node.Attributes["kernel.version"] = hostInfo.KernelVersion

node.Attributes["unique.hostname"] = hostInfo.Hostname

Expand Down

0 comments on commit 5d484dc

Please sign in to comment.