Commit graph

126 commits

Author SHA1 Message Date
Alejandro Fernández Haro f44916b6aa
[Telemetry] Full schema definition (#90273)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 18:30:51 +00:00
Yuliia Naumenko 83234aad2d
[Alerts][Doc] Added README documentation for alerts plugin status and framework health checks configuration options. (#92761)
* [Alerts][Doc] Added README documentation for alerts plugin status and framework health checks configuration options.

* Apply suggestions from code review

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-02-26 08:48:51 -08:00
Yuliia Naumenko ad19f821d6
[Alerts][Doc] Added README documentation for API key invalidation configuration options. (#92757)
* [Alerts][Doc] Added README documentation for API key invalidation configuration options.

* Apply suggestions from code review

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-02-25 12:49:00 -08:00
Yuliia Naumenko 0627573dbd
[Alerts][Docs] Extended README.md and the user docs with the licensing information. (#92564)
* [Alerts][Docs] Extended README.md and the user docs with the licensing information.

* Apply suggestions from code review

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* fixed due to comments

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-02-25 12:41:48 -08:00
Mike Côté 0c2495a7e1
Ability to filter alerts by string parameters (#92036)
* Initial commit

* Update comment

* Return early

* Add docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-22 10:57:50 -05:00
Yuliia Naumenko 481c92296e
[Alerts][Docs] Cleanup alerts README.md to remove duplication from docs (#91074)
* Cleanup alerts README.md to remove duplication from docs

* fixed due to comments

* fixed due to comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-17 12:53:33 -08:00
Patrick Mueller 20e16bd9a4
[alerting] add mustache variable kibanaBaseUrl for Kibana's publicly exposed base URL (#90525)
resolves https://github.com/elastic/kibana/issues/49392

Adds the top-level mustache variable `kibanaBaseUrl` for action parameter
mustache templates.  The value comes from Kibana config, which, if not set
will result in this variable having the value `undefined` which will be rendered
as an empty string.
2021-02-16 15:47:56 -05:00
Joe Portner 5c3c3efdd8
Sharing saved objects, phase 2.5 (#89344) 2021-02-13 04:28:35 -05:00
Gidi Meir Morris 6406e99642
[Alerting] Skips Alert Instances that were instantiated but have no scheduled actions (#91179)
Skips Alert Instances that were instantiated but have no scheduled actions to prevent them from being identified as having recovered.
2021-02-12 09:59:16 +00:00
Dima Arnautov 341e9cf2eb
[ML] Anomaly Detection alert type (#89286)
* [ML] init ML alerts

* [ML] job selector

* [ML] move schema server-side

* [ML] fix type 🤦‍

* [ML] severity selector

* [ML] add alerting capabilities

* [ML] add alerting capabilities

* [ML] result type selector

* [ML] time range selector

* [ML] init alert preview endpoint

* [ML] update SeveritySelector component

* [ML] adjust the form

* [ML] adjust the form

* [ML] server-side, preview component

* [ML] update defaultMessage

* [ML] Anomaly explorer URL

* [ML] validate preview interval

* [ML] rename alert type

* [ML] fix i18n

* [ML] fix TS and mocks

* [ML] update licence headers

* [ML] add ts config references

* [ML] init functional tests

* [ML] functional test for creating anomaly detection alert

* [ML] adjust bucket results query

* [ML] fix messages

* [ML] resolve functional tests related issues

* [ML] fix result check

* [ML] change preview layout

* [ML] extend ml client types

* [ML] add missing types, remove unused client variable

* [ML] change to import type

* [ML] handle preview error

* [ML] move error callout

* [ML] better error handling

* [ML] add client-side validation

* [ML] move fake request to the executor

* [ML] revert ml client type changes, set response type manually

* [ML] documentationUrl

* [ML] add extra sentence for interim results

* [ML] use publicBaseUrl

* [ML] adjust the query

* [ML] fix anomaly explorer url

* [ML] adjust the alert params schema

* [ML] remove default severity threshold for records and influencers

* [ML] fix query with filter block

* [ML] fix functional tests

* [ML] remove isInterim check

* [ML] remove redundant fragment

* [ML] fix selected cells hook

* [ML] set query string

* [ML] support sample size by the preview endpoint

* [ML] update counter

* [ML] add check for the bucket span

* [ML] fix effects

* [ML] disable mlExplorerSwimlane

* [ML] refactor functional tests to use setSliderValue

* [ML] add assertTestIntervalValue

* [ML] floor scores
2021-02-11 18:14:14 +01:00
ymao1 3e91bc728d
[Alerting] License Errors on Alert List View (#89920)
* Adding tooltips to alert list and modal for license upgrade

* Fixing typings

* Custom License Error status. Moving modal to alerts list page

* Adding unit test

* Cleanup

* Unit tests

* Removing tooltip from alert name

* License

* PR fixes

* Updating modal wording

* Updating license state error message

* i18n fix

* Fixing functional test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-10 08:06:09 -05:00
Aleh Zasypkin 03a53b9f39
Do not generate an ephemeral encryption key in production. (#81511) 2021-02-10 11:27:31 +01:00
Brandon Kobel 4584a8b570
Elastic License 2.0 (#90099)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:12:39 -08:00
Mike Côté 51cfa90dc5
Add support for custom alert ids (#89814)
* Add support for custom alert ids

* UUID v4 also supported

* Change ESO custom id error message

* Update api integration test

* Use errors.createBadRequestError
2021-02-01 14:00:33 -05:00
Patrick Mueller e4c344ada6
[data] change KQL node builder to not generate recursive and/or clauses (#89345)
resolves https://github.com/elastic/kibana/issues/88367

Prior to this PR, the KQL node_builder code was using recursion to generate
"and" & "or" expressions.  Eg, `and(foo1=bar1, foo2=bar2, foo3=bar3)` would
be generated as if was specified as `and(foo1=bar1, and(foo2=bar2, foo3=bar3))`.

Calls to the builder with long lists of expressions would generate nested JSON
as deep as the lists are long.  This is problematic, as Elasticsearch is
changing the default limit on nested bools to 20 levels, and alerting already
generates nested bools greater than that limit.
See: https://github.com/elastic/elasticsearch/issues/55303

This PR changes the generated shape of above, so that all the nodes are at the
same level, instead of the previous "recursive" treatment.
2021-02-01 12:22:29 -05:00
ymao1 049135192e
[Alerting] Search alert (#88528)
* Adding es query alert type to server with commented out executor

* Adding skeleton es query alert to client with JSON editor. Pulled out index popoover into component for reuse between index threshold and es query alert types

* Implementing alert executor that performs query and matches condition against doc count

* Added tests for server side alert type

* Updated alert executor to de-duplicate matches and create instance for every document if threshold is not defined

* Moving more index popover code out of index threshold and es query expression components

* Ability to remove threshold condition from es query alert

* Validation tests

* Adding ability to test out query. Need to add error handling and it looks ugly

* Fixing bug with creating alert with threshold and i18n

* wip

* Fixing tests

* Simplifying executor logic to only handle threshold and store hits in action context

* Adding functional test for es query alert

* Types

* Adding functional test for query testing

* Fixing unit test

* Adding link to ES docs. Cleaning up logger statements

* Adding docs

* Updating docs based on feedback

* PR fixes

* Using ES client typings

* Fixing unit test

* Fixing copy based on comments

* Fixing copy based on comments

* Fixing bug in index select popover

* Fixing unit tests

* Making track_total_hits configurable

* Fixing functional test

* PR fixes

* Added unit test

* Removing unused import

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-29 07:45:00 -05:00
Yuliia Naumenko 466334529c
[Alerts][Actions][Telemetry] Fix mappings for Kibana actions and alert types telemetry. (#88532)
* [Alerts][Actions][Telemetry] Fix mappings for Kibana actions and alert types telemetry.

* fixed count_active_by_type for actions

* fixed tests

* Fixed due to comments.

* Fixed due to comments.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-27 09:00:50 -08:00
Mikhail Shustov b3a9754394
[Core] Explicit typings for request handler context (#88718)
* move context to server part. couple with RequestHandlerContext

Context implementation will be simplified in follow-up.

* adopt core code

* adopt bfetch code

* adopt data code

* adopt search examples

* adopt vis_type_timelion

* adopt vis_type_timeseries

* adopt plugin functional tests

* adopt actions

* adopt alerting plugin

* adopt APM plugin

* adopt beats_management

* adopt case plugin

* adopt cross_cluster_replication

* adopt data_enhanced

* adopt event_log

* adopt global_search

* adopt index_management

* adopt infra

* adopt licensing

* adopt lists

* adopt logstash

* adopt reporting

* adopt observability

* adopt monitoring

* adopt rollup

* adopt so tagging

* adopt security

* adopt security_solutions

* adopt watcher

* adopt uptime

* adopt spaces

* adopt snapshot_restore

* adopt features changes

* mute error when null used to extend context

* update docs

* small cleanup

* add type safety for return type

* refactor registerRouteHandlerContext type

* update docs

* update license header

* update docs

* fix type error. fetch body does not accept array of strings

* fix telemetry test

* remove unnecessary ts-ignore

* address comments

* update docs
2021-01-21 15:20:22 +01:00
Yuliia Naumenko 8b1a228c29
[Alerting] Migrate Actions, Alerts, Stack Alerts and TriggersActionsUI plugins to TS project references (#88556)
* [Alerting] Migrate Actions plugin to TS project references

* alerts plugin ts migration

* triggers_actions_ui plugin ts migration

* fixed build

* fixed build
2021-01-20 10:53:01 -08:00
Nathan L Smith 31a481a9dd
Remove dependency between alerts and infra (#88342)
The alerts plugin was importing `JsonObject` from the infra plugin. The infra plugin imported `JsonObject`, `JsonValue`, and `JsonArray` from kibanaUtils and then re-exported them.

Remove the re-export from the infra plugin and instead always import these types from kibanaUtils.
2021-01-15 08:44:28 -06:00
Mike Côté a0b787c39a
Fix flaky test for legacy authorization (#87642)
* Unskip test

* Increase attempts to 2 for retryIfConflicts

* Cleanup authorization for updateApiKey
2021-01-15 08:13:15 -05:00
Yuliia Naumenko fb67443e6d
[EventLog] Added event log API to get events for multiple saved objects. (#87596)
* Added alerting API to get all active instances

* modofied event log findEventsBySavedObject to support bulk ids, renamed to findEventsBySavedObjectIds

* fixed faling typechecks

* fixed crash on zpd/api/event_log/alert/84c00970-5130-11eb-9fa7/_find for non existing id

* fixed faling typechecks

* fixed faling typechecks

* fixed due to comments

* fixed due to comments

* fixed failing test

* fixed due to comments
2021-01-12 16:25:23 -08:00
Liza Katz 3eeec0f571
[Search] Search Sessions Monitoring Task (#85253)
* Monitor ids

* import fix

* solve circular dep

* eslint

* mock circular dep

* max retries test

* mock circular dep

* test

* jest <(-:C

* jestttttt

* [data.search] Move search method inside session service and add tests

* merge

* Move background session service to data_enhanced plugin

* Better logs
Save IDs only in monitoring loop

* Fix types

* Space aware session service

* ts

* initial

* initial

* Fix session service saving

* merge fix

* stable stringify

* INMEM_MAX_SESSIONS

* INMEM_MAX_SESSIONS

* use the status API

* Move task scheduling behind a feature flag

* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts

Co-authored-by: Anton Dosov <dosantappdev@gmail.com>

* Add unit tests

* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts

Co-authored-by: Anton Dosov <dosantappdev@gmail.com>

* Use setTimeout to schedule monitoring steps

* Update request_utils.ts

* settimeout

* tiny cleanup

* Core review + use client.asyncSearch.status

* update ts

* fix unit test

* code review fixes

* Save individual search errors on SO

* Don't re-fetch completed or errored searches

* Rename Background Sessions to Search Sessions (with a send to background action)

* doc

* doc

* jest fun

* rename rfc

* translations

* merge fix

* merge fix

* code review

* update so name in features

* Move deleteTaskIfItExists to task manager

* task_manager to ts project

* Move deleteTaskIfItExists to public contract

* mock

* use task store

* ts

* code review

* code review + jest

* Alerting code review

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: restrry <restrry@gmail.com>
2021-01-11 16:36:38 +02:00
Yuliia Naumenko 794c6b3b08
[Alerting] Replaced single invalidateApiKey request with the bulk. (#87401)
* Replaced single invalidateApiKey request with the bulk

* fixed failing test

* Extended invalidate method to support multiple invalidation. Updated fleets plugin usage of this API.

* fixed due to comments
2021-01-07 07:17:24 -08:00
Gidi Meir Morris b99ca969e0
[Alerting] revert the revert of Enforces typing of Alert's ActionGroups (#87382)
The https://github.com/elastic/kibana/pull/86761 PR was reverted due to a small typing issue.

This PR reverts that revert and adds a commit to address the issue: 9e4ab2002c.
2021-01-06 10:38:33 +00:00
Jonathan Budzenski 051be28c69 Revert "[Alerting] Enforces typing of Alert's ActionGroups (#86761)"
This reverts commit 76b8c491ee.
2021-01-05 13:24:59 -06:00
Gidi Meir Morris 76b8c491ee
[Alerting] Enforces typing of Alert's ActionGroups (#86761)
This PR tightens the typing on the Alerting framework's `AlertType` and its deeper typing around `AlertServices ` and `AlertExecutorOptions`.

This ensures the following:

1. It's now impossible<sup>✴</sup> to schedule actions on any ActionGroup other than the groups specified on the AlertType (including the Recovery group)
2. It's now impossible<sup>✴</sup> to schedule actions with incorrect `InstanceState` or `InstanceContext`

✴ Unless they bypass the Typescript typing, which is an explicit choice to bypass type safety
2021-01-05 18:44:57 +00:00
Spencer e3856a9e45
[security/apiKeys] migrate from id to ids in ES request (#87053)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-04 15:46:37 -07:00
Mike Côté f3b43cbf3f
Deprecate services.callCluster in alerts and actions executors (#86474)
* Deprecate callCluster in alerts and actions services

* Update deprecation comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-29 11:21:48 -05:00
Gidi Meir Morris 2db76660ce
[Alerting] Encourage type safe usage of Alerting (#86623)
This PR encourages type safe usage of the Alerting framework by replacing the current default Params/State/InstanceState/InstanceContext types (which are `AlertTypeParams`/`AlertTypeState`/etc.) with `never`.
This means that code can continue to omit the specific types for these fields, as long as they aren't referenced.
Once an alert developer wishes to actually reference the parameters (or state/context), then they have to specify the type.

This PR also changed the typing of the `AlertTypeParams` and `AlertTypeState` from `Record<string, any>` to `Record<string, unknown>`, to ensure that where these catch-all types are used they will at least enforce `unknown` rather than `any`.
This change broke some usage in both @elastic/kibana-alerting-services  plugins, but also other plugins in the Stack/Solutions. I tried to fix these where I could, but some of these require new types and refactoring in other teams' code, which I decided is best done by the team who own and maintain that code - I've added explicit `TODO` comments in all of these places, describing the required fix.

This PR also introduced a Generics based typing for the `Alert` type so that the `params` field can be typed as something other than `AlertTypeParams`.
2020-12-21 19:17:04 +00:00
Mike Côté d5d19f0652
Remove the wait_for refresh when partially updating the alert's execution status (#86316) 2020-12-18 08:13:49 -05:00
Yuliia Naumenko 76670ec05e
Removed mocking hacks from alert plugin.test.ts (#86206) 2020-12-17 08:27:57 -08:00
Liza Katz 5be169a4fc
[Search] Use filter to bulk find (#85551)
* Use filter to bulk find

* Update x-pack/plugins/data_enhanced/server/search/session/session_service.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Dashboard in space test

* Add warning on update failure

* fix merge

* Added functional test for sessions in space

* snapshot

* test cleanup

* Update src/plugins/data/common/es_query/kuery/node_types/node_builder.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Revert "Update src/plugins/data/common/es_query/kuery/node_types/node_builder.ts"

This reverts commit 4b7e781fe6.

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-17 12:17:02 +02:00
Mike Côté ccfb4b6b1d
Add footer to all emails sent by Kibana email connector with a link to open Kibana or to the alert details page (#84371)
* Initial work

* Change messaging from copy

* Fix jest tests for email connector

* Fix jest tests for alerts plugin

* Update copy

* Use server.publicBaseUrl

* Fix jest tests

* Update tests

* Cleanup jest test

* Code cleanup

* Improve email parameter names for kibana footer url

* Cleanup

* Add test for kibana footer link

* Fix type check

* Fix jest test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-15 13:51:44 -05:00
Yuliia Naumenko 37525f80a0
License checks for alerts plugin (#85649)
* [Alerts][License] Define minimum license required for each alert type (#84997)

* Define minimum license required for each alert type

* fixed typechecks

* fixed tests

* fixed tests

* fixed due to comments

* fixed due to comments

* removed file

* removed casting to LicenseType

* [Alerts][License] Add license checks to alerts HTTP APIs and execution (#85223)

* [Alerts][License] Add license checks to alerts HTTP APIs and execution

* fixed typechecks

* resolved conflicts

* resolved conflicts

* added router tests

* fixed typechecks

* added license check support for alert task running

* fixed typechecks

* added integration tests

* fixed due to comments

* fixed due to comments

* fixed tests

* fixed typechecks

* [Alerting UI][License] Disable alert types in UI when the license doesn't support it. (#85496)

* [Alerting UI][License] Disable alert types in UI when the license doesn't support it.

* fixed typechecks

* added licensing for alert list and details page

* fixed multy select menu

* fixed due to comments

* fixed due to comments

* fixed due to comments

* fixed typechecks

* fixed license error message

* fixed license error message

* fixed typechecks

* fixed license error message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 19:29:39 -08:00
Patrick Mueller 7873e3685b
Allow action types to perform their own mustache variable escaping in parameter templates (#83919)
resolves https://github.com/elastic/kibana/issues/79371
resolves https://github.com/elastic/kibana/issues/62928

In this PR, we allow action types to determine how to escape the
variables used in their parameters, when rendered as mustache
templates.  Prior to this, action parameters were recursively
rendered as mustache templates using the default mustache
templating, by the alerts library.  The default mustache
templating used html escaping.

Action types opt-in to the new capability via a new optional
method in the action type, `renderParameterTemplates()`.  If not
provided, the previous recursive rendering is done, but now with
no escaping at all.

For #62928, changed the mustache template rendering to be
replaced with the error message, if an error occurred,
so at least you can now see that an error occurred.  Useful
to diagnose problems with invalid mustache templates.
2020-12-14 20:41:13 -05:00
Yuliia Naumenko b7c9d22133
Removed Alerting & Event Log deprecated fields that should not be using (#85652)
* Removed Alerting & Event Log deprecated fields that should not be using

* fixed due to comments
2020-12-14 17:05:58 -08:00
ymao1 ab07a003d4
Increasing default api key removalDelay to 1h (#85576)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-14 07:58:32 -05:00
ymao1 ab082647ac
[Actions] Notify only on action group change (#82969)
* plugged Task Manager lifecycle into status reactively

* fixed tests

* Revert "fixed tests"

This reverts commit e9f2cd05bd.

* made action group fields optional

* revert deletion

* again

* extracted action type for mto its own component

* extracted more sections of the action form to their own components

* updated icon

* added docs

* fixed always firing alert

* fixed export of components

* fixed react warning

* Adding flag for notifying on state change

* Updating logic in task runner

* Starting to update tests

* Adding tests

* Fixing types check

* Tests and types

* Tests

* Tests

* Tests

* Tests

* Tests

* Renaming field to a more descriptive name. Adding migrations

* Renaming field to a more descriptive name. Adding migrations

* Fixing tests

* Type check and tests

* Moving schedule and notify interval to bottom of flyout. Implementing dropdown from mockup in new component

* Changing boolean flag to enum type and updating in triggers_actions_ui

* Changing boolean flag to enum type and updating in alerts plugin

* Fixing types check

* Fixing monitoring jest tests

* Changing last references to old variable names

* Moving form inputs back to the top

* Renaming to alert_notify_when

* Updating functional tests

* Adding new functional test for notifyWhen onActionGroupChange

* Updating wording

* Incorporating action subgroups into logic

* PR fixes

* Updating functional test

* Fixing types check

* Changing default throttle interval to hour

* Fixing types check

Co-authored-by: Gidi Meir Morris <github@gidi.io>
2020-12-10 15:51:52 -05:00
Gidi Meir Morris 015f3c994b
[Alerting] Introduces a ActionSubGroup which allows for more granular action group scheduling (#84751)
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.
2020-12-10 15:16:42 +00:00
ymao1 488591560b
Fixing recovered instance reference bug (#85412) 2020-12-10 07:20:53 -05:00
Aleh Zasypkin 88e61a6651
Migrate API keys functionality to a new Elasticsearch client. (#85029) 2020-12-09 20:43:24 +01:00
ymao1 f3d60c519d
[Actions] Disable 'Resolved' action group for ServiceNow, Jira and IBM Resilient action types (#83829)
* Adding disabled action groups to action type definition

* Adding tests

* Adding tests

* renamed Resolved to Recovered

* fixed missing import

* fixed buggy default message behaviour

* added missing test

* fixed typing

* fixed resolved in tests

* allows alert types to specify their own custom recovery group name

* removed unnecesery field on always fires

* allows alert types to specify their own custom recovery group

* fixed mock alert types throughout unit tests

* fixed typing issues

* reduce repetition of mock data

* fixed alert type list test

* support legacy event log alert recovery syntax

* added doc

* removed unneeded change in jira

* correct callback name in siem

* renamed resolved to  recovered

* fixed mistaken rename

* Moving to alert plugin

* Updating tests

* elvated default params to alert concern instead of actions concern

* made default params optional

* Adding test

* Moving where default action params are retrieved

* Revert "Moving where default action params are retrieved"

This reverts commit 76e7608229.

* Moving where default action params are retrieved

* Cleanup

* Fixing test

* PR fixes

Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-09 09:45:38 -05:00
ymao1 18a99fcc43
[Alerting & Actions ] More debug logging (#85149)
* Adding debug messages

* Adding timestamp to action execution log

* Jest tests

* Merging in master

* PR fixes

* Cleanup

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-08 18:41:20 -05:00
AndyHunt66 b3bccc2816
Typos in Readme example (#84391)
The last example on the page is not valid json.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-08 11:44:30 -05:00
Thom Heymann f413957827
ECS audit events for alerting (#84113)
* ECS audit events for alerts plugin

* added api changes

* fixed linting and testing errors

* fix test

* Fixed linting errors after prettier update

* Revert "Allow predefined ids for encrypted saved objects (#83482)"

This reverts commit 7d929fe903.

* Added suggestions from code review

* Fixed unit tests

* Added suggestions from code review

* Changed names of alert events

* Changed naming as suggested in code review

* Added suggestions from PR

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-04 19:13:30 +00:00
Gidi Meir Morris 249a1a41aa
[Alerting] Enables AlertTypes to define the custom recovery action groups (#84408)
In this PR we introduce a new `recoveryActionGroup` field on AlertTypes which allows an implementor to specify a custom action group which the framework will use when an alert instance goes from _active_ to _inactive_.
By default all alert types will use the existing `RecoveryActionGroup`, but when `recoveryActionGroup` is specified, this group is used instead.

This is applied across the UI, event log and underlying object model, rather than just being a label change.
To support this we also introduced the `alertActionGroupName` message variable which is the human readable version of existing `alertActionGroup` variable.
2020-12-04 13:54:48 +00:00
Tyler Smalley b593781009
Jest multi-project configuration (#77894)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-02 11:42:23 -08:00
Gidi Meir Morris 6da6db28ac
Revert the Revert of "[Alerting] renames Resolved action group to Recovered (#84123)" (#84662)
Reapplies the #84123 PR:
This PR changes the default term from “Resolved” to “Recovered”, as it fits most use cases and we feel users are most likely to understand its meaning across domains.
2020-12-01 17:30:05 +00:00
Tyler Smalley 0b5c55c597 Revert "[Alerting] renames Resolved action group to Recovered (#84123)"
This reverts commit 7dcaff5ddd.
2020-12-01 07:10:09 -08:00