diff --git a/internal/alerts/alerts.go b/internal/alerts/alerts.go index f64b629da..36e8d94b6 100644 --- a/internal/alerts/alerts.go +++ b/internal/alerts/alerts.go @@ -533,9 +533,27 @@ func (m *Manager) CheckStorage(storage models.Storage) { m.mu.RUnlock() return } + + // Check if there's an override for this storage device + override, hasOverride := m.config.Overrides[storage.ID] threshold := m.config.StorageDefault m.mu.RUnlock() + // If alerts are disabled for this storage device, clear any existing alerts and return + if hasOverride && override.Disabled { + m.mu.Lock() + alertID := fmt.Sprintf("%s-usage", storage.ID) + if _, exists := m.activeAlerts[alertID]; exists { + delete(m.activeAlerts, alertID) + log.Info(). + Str("alertID", alertID). + Str("storage", storage.Name). + Msg("Cleared alert - storage has alerts disabled") + } + m.mu.Unlock() + return + } + m.checkMetric(storage.ID, storage.Name, storage.Node, storage.Instance, "Storage", "usage", storage.Usage, &threshold) }