-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#75036) resolves #57446 Adds a new API (AlertClient and HTTP endpoint) `getAlertStatus()` which returns alert data calculated from the event log.
- Loading branch information
Showing
41 changed files
with
2,012 additions
and
206 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
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.