Skip to content

Tags: elastic/go-sysinfo

Tags

v1.15.4

Toggle v1.15.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(fqdn): avoid loopback interfaces (#269) This PR improves the correctness of the `FQDNWithContext` function, which attempts to determine the FQDN of the current host. The main changes are: - **Avoid returning loopback addresses**: When performing reverse DNS lookups on IPs, the function now skips loopback interfaces (e.g., `127.0.0.1`, `::1`) to avoid returning `localhost` as FQDN. - **Safe fallback to hostname**: If all DNS-based methods fail but no errors were encountered, the function now safely returns the original hostname. - **`resolver` Interface**: Introduced a resolver interface to wrap the DNS lookup methods to allow it to be mocked for testing. Fixes #224

v1.15.3

Toggle v1.15.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: bump go-windows to 1.0.2 (#255) Update elastic/go-windows from 1.0.0 to 1.0.2 to break the transitive dependency on github.com/pkg/errors.

v1.15.2

Toggle v1.15.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: do not leak darwin provider file to other oses (#254) ensure providers/darwin files have _darwin suffix do not leak file to other oses causing plist dependency to pollute the module graph

v1.15.1

Toggle v1.15.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix linux kernel version string parsing when derermining kernel host … …architecture (#252) Improve native architecture detection on Linux. NativeArchitecture() was empty on RedHat with no `/proc/sys/kernel/arch` and `/proc/version` ``` Linux version 5.14.0-547.el9.x86_64 ([mockbuild@x86-05.stream.rdu2.redhat.com](mailto:mockbuild@x86-05.stream.rdu2.redhat.com)) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2), GNU ld version 2.35.2-59.el9) #1 SMP PREEMPT_DYNAMIC Mon Dec 30 20:10:38 UTC 2024 ``` The fallback of reading `/proc/version` certainly should take into account both synonyms for `AMD64` and `ARM64` architectures.

v1.15.0

Toggle v1.15.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fetch all ip addresses in a single stdlib call (#246) When fetching ip addresses for the host, we fetch all the network interfaces, and then ip addresses for each interface. The latter call is surprisingly expensive on unix, as it involves opening a netlink socket, sending a request for routing information, and receiving and parsing the response. If the host has a lot of network interfaces, this can eat surprising amounts of memory - I got in the order of 10 MB on a Kubernetes Node with 100 Pods. See elastic/elastic-agent#5835 (comment) for some heap profiles from elastic-agent. Instead, get all the addresses in a single stdlib call. We don't actually care about which interface each ip address is attached to, we just want all of them. I've tested this in the real world scenario discussed in elastic/elastic-agent#5835, not sure how to include a self-contained test in this repo.

v1.14.2

Toggle v1.14.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update github.com/prometheus/procfs to v0.15.1. (#242) ## Overview Updates the dependency of github.com/prometheus/procfs to v0.15.1. ## Why? Required to update the same dependency in github.com/elastic/beats.

v1.14.1

Toggle v1.14.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Do not lower-case FQDN (#231) This PR reverts #180 `Host.FQDNWithContext()` and the deprecated `Host.FQDN()` now return the FQDN as is; it isn't lowercased anymore. This also affects `types.HostInfo#Hostname` which, when it's the FQDN, won't be lowercased. Complying with ECS for `host.name` and `host.hostname` (https://www.elastic.co/guide/en/ecs/current/ecs-host.html#field-host-name) should not be handled by go-sysinfo. The users of go-sysinfo should ensure compliance with ECS if necessary.

v1.14.0

Toggle v1.14.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Use errors.Join (#217) Replace usages of github.com/joeshaw/multierror with `errors.Join`, which was added to the stdlib in Go 1.20. Closes #216

v1.13.1

Toggle v1.13.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
HostInfo.NativeArchitecture support older Windows builds (#201) Function IsWow64Process2 was introduced in Windows 10 version 1709, so ensure that ERROR_PROC_NOT_FOUND is handled on earlier versions. NOTE: Only x86 (32 bit) applications can be run on Windows 10 on ARM. Windows 11 on ARM also supports x86_64 (64 bit) applications.

v1.13.0

Toggle v1.13.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
adds HostInfo.NativeArchitecture (#200)