From 1a3abf7f3f1a0e9651ea5ce36667f0caec0e8f2d Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 8 Nov 2025 10:25:01 +0000 Subject: [PATCH] Fix pulse-host-agent temperature collection on all Linux distros (related to #661) The temperature collection in pulse-host-agent was broken on all Linux distributions due to an incorrect platform check. Root cause: - collectTemperatures() checked `if a.platform != "linux"` at agent.go:316 - normalisePlatform() returns the raw distro name from gopsutil (debian, ubuntu, pve) - This caused temperature collection to be skipped on ALL Linux hosts Fix: - Changed check to `if runtime.GOOS != "linux"` which correctly identifies Linux - runtime.GOOS returns "linux" regardless of distribution Also fixed documentation typo: - Changed "Servers tab" to "Hosts tab" in HOST_AGENT.md and TEMPERATURE_MONITORING.md - Reported by user in issue #661 comments Testing: - Verified build succeeds - Confirmed runtime.GOOS returns "linux" on Linux systems Related to #661 --- docs/HOST_AGENT.md | 2 +- docs/TEMPERATURE_MONITORING.md | 2 +- internal/hostagent/agent.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/HOST_AGENT.md b/docs/HOST_AGENT.md index 907e3bb..5e354ef 100644 --- a/docs/HOST_AGENT.md +++ b/docs/HOST_AGENT.md @@ -17,7 +17,7 @@ The host agent automatically collects temperature data on Linux systems with lm- - **NVMe Drive Temperatures**: SSD thermal data - **GPU Temperatures**: AMD and NVIDIA GPU sensors -Temperature data appears in the **Servers** tab alongside other host metrics. This is particularly useful for monitoring Proxmox hosts when running Pulse in a VM (where the sensor proxy socket cannot cross VM boundaries). +Temperature data appears in the **Hosts** tab alongside other host metrics. This is particularly useful for monitoring Proxmox hosts when running Pulse in a VM (where the sensor proxy socket cannot cross VM boundaries). **Requirements:** - Linux operating system diff --git a/docs/TEMPERATURE_MONITORING.md b/docs/TEMPERATURE_MONITORING.md index 4f20448..a1be11c 100644 --- a/docs/TEMPERATURE_MONITORING.md +++ b/docs/TEMPERATURE_MONITORING.md @@ -43,7 +43,7 @@ pulse-host-agent runs natively on your Proxmox host and reports temperatures bac bash -s -- --url http://your-pulse-vm:7655 --token YOUR_API_TOKEN ``` -3. Verify temperatures appear in Pulse UI under the Servers tab +3. Verify temperatures appear in Pulse UI under the Hosts tab The host agent will report CPU, NVMe, and GPU temperatures alongside other system metrics. No proxy installation or socket mounting needed. diff --git a/internal/hostagent/agent.go b/internal/hostagent/agent.go index a4bfe96..6f9c14f 100644 --- a/internal/hostagent/agent.go +++ b/internal/hostagent/agent.go @@ -313,7 +313,7 @@ func isLoopback(flags []string) bool { // Returns an empty Sensors struct if collection fails (best-effort). func (a *Agent) collectTemperatures(ctx context.Context) agentshost.Sensors { // Only collect on Linux for now (lm-sensors is Linux-specific) - if a.platform != "linux" { + if runtime.GOOS != "linux" { return agentshost.Sensors{} }