diff --git a/Changes b/Changes index e67ec5e..d80124d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ This file documents the revision history for the SNClient+ agent. +next: + - fix check_os_version windows build version + 0.25 Fri Jun 14 14:34:25 CEST 2024 - update node exporter to 1.8.1 - migrate v3 to github.com/shirou/gopsutil/v4 diff --git a/pkg/snclient/check_os_version.go b/pkg/snclient/check_os_version.go index 8b58706..7b66ebb 100644 --- a/pkg/snclient/check_os_version.go +++ b/pkg/snclient/check_os_version.go @@ -50,6 +50,13 @@ func (l *CheckOSVersion) Check(ctx context.Context, _ *Agent, check *CheckData, return nil, fmt.Errorf("failed to get platform information: %s", err.Error()) } + if runtime.GOOS == "windows" { + version, err = host.KernelVersionWithContext(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get build information: %s", err.Error()) + } + } + check.listData = []map[string]string{{ "platform": platform, "family": family,