hub: offsite pool-box checker logs the pool trend on each refresh (operator visibility)

This commit is contained in:
2026-07-17 20:20:20 +02:00
parent 66da0c44d5
commit a4268c3707
+4
View File
@@ -153,8 +153,12 @@ func (c *OffsiteBoxChecker) Check() {
c.haveSnap = true
if snap.Degraded {
c.logger.Printf("[INFO] Offsite pool-box refreshed: DEGRADED (capacity unavailable) — box %d", c.boxID)
return // no band transitions on degraded data
}
// Periodic operator visibility of the pool trend (one line per 15-min refresh; keys, no secrets).
c.logger.Printf("[INFO] Offsite pool-box refreshed: %.1f%% full (%s of %s), Σ shared quota %d GB, oversub %.2fx",
snap.FillPercent, fmtSize(snap.UsedBytes), fmtSize(snap.CapacityBytes), snap.SumQuotaGB, snap.Ratio)
// FILL band (escalation-only; recovery re-arms because bandOK has rank 0).
if bandRank(snap.FillBand) > bandRank(c.fillBand) {