fix(hub): check if status alert is triggered before sending up alert (#1806)

This commit is contained in:
Sven van Ginkel
2026-03-12 18:38:42 +01:00
committed by GitHub
parent b386ce5190
commit 0d3dfcb207

View File

@@ -134,7 +134,10 @@ func (am *AlertManager) handleSystemUp(systemName string, alertRecords []*core.R
}
continue
}
// No alert scheduled for this record, send "up" alert
// No alert scheduled for this record, send "up" alert only if "down" was triggered
if !alertRecord.GetBool("triggered") {
continue
}
if err := am.sendStatusAlert("up", systemName, alertRecord); err != nil {
am.hub.Logger().Error("Failed to send alert", "err", err)
}