Your window into the Elastic Stack
Find a file
Matt Bargar 539bc6f3a2
Improve KQL error messages (#34900)
Attempts to make KQL syntax errors more sensical to the average user.

I initially tried to use a similar solution to the one we used for detecting usage of old lucene syntax. In other words, I tried to create rules in the grammar that would match strings containing common mistakes the user might make and throw custom error messages for each situation. This proved to be more difficult for detecting errors in the regular language. While the Lucene rules could be completely separated from the main grammar, the KQL error rules had to be mixed into the main grammar which made it much more complex and had a lot of unintended side effects.

So instead I decided to lean more heavily on PEG's built in error reporting. Giving certain rules human readable names allows the parser to use those names in the error reporting instead of auto generating a long list of possible characters that might be expected based on the matching rules. Since the PEG errors contain location information I was also able to add ascii art that points the user to exactly where the error occurred in their query string. While this approach is not quite as nice as bespoke error messages that tell the user exactly what is wrong in plain English, it's much more maintainable and I think it still results in much better error messages compared to what we have today.

I've also removed the old original kuery grammar (for queries like is(response, 200)). We were only using it to display an error if I user was still using the old syntax. This version of kuery hasn't existed since 6.3 and we've had error messages telling users this since then. I think it's safe to remove the legacy parser at this point, which greatly reduces the complexity of our error reporting.
2019-04-24 16:40:38 -04:00
.ci [packer_cache] make packer_cache idempotent 2019-03-31 18:13:10 -07:00
.github [Code] Add code owners (#35498) 2019-04-24 11:08:32 -07:00
bin Bump node to 10.15.1 (#27918) 2019-02-05 16:06:59 -06:00
common/graphql [Uptime] Implement EuiSuperDatePicker (#28217) 2019-01-18 13:44:58 -05:00
config Swap defaultAddId with defaultRoute in example config (#28547) 2019-03-08 14:38:31 +09:00
data [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
docs [DOCS] Updates docs for Console (#35505) 2019-04-24 15:06:30 -04:00
licenses Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
packages Improve KQL error messages (#34900) 2019-04-24 16:40:38 -04:00
plugins [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
rfcs Update RFC-0001 with PR and issue links (#33598) 2019-03-20 14:15:47 -04:00
scripts adding spec to console utility as Kibana script (#35232) 2019-04-17 20:40:32 -04:00
src Improve KQL error messages (#34900) 2019-04-24 16:40:38 -04:00
style_guides Point to EUI for SASS/CSS guidelines (#27415) 2018-12-18 14:39:38 -05:00
tasks Improve KQL error messages (#34900) 2019-04-24 16:40:38 -04:00
test Improve KQL error messages (#34900) 2019-04-24 16:40:38 -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 Improve dll plugin relation with webpackshims (#30129) 2019-02-22 01:45:42 +00:00
x-pack Make time_zone parameter properly volatile (#35536) 2019-04-24 21:13:33 +02:00
.backportrc.json Fix .backportrc.json to use 7.x instead of 7.1 (#30253) 2019-02-06 10:49:00 -05: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 Improve KQL error messages (#34900) 2019-04-24 16:40:38 -04:00
.eslintrc.js chore(NA): prettier end of line auto detection on linting. (#34799) 2019-04-23 02:12:40 +01:00
.gitattributes [canvas] Color fixes + Storybook 5 (#34075) 2019-04-02 11:21:51 -05:00
.gitignore Implement built_assets directory (#27468) 2019-01-09 17:30:29 -07:00
.i18nrc.json Improve KQL error messages (#34900) 2019-04-24 16:40:38 -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 Dark mode fixes for Visualize charts, TSVB, and Timelion (#30478) 2019-02-14 11:46:56 -05:00
.yarnrc [kbn-pm] Use yarn workspaces for dependencies (#24095) 2018-11-12 12:38:11 -06:00
CONTRIBUTING.md docs: Add test file location -> test runner table (#34986) 2019-04-19 09:06:25 +02:00
FAQ.md propose language changes (#10709) 2017-03-05 12:10:32 -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 [APM] Optimize idx calls to native optional chaining (#34841) 2019-04-22 13:37:07 -07:00
package.json update chromedriver 2019-04-24 09:45:05 -07: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
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 Upgrade EUI to v10.0.1 (#35112) 2019-04-17 09:16:34 -05:00
tsconfig.types.json Generate core API docs from TSDoc comments (#32148) 2019-04-03 12:26:00 +02:00
TYPESCRIPT.md Migrate from tslint (#33826) 2019-04-05 17:45:23 +01:00
yarn.lock update chromedriver 2019-04-24 09:45:05 -07: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.