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
This commit is contained in:
parent
270840801a
commit
1a3abf7f3f
3 changed files with 3 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ The host agent automatically collects temperature data on Linux systems with lm-
|
||||||
- **NVMe Drive Temperatures**: SSD thermal data
|
- **NVMe Drive Temperatures**: SSD thermal data
|
||||||
- **GPU Temperatures**: AMD and NVIDIA GPU sensors
|
- **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:**
|
**Requirements:**
|
||||||
- Linux operating system
|
- Linux operating system
|
||||||
|
|
|
||||||
|
|
@ -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
|
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.
|
The host agent will report CPU, NVMe, and GPU temperatures alongside other system metrics. No proxy installation or socket mounting needed.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ func isLoopback(flags []string) bool {
|
||||||
// Returns an empty Sensors struct if collection fails (best-effort).
|
// Returns an empty Sensors struct if collection fails (best-effort).
|
||||||
func (a *Agent) collectTemperatures(ctx context.Context) agentshost.Sensors {
|
func (a *Agent) collectTemperatures(ctx context.Context) agentshost.Sensors {
|
||||||
// Only collect on Linux for now (lm-sensors is Linux-specific)
|
// Only collect on Linux for now (lm-sensors is Linux-specific)
|
||||||
if a.platform != "linux" {
|
if runtime.GOOS != "linux" {
|
||||||
return agentshost.Sensors{}
|
return agentshost.Sensors{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue