Pulse/internal/hostmetrics
rcourtman fdb2a07f56 fix(agent): find zpool binary on TrueNAS SCALE (#718)
Enhanced zpool binary lookup to try common paths when exec.LookPath fails.
This fixes issue #718 where TrueNAS SCALE reports inflated storage because
the agent runs with a restricted PATH that doesn't include /usr/sbin.

Changes:
- Added findZpool() helper that tries common paths like /usr/sbin/zpool,
  /sbin/zpool, /usr/local/sbin/zpool for TrueNAS/FreeBSD/Linux systems
- Added commonZpoolPaths variable listing typical zpool locations
- Added tests for the new findZpool function

This ensures zpool list is used for accurate pool-level capacity instead
of falling back to dataset-level summation.
2025-12-18 16:23:56 +00:00
..
collector.go feat: AI features, agent improvements, and host monitoring enhancements 2025-12-05 10:37:02 +00:00
collector_test.go feat: AI features, agent improvements, and host monitoring enhancements 2025-12-05 10:37:02 +00:00
zfs.go fix(agent): find zpool binary on TrueNAS SCALE (#718) 2025-12-18 16:23:56 +00:00
zfs_test.go fix(agent): find zpool binary on TrueNAS SCALE (#718) 2025-12-18 16:23:56 +00:00