This PR introduces a new concept of an _Action Subgroup_ (naming is open for discussion) which can be used by an Alert Type when scheduling actions. An Action Subgroup can be dynamically specified, unlike Action Groups which have to be specified on the AlertType definition. When scheduling actions, and AlertType can specify an _Action Subgroup_ along side the scheduled _Action Group_, which denotes that the alert instance falls into some kind of narrower grouping in the action group.
34 lines
948 B
TypeScript
34 lines
948 B
TypeScript
/*
|
|
* 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.
|
|
*/
|
|
|
|
export type AlertStatusValues = 'OK' | 'Active' | 'Error';
|
|
export type AlertInstanceStatusValues = 'OK' | 'Active';
|
|
|
|
export interface AlertInstanceSummary {
|
|
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;
|
|
actionGroupId?: string;
|
|
actionSubgroup?: string;
|
|
activeStartDate?: string;
|
|
}
|