-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Create alerting plugin #37043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mikecote
merged 107 commits into
elastic:feature/alerting
from
mikecote:alerting/alert-plugin
Jun 18, 2019
Merged
Create alerting plugin #37043
Changes from 93 commits
Commits
Show all changes
107 commits
Select commit
Hold shift + click to select a range
e753eac
WIP
mikecote 63efb22
Rename fire function and remove @ts-ignore in all places
mikecote 600d1c1
Change naming in alerting service
mikecote e2c2399
Remove alert instance class for now, support interval configuration
mikecote 11098fb
Cleanup TS
mikecote e98d473
Split alerting between registry and client
mikecote b194932
Use saved object alongside task manager instance
mikecote dba4cfc
Add remaining alerting APIs
mikecote ea72095
Change create structure
mikecote f4b631d
Rename some variables, change actionGroups structure
mikecote 72b461b
Use handlebars for templating strings at fire time
mikecote 0205783
Fix params given to alert type execute function
mikecote b5db24d
Use alert instance class
mikecote d0d395d
Alert instances support meta attributes
mikecote 9927143
Move alert instances deserialization
mikecote 6442f51
Change interval to be ms
mikecote a83c56a
Rename actions es archive
mikecote da9c3c5
Fix tests to use encrypted esArchive for action record
mikecote 1289b50
Add create alert test to demo end to end flow
mikecote a33dafe
Merge branch 'feature/alerting' of github.com:elastic/kibana into ale…
mikecote 36e2776
Fix type check issue
mikecote d12d488
Alerts to use references to action objects
mikecote 515fae4
Only update task manager tasks after saved objects are fully updated
mikecote b4e442e
Use scope in task manager
mikecote 08f3d22
Fix type check
mikecote 47a3294
Use task manager to execute actions
mikecote b9f9c94
Convert ids into references and back
mikecote 4feb609
Apply PR feedback
mikecote 96df722
Merge wtih upstream
mikecote 29c5e11
Fix broken test
mikecote a94916e
Fix some bugs
mikecote 7a414b3
Merge wtih upstream
mikecote 4abbc73
Fix test errors
mikecote 1b67166
Alert interval to be previous runAt + interval instead of now + interval
mikecote ab7e1ec
Add range support
mikecote d3f252f
Remove extra line
mikecote c6291af
Cleanup
mikecote dd873d5
Add alert_instance.test.ts
mikecote 40c4b8d
Add alert_type_registry.test.ts
mikecote 0771403
Move tests around
mikecote acd7522
Create generic task manager mock
mikecote bdf32ad
Add note about saved objects client mock
mikecote 3b07c5c
Create alert_type_registry.mock.ts
mikecote 64e50e6
Add alerts_client.test.ts
mikecote 81e302e
Add create_alert_instance_factory.test.ts
mikecote 48e4e98
Add create_fire_handler.test.ts
mikecote 3c8ceaf
WIP
mikecote f535102
Merge with upstream feature/alerting
mikecote e9c0864
Fix get_create_task_runner_function.test.ts and make test pass
mikecote 59c151b
Make get_create_task_runner_function.test.ts 100% coverage
mikecote 69c9639
Add unit tests for routes
mikecote 900c83d
Move files around
mikecote 9709daf
Created transform_action_params.ts
mikecote 48f1a3f
Add get_next_run_at.ts
mikecote 86e5b3b
Add comment explaining why we copy nextRunAt
mikecote 0dae6bd
Re-use state within alert instance
mikecote fe2ff93
Finalize code coverage in unit tests
mikecote 5158a00
Create base api integration tests
mikecote bb8d325
Add a test that ensures end to end functionality of an alert
mikecote 659d655
Fix ui capabilities test
mikecote a988c5c
Fix broken plugin api integration test
mikecote 423d187
Merge wtih feature/alerting
mikecote c32c346
Fix jest tests with new saved objects client
mikecote e8dedbe
Fix broken integration tests
mikecote a4c85b4
Change api integration test fixture to make more sense, add functions…
mikecote a32a971
Move alerts integration testing into own file, prep to add more tests
mikecote 8cd4655
Add tests to ensure failed task instances get retried
mikecote a9760a9
Add get_create_task_runner_function.test.ts for actions, create encry…
mikecote 2049ff0
Add action validation tests
mikecote 3d38e9c
Ensure action type validation occurs on update
mikecote b64b54d
Test 400 on unregistered alert types
mikecote 1ce009b
Ensure alertTypeId can't be updated
mikecote 0a90879
Add validation test for alert create / update
mikecote 3e704e1
Fix broken checks / tests
mikecote 5d3d84a
Skip failing test for now
mikecote 5eda29c
Cleanup jest tests
mikecote 6cc1991
Ensure action objects can be updated while keeping encrypted attribut…
mikecote f35c83f
Remove partial update sopport, remove ability to change actionTypeId,…
mikecote e5e1ed7
Merge branch 'feature/alerting' of github.com:elastic/kibana into ale…
mikecote c93c408
Ensure actionTypeConfig is validated on create and update
mikecote d7d2565
Add alertTypeParams validation support
mikecote 1202315
Fix failing tests
mikecote adcce18
Ensure alert cleanup errors don't replace the original error
mikecote a5c7a4d
Pass callCluster as a service to alerts and actions
mikecote d574291
Only pass log to alerts client
mikecote ccad1e3
Pass savedObjectsClient as a service to alerting and actions
mikecote f56ee39
Fix failing tests
mikecote 07cb30c
Remove range support, provide when current and previous task got sche…
mikecote e0a0ffd
Ensure Joi validation happens before every execute
mikecote 0c2ece7
Remove skipped tests, to be done in future PR
mikecote 815568c
Apply self feedback pt1
mikecote 47e3c0d
Apply self feedback pt2
mikecote 3adec20
Fix broken tests
mikecote f3d4dc4
Apply PR feedback
mikecote d4a87be
PR feedback pt1
mikecote bac8286
Apply security team PR feedback
mikecote bf2ab81
PR feedback pt1
mikecote 39187c0
PR feedback pt2
mikecote f11a6ae
PR feedback pt3
mikecote 954ffce
Fix broken tests
mikecote 8f8ba23
Fix callCluster to have signature
mikecote ea4e7a3
Revert f11a6aeb06c65e5ab54bf3cc36694845c812b6a7
mikecote 1776568
PR feedback pt4
mikecote d03ba90
Remove __jest__ folders
mikecote f27b5fd
PR feedback pt5
mikecote 950a7c5
Fix Joi from leaking secrets
mikecote e099294
Fire instance actions in parallel instead of series
mikecote File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,7 @@ | ||
| /* | ||
| * 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 const TASK_MANAGER_SCOPE = 'actions'; | ||
mikecote marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.