Your window into the Elastic Stack
Find a file
Ryland Herrick cd8fe02ed0
[SIEM] Shim backend for new platform (#50240) (#50978)
* Add shims for new platform structure

Defines both our Plugin class and the factory function.

* Simplify server init code path

We were doing some work with server, then dropping into another function
to further mutate it. I'm moving this all to the same level
(initServerWithKibana) to make decoupling from Hapi simpler to follow.

* Remove unnecessary casting

Server has newPlatform on it, now.

* Remove unused arguments

These had their usage removed in #36662 but their signature remained.

Since we're trying to pin down the existing interface with hapi, this is
just noise that should be deleted.

* Remove unneeded destructuring

This was only needed for a type assertion, originally.

* Document current interface with hapi via ServerFacade

This is everything we're using from hapi's server right now. The next
step is moving what we can to the new platform, and abstracting the
rest behind a facade layer.

* Include NP plugin in initialization path

* Instantiates plugin and passes NP modules
  * We're just passing the LoggerFactory from the init context, for now.
* Whitelist functionality from Server, pass through as ServerFacade
  * This will verify our facade at runtime in addition to typechecking
* Uses Pick and Partial to use existing types while shimming properties
  as we go

* Remove redundant logging mechanism

We were logger in two different ways, but we can move to the NP version
now that it's ready.

* Bind server's route function context

This was causing a test failure and needed to be bound similarly to the
register function. Slight rename of variables as well.

* Type Hapi.Request usage via RequestFacade

This is everything we're currently using from Hapi.Request; as we move
things away we can update this interface and let TS tell us what's
broken.

Remove any typing of our request payloads

These _can_ have fields like `variables` and `operationName` from
graphQL, or they might not. In the majority of cases the payload was
typed as any, and to cut down on churn and because I have no confidence
in typing each individual request, we're going to make that the default.

* Inline our GraphQL Hapi plugin

A la uptime, this effectively just moves the call to server.route() into
the function itself, rather than registering a Hapi plugin that
ultimately does the same.

* Remove register from our list of Hapi dependencies

This was only used to register our GraphQL plugin(s), which are now
inlined and use `route`.

* Invoke existing init path from plugin's setup

This isn't the final format as we're eventually doing away with __legacy
entirely, but this makes our plugin 'live' and is a step in the right
direction.

* Remove usage of Pick in favor of a type assertion

The onus here should be on the shim invocation, not the plugin itself.

* Pass existing NP modules into our plugin

Another step toward the proper plugin signature.

We're needlessly destructuring coreContext just to get the logger and
pass it right back in. The other logger usage will be removed momentarily when we change the signature of `initServerWithKibana`.

Also adds core and plugins to our setup method, which are currently
unused.

* Remove dependence on newPlatform property in Server

We now get these through NP's initializerContext, so we do that in the
plugin now instead. The extra parameters are gross but temporary
(initServerWithKibana will eventually go away), and
it's much better to shrink the size of ServerFacade.

* Remove unused mocking fn/logging/tests

These are relics from the initial graphQL implementation and are no
longer used.

* Move log statement into plugin

Makes more sense to decorate the init invocation than to log 'start'
from outside and 'end' from inside.

* Fix shape of our InitializerContext

While PluginInitializerContext type has the env property,  the
newPlatform object on the Server has it in a different shape.

* Ensure our request payloads are typed

Rather than the free-for-all of `any`, let's instead type our payload as
unknown and actually name the request types whose payloads are being
reached into. A type assertion in the resolver for these requests is the
secret sauce here.
2019-11-18 18:33:08 -06:00
.ci [7.x] Add labels to shell scripts in Jenkins (#49657) (#50794) 2019-11-15 14:47:14 -05:00
.github Delete CODEOWNERS (#41944) 2019-07-25 09:19:41 +03:00
bin Update node options Initialization on our scripts (#40302) (#43358) 2019-08-15 17:30:07 +01:00
common/graphql [Uptime] Implement EuiSuperDatePicker (#28217) 2019-01-18 13:44:58 -05:00
config Fixing kibana.yml doc comments for elasticsearch.ssl.certificate/key (#49262) (#49351) 2019-10-25 09:42:02 -07:00
data [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
docs [7.x] [DOCS] Update 7.5.0 Release Notes to include Code (#50977) (#50986) 2019-11-18 16:57:15 -06:00
licenses Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
packages [page_objects/common_page] convert to ts (#50771) (#50968) 2019-11-18 23:00:27 +01:00
rfcs/text Console to NP ready (#43346) (#45511) 2019-09-12 18:30:03 +02:00
scripts [7.x] [Newsfeed] UI plugin for Kibana (#49579) (#50503) 2019-11-13 14:36:23 -07:00
src Tina heiligers backport/7.x/pr 50444 (#50974) 2019-11-18 15:58:45 -07:00
style_guides Style guide cleanup (#46464) (#46559) 2019-09-25 13:19:15 +02:00
tasks [7.x] [Newsfeed] UI plugin for Kibana (#49579) (#50503) 2019-11-13 14:36:23 -07:00
test [page_objects/common_page] convert to ts (#50771) (#50968) 2019-11-18 23:00:27 +01:00
typings [7.x] [Telemetry] Move to OSS (#45769) (#48370) 2019-10-16 11:50:17 +03:00
utilities [7.x] [mkdirp] remove in favor of recursive fs.mkdir (#47251) (#47333) 2019-10-04 09:35:21 -07:00
vars [7.x] Add labels to shell scripts in Jenkins (#49657) (#50794) 2019-11-15 14:47:14 -05:00
webpackShims [7.x] Add lru-cache shim (#49014) (#49092) 2019-10-23 15:04:26 -05:00
x-pack [SIEM] Shim backend for new platform (#50240) (#50978) 2019-11-18 18:33:08 -06:00
.backportrc.json [backport-config] Adds 7.4 branch (#44402) 2019-08-29 10:11:53 -07:00
.browserslistrc [7.x] [autoprefixer] upgrade to 9.6.1, unify browserslist hand… (#41145) 2019-07-15 13:01:17 -07:00
.editorconfig Apply the same editorconfig rules to both markdown and asciidoc files 2016-09-07 11:41:41 -04:00
.eslintignore Update eslint related packages (#48513) (#48853) 2019-10-22 06:41:28 -07:00
.eslintrc.js [ML] Fixing some of the eslint rule breakages in ML (#49716) (#49758) 2019-10-31 13:54:24 +00:00
.gitattributes [7.x] [canvas] Color fixes + Storybook 5 (#34075) (#34369) 2019-04-02 16:35:28 -05:00
.gitignore [7.x] [APM] Script optimization of APM-specific tsconfig (#498… (#50151) 2019-11-11 15:56:16 +01:00
.i18nrc.json [7.x] [Newsfeed] UI plugin for Kibana (#49579) (#50503) 2019-11-13 14:36:23 -07:00
.node-version Bump node to 10.15.2 (#32200) 2019-02-28 10:49:28 -06:00
.nvmrc Bump node to 10.15.2 (#32200) 2019-02-28 10:49:28 -06:00
.prettierrc Increase prettier line width to 100 (#20535) 2018-07-09 22:50:37 +02:00
.sass-lint.yml Move query utils ⇒ NP (#49636) (#50633) 2019-11-14 14:49:25 +02:00
.yarnrc [kbn-pm] Use yarn workspaces for dependencies (#24095) 2018-11-12 12:38:11 -06:00
CONTRIBUTING.md Better explanation about the Prettier recommendation (extension vs. NPM module) (#50629) (#50936) 2019-11-18 18:36:27 +00: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) (#35906) 2019-05-01 19:53:02 -05:00
Gruntfile.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
Jenkinsfile [7.x] Add labels to shell scripts in Jenkins (#49657) (#50794) 2019-11-15 14:47:14 -05:00
kibana.d.ts Update eslint related packages (#48513) (#48853) 2019-10-22 06:41:28 -07:00
LICENSE.txt Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
NOTICE.txt [7.x] standardize notice-comment usage (#48677) (#48814) 2019-10-21 15:55:00 -07:00
package.json update chromedriver to 78 (#50737) (#50822) 2019-11-16 01:59:23 +01:00
preinstall_check.js Apache 2.0 license headers (#19383) 2018-05-28 20:06:30 -07:00
README.md [7.x] chore: point issue links to choose (#49616) (#49648) 2019-10-29 20:37:52 +01:00
renovate.json5 Provide uiSettings service in NP (#48413) (#49531) 2019-10-28 20:32:51 -04:00
STYLEGUIDE.md [7.x] Upgrade to TypeScript 3.7.2 (#47188) (#50756) 2019-11-15 13:49:03 +01:00
tsconfig.browser.json [typescript] continue to use the default config in development (#21966) 2018-08-14 15:27:07 -07:00
tsconfig.json Es ui shared updates (#46570) (#46716) 2019-10-29 11:25:50 +01:00
tsconfig.types.json [Core] Move Saved objects files to core (#38771) (#39158) 2019-06-19 17:27:16 +02:00
TYPESCRIPT.md Fix path references into and out of x-pack/legacy 2019-06-20 13:35:00 -04:00
yarn.lock Make babel understand TypeScript 3.7 syntax (#50772) (#50802) 2019-11-16 15:14:10 +01: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.