Go to file
Mike Côté 98f7c75ff4
Introduce basic alerting and actions plugin (#37042)
* Create actions plugin (#35679)

* Basic alerting plugin with actions

* Remove relative imports

* Code cleanup

* Split service into 3 parts, change connector structure

* Ability to disable plugin, ability to get actions

* Add slack connector

* Add email connector

* Ability to validate params and connector options

* Remove connectorOptionsSecrets for now

* Fix plugin config validation

* Add tests for slack connector

* Default connectors register on plugin init, console renamed to log, slack to message_slack

* Add remaining API endpoints for action CRUD

* Add list connectors API

* Change actions CRUD APIs to be closer with saved objects structure

* WIP

* Fix broken tests

* Add encrypted attribute support

* Add params and connectorOptions for email

* WIP

* Remove action's ability to have custom ids

* Remove ts-ignore

* Fix broken test

* Remove default connectors from this branch

* Fix API integration tests to use fixture connector

* Rename connector terminology to action type

* Rename actionTypeOptions to actionTypeConfig

* Code cleanup

* Fix broken tests

* Rename alerting plugin to actions

* Some code cleanup and add API unit tests

* Change signature of action type service execute function

* Add some plugin api integration tests

* Fix type check failure

* Code cleanup

* Create an actions client instead of an action service

* Apply Bill's PR feedback

* Fix broken test

* Find function to have destructured params

* Add tests to ensure encrypted attributes are not returned

* Fix broken test

* Add tests for validation

* Ensure actions can be updated without re-passing the config

* Remove dead code

* Test cleanup

* Fix eslint issue

* Apply Peter's PR feedback

* Code cleanup and fix broken tests

* Apply Brandon's PR feedback

* Add namespace support

* Fix broken test

* Pass services to action executors (#37194)

* Pass services to action executors

* Fix tests

* Apply PR feedback

* Apply PR feedback pt2

* Cleanup actions plugin (#37250)

* Cleanup actions, move code from alerting plugin PR

* Rename service terminology to registry

* Use static encryption key for encrypted attributes plugin inside of tests

* Empty data after create test is done running

* Fix type checks

* Fix inconsistent naming

* add server log action for alerting (#37530)

adds the first "builtin" alertType for performing a `server.log()`

* Create alerting plugin (#37043)

* WIP

* Rename fire function and remove @ts-ignore in all places

* Change naming in alerting service

* Remove alert instance class for now, support interval configuration

* Cleanup TS

* Split alerting between registry and client

* Use saved object alongside task manager instance

* Add remaining alerting APIs

* Change create structure

* Rename some variables, change actionGroups structure

* Use handlebars for templating strings at fire time

* Fix params given to alert type execute function

* Use alert instance class

* Alert instances support meta attributes

* Move alert instances deserialization

* Change interval to be ms

* Rename actions es archive

* Fix tests to use encrypted esArchive for action record

* Add create alert test to demo end to end flow

* Fix type check issue

* Alerts to use references to action objects

* Only update task manager tasks after saved objects are fully updated

* Use scope in task manager

* Fix type check

* Use task manager to execute actions

* Convert ids into references and back

* Apply PR feedback

* Fix broken test

* Fix some bugs

* Fix test errors

* Alert interval to be previous runAt + interval instead of now + interval

* Add range support

* Remove extra line

* Cleanup

* Add alert_instance.test.ts

* Add alert_type_registry.test.ts

* Move tests around

* Create generic task manager mock

* Add note about saved objects client mock

* Create alert_type_registry.mock.ts

* Add alerts_client.test.ts

* Add create_alert_instance_factory.test.ts

* Add create_fire_handler.test.ts

* WIP

* Fix get_create_task_runner_function.test.ts and make test pass

* Make get_create_task_runner_function.test.ts 100% coverage

* Add unit tests for routes

* Move files around

* Created transform_action_params.ts

* Add get_next_run_at.ts

* Add comment explaining why we copy nextRunAt

* Re-use state within alert instance

* Finalize code coverage in unit tests

* Create base api integration tests

* Add a test that ensures end to end functionality of an alert

* Fix ui capabilities test

* Fix broken plugin api integration test

* Fix jest tests with new saved objects client

* Fix broken integration tests

* Change api integration test fixture to make more sense, add functions for future tests

* Move alerts integration testing into own file, prep to add more tests

* Add tests to ensure failed task instances get retried

* Add get_create_task_runner_function.test.ts for actions, create encrypted saved objects mock

* Add action validation tests

* Ensure action type validation occurs on update

* Test 400 on unregistered alert types

* Ensure alertTypeId can't be updated

* Add validation test for alert create / update

* Fix broken checks / tests

* Skip failing test for now

* Cleanup jest tests

* Ensure action objects can be updated while keeping encrypted attributes readable

* Remove partial update sopport, remove ability to change actionTypeId, require config

* Ensure actionTypeConfig is validated on create and update

* Add alertTypeParams validation support

* Fix failing tests

* Ensure alert cleanup errors don't replace the original error

* Pass callCluster as a service to alerts and actions

* Only pass log to alerts client

* Pass savedObjectsClient as a service to alerting and actions

* Fix failing tests

* Remove range support, provide when current and previous task got scheduled

* Ensure Joi validation happens before every execute

* Remove skipped tests, to be done in future PR

* Apply self feedback pt1

* Apply self feedback pt2

* Fix broken tests

* Apply PR feedback

* PR feedback pt1

* Apply security team PR feedback

* PR feedback pt1

* PR feedback pt2

* PR feedback pt3

* Fix broken tests

* Fix callCluster to have signature

* Revert f11a6aeb06

* PR feedback pt4

* Remove __jest__ folders

* PR feedback pt5

* Fix Joi from leaking secrets

* Fire instance actions in parallel instead of series

* Fix failing jest tests

* Accept core api changes

* Fix saved objects client mock

* PR feedback pt1

* Fix eslint issues

* Throw error when alert instance already fired (#39251)

* Throw error when alert instance already fired

* shouldFire doesn't need its own boolean value

* Actions & alerting getting started user guides (#39093)

* Initial user guides

* Cleanup

* Typos, example changes

* Switch to tables, use ordered list for usage

* Start docs around alert instances and templating

* Documentation changes

* Some adjustments

* Apply PR feedback

* Apply suggestions from code review

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* PR feedback pt2

* Provide better examples for alert types

* Apply PR feedback

* Update README locations
2019-06-20 19:37:17 -04:00
.ci Revert "Temporarily invalidate node_modules cache" 2019-06-20 15:04:51 -04:00
.github Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
bin ignore old browserlist data in dist (#39134) 2019-06-18 03:39:32 -07:00
common/graphql [Uptime] Implement EuiSuperDatePicker (#28217) 2019-01-18 13:44:58 -05:00
config Add language codes in comment (#37635) 2019-06-06 16:41:01 -07:00
data [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
docs Remove final legacy dependencies from Header UI (#38175) 2019-06-20 15:57:02 -05:00
licenses Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
packages [kbn/es] support minor version numbers (#39353) 2019-06-20 14:52:28 -07:00
plugins [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
rfcs [RFC] ApplicationService mounting (#36477) 2019-06-18 14:32:34 -05:00
scripts Implement renovate config generator (#38369) 2019-06-07 13:30:59 -07:00
src Introduce basic alerting and actions plugin (#37042) 2019-06-20 19:37:17 -04:00
style_guides Point to EUI for SASS/CSS guidelines (#27415) 2018-12-18 14:39:38 -05:00
tasks New Platform and Legacy platform servers integration (#39047) 2019-06-19 16:32:37 +02:00
test Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
typings Migrate from tslint (#33826) 2019-04-05 17:45:23 +01:00
utilities Only using known handlers with handlebars (#27061) 2018-12-17 08:29:37 -08:00
webpackShims [tinymath] use the es5 build (#38911) 2019-06-13 12:03:34 -07:00
x-pack Introduce basic alerting and actions plugin (#37042) 2019-06-20 19:37:17 -04:00
.backportrc.json Updates backport branches (#36957) 2019-05-22 20:51:06 -07:00
.browserslistrc Convert all Less files to Sass in Dashboard, using EUI variable scope (#21374) 2018-08-14 19:05:33 -04:00
.editorconfig [editorconfig] disable insert_final_newline for package.json 2019-04-18 09:44:17 -07:00
.eslintignore Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
.eslintrc.js Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
.gitattributes [canvas] Color fixes + Storybook 5 (#34075) 2019-04-02 11:21:51 -05:00
.gitignore chore(na): revert relative cache-loader (#39266) 2019-06-19 17:01:51 +01:00
.i18nrc.json Introduce basic alerting and actions plugin (#37042) 2019-06-20 19:37:17 -04:00
.node-version Bump node to 10.15.2 (#32200) 2019-02-28 10:48:42 -06:00
.nvmrc Bump node to 10.15.2 (#32200) 2019-02-28 10:48:42 -06:00
.prettierrc Increase prettier line width to 100 (#20535) 2018-07-09 22:50:37 +02:00
.sass-lint.yml Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
.yarnrc [kbn-pm] Use yarn workspaces for dependencies (#24095) 2018-11-12 12:38:11 -06:00
CONTRIBUTING.md [DOCS] Add instructions to develop against remote ES (#39138) 2019-06-18 10:32:16 -05:00
FAQ.md propose language changes (#10709) 2017-03-05 12:10:32 -05:00
github_checks_reporter.json implementing github checks - second attempt (#35757) 2019-05-01 16:02:33 -05:00
Gruntfile.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
kibana.d.ts Migrate from tslint (#33826) 2019-04-05 17:45:23 +01:00
LICENSE.txt Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
NOTICE.txt [ML] Job Selector - remove old job selector directory (#36697) 2019-05-21 12:30:24 -04:00
package.json Remove final legacy dependencies from Header UI (#38175) 2019-06-20 15:57:02 -05:00
preinstall_check.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
README.md Update paths to ui, server, deprecation, plugin_discovery in src/legacy 2019-02-11 10:41:37 -05:00
renovate.json5 Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
STYLEGUIDE.md Point to EUI for SASS/CSS guidelines (#27415) 2018-12-18 14:39:38 -05:00
tsconfig.browser.json [typescript] continue to use the default config in development (#21966) 2018-08-14 15:27:07 -07:00
tsconfig.json Warn in Typescript when using Array.flat() or .flatMap() without polyfill (#37558) 2019-06-03 13:52:38 -04:00
tsconfig.types.json [Core] Move Saved objects files to core (#38771) 2019-06-18 13:10:23 +02:00
TYPESCRIPT.md Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
yarn.lock Remove final legacy dependencies from Header UI (#38175) 2019-06-20 15:57:02 -05:00

Kibana

Kibana is your window into the Elastic Stack. Specifically, it's a browser-based analytics and search dashboard for Elasticsearch.

Getting Started

If you just want to try Kibana out, check out the Elastic Stack Getting Started Page to give it a whirl.

If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the Kibana Getting Started Page.

Using a Kibana Release

If you want to use a Kibana release in production, give it a test run, or just play around:

Building and Running Kibana, and/or Contributing Code

You might want to build Kibana locally to contribute some code, test out the latest features, or try out an open PR:

Documentation

Visit Elastic.co for the full Kibana documentation.

For information about building the documentation, see the README in elastic/docs.

Version Compatibility with Elasticsearch

Ideally, you should be running Elasticsearch and Kibana with matching version numbers. If your Elasticsearch has an older version number or a newer major number than Kibana, then Kibana will fail to run. If Elasticsearch has a newer minor or patch number than Kibana, then the Kibana Server will log a warning.

Note: The version numbers below are only examples, meant to illustrate the relationships between different types of version numbers.

Situation Example Kibana version Example ES version Outcome
Versions are the same. 5.1.2 5.1.2 💚 OK
ES patch number is newer. 5.1.2 5.1.5 ⚠️ Logged warning
ES minor number is newer. 5.1.2 5.5.0 ⚠️ Logged warning
ES major number is newer. 5.1.2 6.0.0 🚫 Fatal error
ES patch number is older. 5.1.2 5.1.0 ⚠️ Logged warning
ES minor number is older. 5.1.2 5.0.0 🚫 Fatal error
ES major number is older. 5.1.2 4.0.0 🚫 Fatal error

Questions? Problems? Suggestions?

  • If you've found a bug or want to request a feature, please create a GitHub Issue. Please check to make sure someone else hasn't already created an issue for the same topic.
  • Need help using Kibana? Ask away on our Kibana Discuss Forum and a fellow community member or Elastic engineer will be glad to help you out.