Skip to content

[7.x] [Alerting] formalize alert status and add status fields to alert saved object (#75553)#79227

Merged
pmuellr merged 1 commit intoelastic:7.xfrom
pmuellr:backport/7.x/pr-75553
Oct 2, 2020
Merged

[7.x] [Alerting] formalize alert status and add status fields to alert saved object (#75553)#79227
pmuellr merged 1 commit intoelastic:7.xfrom
pmuellr:backport/7.x/pr-75553

Conversation

@pmuellr
Copy link
Copy Markdown
Contributor

@pmuellr pmuellr commented Oct 1, 2020

Backports the following commits to 7.x:

…d object (elastic#75553)

resolves elastic#51099

This formalizes the concept of "alert status", in terms of it's execution, with
some new fields in the alert saved object and types used with the alert client
and http APIs.

These fields are read-only from the client point-of-view; they are provided in
the alert structures, but are only updated by the alerting framework itself.
The values will be updated after each run of the alert type executor.

The data is added to the alert as the `executionStatus` field, with the
following shape:

```ts
interface AlertExecutionStatus {
  status: 'ok' | 'active' | 'error' | 'pending' | 'unknown';
  lastExecutionDate: Date;
  error?: {
    reason: 'read' | 'decrypt' | 'execute' | 'unknown';
    message: string;
  };
}
```
@pmuellr pmuellr added the backport This PR is a backport of another PR label Oct 1, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id before after diff
default 47559 47561 +2

page load bundle size

id before after diff
alerts 89.3KB 89.8KB +469.0B

Saved Objects .kibana field count

id before after diff
alert 24 30 +6

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pmuellr pmuellr merged commit 2ea3604 into elastic:7.x Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants