forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EventLog] Populate alert instances view with event log data
resolves elastic#57446 Adds a new API (AlertClient and HTTP endpoint) `getAlertStatus()` which returns data calculated from the event log. The data returned in this PR is fairly minimal - just enough to replace the current instance details view data. In the future, we can add the following sorts of things: - alert execution errors - counts of alert execution - sequences of active instance time spans - if we can get the alert SO into the action execution, we could also provide action execution errors
- Loading branch information
Showing
40 changed files
with
1,991 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
type AlertStatusValues = 'OK' | 'Active' | 'Error'; | ||
type AlertInstanceStatusValues = 'OK' | 'Active'; | ||
|
||
export interface AlertStatus { | ||
id: string; | ||
name: string; | ||
tags: string[]; | ||
alertTypeId: string; | ||
consumer: string; | ||
muteAll: boolean; | ||
throttle: string | null; | ||
enabled: boolean; | ||
statusStartDate: string; | ||
statusEndDate: string; | ||
status: AlertStatusValues; | ||
lastRun?: string; | ||
errorMessages: Array<{ date: string; message: string }>; | ||
instances: Record<string, AlertInstanceStatus>; | ||
} | ||
|
||
export interface AlertInstanceStatus { | ||
status: AlertInstanceStatusValues; | ||
muted: boolean; | ||
activeStartDate?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.