Flapping alerts, a noise report and bulk actions with undo
Flapping: an alert raised three times within an hour is announced once as flapping, its further raise/clear messages are held until it has been calm for an hour, and one message then says whether it is still active. Event webhooks still hear everything. The state survives restarts. Alerts > Noise lists the alerts that keep coming back (7-180 days): how often, how long, most in an hour, and a hint on what helps. Bulk actions on Alerts (acknowledge, remove acknowledgement, silence), Servers (tag, silence, runs on) and Inventory (location and dates, print labels). Each reports what it left alone and why, and has an Undo on the toast. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
be6c5552bd
commit
73a06ebe63
35 files changed
+2546
-17
No files matched your search
@@ -17,6 +17,7 @@ import { diskLimit, effectiveThresholds, parseThresholds } from "./serverThresho
|
||||
import { getBackupCoverage, staleBackups } from "./backupCoverage.js";
|
||||
import { recordFromReport } from "./incidents.js";
|
||||
import { reconcileAcks } from "./alertAcks.js";
|
||||
import { flappingKeys, keyOfAlertId } from "./flapGuard.js";
|
||||
import { lastAttempt as lastSelfBackup, newestSnapshot, STALE_AFTER_HOURS as SELF_BACKUP_STALE_HOURS } from "./selfBackup.js";
|
||||
import { loadIntegrationConfig } from "../integrations/loadIntegration.js";
|
||||
import { createUptimeKumaAdapter } from "../integrations/uptimekuma/adapter.js";
|
||||
@@ -533,6 +534,10 @@ export async function collectAlerts(): Promise<AlertsReport> {
|
||||
a.message.localeCompare(b.message),
|
||||
);
|
||||
|
||||
// Those that keep coming and going are marked, so nobody mistakes the quiet of their held messages for the problem having gone.
|
||||
const flapping = await flappingKeys().catch(() => new Set<string>());
|
||||
if (flapping.size > 0) for (const a of alerts) if (flapping.has(keyOfAlertId(a.id, a.category))) a.flapping = true;
|
||||
|
||||
const active = alerts.filter((a) => !a.silenced);
|
||||
const grouped = alerts.filter((a) => a.causedBy).length;
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user