forked from bitsensor/elastalert-kibana-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
29 lines (28 loc) · 786 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import elastAlertAPI from './server/routes/elastalert';
export default function (kibana) {
return new kibana.Plugin({
name: 'elastalert-kibana-plugin',
uiExports: {
app: {
title: 'ElastAlert',
description: 'A way to create, test and edit ElastAlert rules within Kibana.',
main: 'plugins/elastalert-kibana-plugin/app'
}
},
config(Joi) {
return Joi.object({
enabled: Joi.boolean().default(true),
serverHost: Joi.string()
.hostname()
.default('localhost'),
serverPort: Joi.number()
.integer()
.default(3030),
serverSsl: Joi.boolean().default(false)
}).default();
},
init(server, options) {
elastAlertAPI(server, options);
}
});
}