What changed before this? on every incident, ranked
- A card on the incident page, and GET /api/incidents/:id/before and /api/v1/incidents/:id/before: what the app knows happened in the 30 min to 24 h before an alert began (audit log, maintenance windows, update runs and patch plans, other alerts, a step in the server's own figures), scored by how related, what kind and how close - A host going down is shown once; Likely, Possible and Background; at most ten - Docs and roles updated Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c2e76262ca
commit
0277126add
12 files changed
+887
No files matched your search
@@ -1614,6 +1614,32 @@ export interface IncidentSummary {
|
||||
notes: number;
|
||||
}
|
||||
|
||||
export interface BeforeSuspect {
|
||||
at: string;
|
||||
minutesBefore: number;
|
||||
kind: "maintenance" | "update" | "alert" | "change" | "settings" | "metric" | "rule";
|
||||
title: string;
|
||||
detail: string | null;
|
||||
actor: string | null;
|
||||
relation: "same" | "needs" | "needed_by" | "everything" | "other";
|
||||
about: string;
|
||||
why: string;
|
||||
score: number;
|
||||
confidence: "likely" | "possible" | "background";
|
||||
link: string | null;
|
||||
incidentId?: number;
|
||||
}
|
||||
|
||||
export interface BeforeReport {
|
||||
incidentId: number;
|
||||
openedAt: string;
|
||||
windowMinutes: number;
|
||||
from: string;
|
||||
to: string;
|
||||
suspects: BeforeSuspect[];
|
||||
looked: { auditEntries: number; maintenanceWindows: number; updateRuns: number; otherAlerts: number; series: number };
|
||||
}
|
||||
|
||||
export interface IncidentDetail {
|
||||
incident: IncidentSummary;
|
||||
ack: AlertAck | null;
|
||||
@@ -2648,6 +2674,7 @@ export const api = {
|
||||
incidents: {
|
||||
list: () => request<{ incidents: IncidentSummary[] }>("/api/incidents"),
|
||||
get: (id: number) => request<IncidentDetail>(`/api/incidents/${id}`),
|
||||
before: (id: number, minutes: number) => request<BeforeReport>(`/api/incidents/${id}/before?minutes=${minutes}`),
|
||||
addNote: (id: number, body: string) => request<{ id: number }>(`/api/incidents/${id}/notes`, { method: "POST", body: JSON.stringify({ body }) }),
|
||||
removeNote: (id: number, noteId: number) => request<void>(`/api/incidents/${id}/notes/${noteId}`, { method: "DELETE" }),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user