fix(agent): avoid mismatched root disk I/O mapping in docker (#1737)

- Stop using max-read fallback when mapping root filesystem to
diskstats.
- Keep root usage reporting even when root I/O cannot be mapped.
- Expand docker fallback mount detection to include /etc/resolv.conf and
/etc/hostname (in addition to /etc/hosts).
- Add clearer warnings when root block device detection is uncertain.
This commit is contained in:
henrygd
2026-02-10 18:12:04 -05:00
parent 48c35aa54d
commit dba3519b2c
3 changed files with 85 additions and 25 deletions

View File

@@ -8,6 +8,7 @@ import (
"encoding/json"
"errors"
"fmt"
"log/slog"
"os"
"os/exec"
"path/filepath"
@@ -18,8 +19,6 @@ import (
"time"
"github.com/henrygd/beszel/internal/entities/smart"
"log/slog"
)
// SmartManager manages data collection for SMART devices
@@ -1125,7 +1124,6 @@ func NewSmartManager() (*SmartManager, error) {
sm.refreshExcludedDevices()
path, err := sm.detectSmartctl()
if err != nil {
slog.Debug(err.Error())
return nil, err
}
slog.Debug("smartctl", "path", path)