hub v0.23.0: host root-disk pressure monitoring + alert
New HostDiskChecker on the 60s sweep alerts the operator when a Proxmox host root filesystem crosses warn (90%) / crit (95%). Born/persistent (a disk already full at hub restart alerts on cycle 1); distinct host_disk_* event types from the guest disk_*; critical band maps to severity error (the dispatcher only routes warning/error). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HxLA1mZurFq9kt8hneFeCs
This commit is contained in:
@@ -47,6 +47,10 @@ type Config struct {
|
||||
} `yaml:"retention"`
|
||||
Alerting struct {
|
||||
StaleThreshold string `yaml:"stale_threshold"`
|
||||
// Host root-fs disk-pressure thresholds (percent). Empty/0/invalid → defaults 90/95
|
||||
// (normalizeDiskThresholds). Seed-only config, like stale_threshold.
|
||||
HostDiskWarnPercent float64 `yaml:"host_disk_warn_percent"`
|
||||
HostDiskCritPercent float64 `yaml:"host_disk_crit_percent"`
|
||||
} `yaml:"alerting"`
|
||||
Registry struct {
|
||||
Image string `yaml:"image"`
|
||||
@@ -322,6 +326,10 @@ func main() {
|
||||
// agent-v0.48.0: proactive fleet-wide agent-re-key detection — alert when a host's reported
|
||||
// local-API leaf fingerprint changes (independent of the controller channel-check). Same 60s sweep.
|
||||
hostLeafChecker := monitor.NewHostLeafChecker(dataStore, dispatcher.ProcessEvent, logger)
|
||||
// v0.23.0: HOST root-fs disk-pressure alert (the silent vzdump-on-root-fills class). Reads the host
|
||||
// root disk_percent the agent reports; born/persistent (a disk already full at hub restart alerts on
|
||||
// cycle 1). Distinct event types from the controller's GUEST disk_warning/disk_critical. Same 60s sweep.
|
||||
hostDiskChecker := monitor.NewHostDiskChecker(dataStore, cfg.Alerting.HostDiskWarnPercent, cfg.Alerting.HostDiskCritPercent, dispatcher.ProcessEvent, logger)
|
||||
go func() {
|
||||
ticker := time.NewTicker(60 * time.Second)
|
||||
defer ticker.Stop()
|
||||
@@ -334,6 +342,7 @@ func main() {
|
||||
hostStalenessChecker.Check()
|
||||
hostCapabilityChecker.Check()
|
||||
hostLeafChecker.Check()
|
||||
hostDiskChecker.Check()
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user