mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-01 21:10:13 +00:00
feat: Agent collects S.M.A.R.T. disk data via smartctl. Related to #907
- Add smartctl package to collect disk temperature and health data - Add SMART field to agent Sensors struct - Host agent now runs smartctl to collect disk temps when available - Backend processes agent SMART data for temperature display - Graceful fallback when smartctl not installed
This commit is contained in:
parent
800fab10c2
commit
8f9d5c1120
6 changed files with 354 additions and 12 deletions
|
|
@ -210,6 +210,19 @@ type HostSensorSummary struct {
|
|||
TemperatureCelsius map[string]float64 `json:"temperatureCelsius,omitempty"`
|
||||
FanRPM map[string]float64 `json:"fanRpm,omitempty"`
|
||||
Additional map[string]float64 `json:"additional,omitempty"`
|
||||
SMART []HostDiskSMART `json:"smart,omitempty"` // S.M.A.R.T. disk data
|
||||
}
|
||||
|
||||
// HostDiskSMART represents S.M.A.R.T. data for a disk from a host agent.
|
||||
type HostDiskSMART struct {
|
||||
Device string `json:"device"` // Device name (e.g., sda)
|
||||
Model string `json:"model,omitempty"` // Disk model
|
||||
Serial string `json:"serial,omitempty"` // Serial number
|
||||
WWN string `json:"wwn,omitempty"` // World Wide Name
|
||||
Type string `json:"type,omitempty"` // Transport type: sata, sas, nvme
|
||||
Temperature int `json:"temperature"` // Temperature in Celsius
|
||||
Health string `json:"health,omitempty"` // PASSED, FAILED, UNKNOWN
|
||||
Standby bool `json:"standby,omitempty"` // True if disk was in standby
|
||||
}
|
||||
|
||||
// HostRAIDArray represents an mdadm RAID array on a host.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue