Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
0747336
License expiration alert mostly working
chrisronline Oct 14, 2019
0a9048e
More working for license_expiration alert, including UI flows for mig…
chrisronline Oct 16, 2019
faf4ad2
Ensure we add the alert to the list so we can render the right state …
chrisronline Oct 16, 2019
de90fe4
Refactor the UI code to be more separated
chrisronline Oct 17, 2019
9b681d8
Move to Typescript
chrisronline Oct 17, 2019
3506bd1
Cleanup
chrisronline Oct 18, 2019
8a7b079
Fix issues with moment usage
chrisronline Oct 18, 2019
1da2f88
Really fix this moment issue
chrisronline Oct 18, 2019
55494bd
Add tests for alert
chrisronline Oct 18, 2019
9ac59c1
Disable alerting for the PR
chrisronline Oct 18, 2019
3e2c2b3
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Oct 18, 2019
cfd0555
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Oct 22, 2019
450080d
Fix JS error
chrisronline Oct 22, 2019
fc2227a
Fix type issues
chrisronline Oct 22, 2019
b2d1bfc
Fix broken test
chrisronline Oct 22, 2019
5734cc3
Add better logging
chrisronline Oct 22, 2019
1f3d311
Refactor a bit, change the UI around and introduce a saved object for…
chrisronline Oct 23, 2019
4e9179c
Fix log levels and broken tests
chrisronline Oct 24, 2019
223cf08
Update some UI flows and rename files
chrisronline Oct 24, 2019
c3d67c0
Fix ts issues
chrisronline Oct 24, 2019
2a950ed
Fixes
chrisronline Oct 24, 2019
0db88d9
Merge branch 'master' into monitoring/kibana_alerts
elasticmachine Oct 24, 2019
dc324da
Update i18n label
chrisronline Oct 24, 2019
93cadfe
Status unit tests
chrisronline Oct 24, 2019
785e05d
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Oct 31, 2019
60051f0
Fix bug with editing action
chrisronline Nov 1, 2019
9188ca8
Make the service input a dropdown
chrisronline Nov 4, 2019
046b9c3
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 4, 2019
36ced45
Fix types
chrisronline Nov 4, 2019
9de1160
Merge in master
chrisronline Nov 4, 2019
ae3973a
Let's see if tests will pass
chrisronline Nov 5, 2019
6589331
Initialize alerting if it's available
chrisronline Nov 7, 2019
6a66b0c
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 12, 2019
0f5edc9
Merge in master
chrisronline Nov 14, 2019
03b587c
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 14, 2019
4f29397
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 18, 2019
0b00549
Refactoring and tests
chrisronline Nov 19, 2019
c9938ae
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 19, 2019
6943bc0
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 19, 2019
bacfb00
Merge in master
chrisronline Nov 20, 2019
5cb5459
Merge in master
chrisronline Nov 21, 2019
40c09e6
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 22, 2019
96c2c0b
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 22, 2019
4adb026
Don't allow testing if there is no email address
chrisronline Nov 22, 2019
5b35dc1
Ensure we close the flyout when setup mode is disabled
chrisronline Nov 22, 2019
8803dd9
Add a better error message
chrisronline Nov 22, 2019
6928486
Fix type issue
chrisronline Nov 22, 2019
29e6dd4
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 25, 2019
cfaa285
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 25, 2019
13bae97
Rename to params based on #51255
chrisronline Nov 25, 2019
8fc7fa0
Reset this
chrisronline Nov 25, 2019
41f3af1
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 25, 2019
e807e84
PR feedback
chrisronline Nov 25, 2019
acbc76c
PR feedback
chrisronline Nov 25, 2019
a05792d
More PR feedback
chrisronline Nov 26, 2019
095bb81
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Nov 26, 2019
6dc6eb5
Move this up a level so unit tests can pass
chrisronline Nov 26, 2019
04b017e
Merge in master
chrisronline Nov 27, 2019
e6f8d73
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Dec 2, 2019
3c4924b
Ensure we only show form inputs in an error state if they are actuall…
chrisronline Dec 2, 2019
08caf16
Ensure we open a new tab with this link
chrisronline Dec 2, 2019
1ccf8ac
Use callout instead
chrisronline Dec 2, 2019
9b7096a
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Dec 4, 2019
df73140
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Dec 4, 2019
fd489ca
Merge in master
chrisronline Dec 5, 2019
ba3f2f9
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Dec 11, 2019
094aa79
Merge in master
chrisronline Dec 18, 2019
a40ad51
Updates
chrisronline Dec 19, 2019
350ce94
Merge remote-tracking branch 'elastic/master' into monitoring/kibana_…
chrisronline Dec 20, 2019
7ed4c88
Merge in master
chrisronline Jan 7, 2020
00721f8
Clean up
chrisronline Jan 7, 2020
7d3229e
Flip back off
chrisronline Jan 7, 2020
4b2a235
Ensure alerts show up in the UI
chrisronline Jan 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,46 @@ export const REPORTING_SYSTEM_ID = 'reporting';
* @type {Number}
*/
export const TELEMETRY_COLLECTION_INTERVAL = 86400000;

/**
* We want to slowly rollout the migration from watcher-based cluster alerts to
* kibana alerts and we only want to enable the kibana alerts once all
* watcher-based cluster alerts have been migrated so this flag will serve
* as the only way to see the new UI and actually run Kibana alerts. It will
* be false until all alerts have been migrated, then it will be removed
*/
export const KIBANA_ALERTING_ENABLED = true;

/**
* The prefix for all alert types used by monitoring
*/
export const ALERT_TYPE_PREFIX = 'monitoring_';

/**
* This is the alert type id for the license expiration alert
*/
export const ALERT_TYPE_LICENSE_EXPIRATION = `${ALERT_TYPE_PREFIX}alert_type_license_expiration`;

/**
* A listing of all alert types
*/
export const ALERT_TYPES = [ALERT_TYPE_LICENSE_EXPIRATION];

/**
* Matches the id for the built-in in email action type
* See x-pack/legacy/plugins/actions/server/builtin_action_types/email.ts
*/
export const ALERT_ACTION_TYPE_EMAIL = '.email';

/**
* The number of alerts that have been migrated
*/
export const NUMBER_OF_MIGRATED_ALERTS = 1;

/**
* We store config data in a single saved object of this id
*/
export const MONITORING_CONFIG_SAVED_OBJECT_ID = 'monitoring';
export const MONITORING_CONFIG_ALERTING_EMAIL_ADDRESS = 'alertingEmailAddress';

export const ALERT_EMAIL_SERVICES = ['gmail', 'hotmail', 'icloud', 'outlook365', 'ses', 'yahoo'];
7 changes: 5 additions & 2 deletions x-pack/legacy/plugins/monitoring/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { initInfraSource } from './server/lib/logs/init_infra_source';
*/
export const monitoring = kibana =>
new kibana.Plugin({
require: ['kibana', 'elasticsearch', 'xpack_main'],
require: ['kibana', 'elasticsearch', 'xpack_main', 'alerting', 'actions'],
id: 'monitoring',
configPrefix: 'xpack.monitoring',
publicDir: resolve(__dirname, 'public'),
Expand Down Expand Up @@ -59,6 +59,7 @@ export const monitoring = kibana =>
}),
injectUiAppVars: server.injectUiAppVars,
log: (...args) => server.log(...args),
logger: server.newPlatform.coreContext.logger,
getOSInfo: server.getOSInfo,
events: {
on: (...args) => server.events.on(...args),
Expand All @@ -73,11 +74,13 @@ export const monitoring = kibana =>
xpack_main: server.plugins.xpack_main,
elasticsearch: server.plugins.elasticsearch,
infra: server.plugins.infra,
alerting: server.plugins.alerting,
usageCollection,
licensing,
};

new Plugin().setup(serverFacade, plugins);
const plugin = new Plugin();
plugin.setup(serverFacade, plugins);
},
config,
deprecations,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading