Enable kernel.version on Windows
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@daviey.com>
This commit is contained in:
parent
090e760928
commit
4958154640
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue