## Summary Adds these data types to the value based lists end points from [Elasticsearch field data types](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html): Single value based list types: * binary * boolean * byte * date * date_nanos * date_range * double * float * integer * ip * half_float * keyword * text * long * short Range value based list types: * double_range * float_range * integer_range * ip_range * long_range Geo value based list types: (caveat is that you cannot query them using other geometry just yet ... you can only these and export them) * geo_point * geo_shape * shape For importing and exporting different values such as ranges, geo, or single values, this introduces a serialize and deserialize option for the endpoints. For example if you want to serialize in an ip_range such as 192.168.0.1,192.168.0.3 which has a comma between the two would use the following: ```ts POST /api/lists { "name": "List with an ip range", "serializer": "(?<gte>.+),(?<lte>.+)", "deserializer": "{{gte}},{{lte}}", "description": "This list has ip ranges", "type": "date_range" } ``` If you want to serialize in keywords from a list that _only_ match a particular value you would use the following: ```ts POST /api/lists { "id": "keyword_custom_format_list", "name": "Simple list with a keyword using a custom format", "description": "This parses the first found ipv4 only", "serializer": "(?<value>((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))", "deserializer": "{{value}}", "type": "keyword" } ``` The serializer is a [named capturing group](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) while the deserializer is using [MustacheJS](https://github.com/janl/mustache.js/). The range type, single value types, and geo types all have default captures for their serialize and default mustache templates if none are configured with an endpoint. The default capture groups and mustache handles for each are: * shape, geo_point, geo_shape: `(?<lat>.+),(?<lon>.+)` * date_range: `(?<gte>.+),(?<lte>.+)|(?<value>.+)` * other ranges are: `(?<gte>.+)-(?<lte>.+)|(?<value>.+)` * all single data types: `(?<value>.+)` For ranges you can use both `gte, lte`, and `value` together. If `gte` _and_ `lte` matches it will use that for the greater than, less than elastic range and ignore `value` even if `value` also matched. If _only_ `value` matches and `gte`, `lte` does not match then it will use `value` and put `value` as _both_ the `gte`, and `lte`. For example, if you are serializing in a list of ip ranges as the list data type, `ip_range` and you have these 3 entries in the file: ```ts 127.0.0.1 127.0.0.2-5 ``` The default `serializer` will use `(?<gte>.+)-(?<lte>.+)|(?<value>.+)` and you will get two elastic documents like so: ```ts { "_source" : { "ip_range" : { "gte" : "127.0.0.1", "lte" : "127.0.0.1" } } { "_source" : { "ip_range" : { "gte" : "127.0.0.2", "lte" : "127.0.0.5" } } ``` The default mustache handles for each are: * shape, geo_point, geo_shape: `{{{lat}}},{{{lon}}}` * date_range: `{{{gte}}},{{{lte}}}` * other ranges are: `{{{gte}}}-{{{lte}}}` * all values are: `{{{value}}}` I use three instead of two handle bars (`{{{` vs.` {{`) so that HTML is not escaped for the lists. You can override and change it if you need or want the escaping. If during the deserializer phase it detects that a `gte` and `lte` are exactly the same it will still output them as a two items and use the mustache deserialize value. Using the ip-range example above that will be outputted like so since it detects that the lte-gte are exactly the same value: ```ts 127.0.0.1-127.0.0.1 127.0.0.2-127.0.0.5 ``` --- Interesting queries to run from the lists scripts folder for testing: Load some small test files from `./lists/files` for example: ```ts ./import_list_items_by_filename.sh ip_range ./lists/files/ip_range_cidr.txt ./import_list_items_by_filename.sh ip_range ./lists/files/ip_range.txt ./import_list_items_by_filename.sh date ./lists/files/date.txt ./import_list_items_by_filename.sh ip_range ./lists/files/ip_range_mixed.txt ... ``` Export them ```ts ./export_list_items.sh ip_range_cidr.txt ./export_list_items.sh ip_range.txt ./export_list_items.sh date.txt ./export_list_items.sh ip_range_mixed.txt ... ``` Find on them ```ts ./find_list_items.sh ip_range_cidr.txt ./find_list_items.sh ip_range.txt ./find_list_items.sh date.txt ./find_list_items.sh ip_range_mixed.txt ... ``` Find specific values such as: ```ts ./get_list_item_by_value.sh ip_range_mixed.txt 192.168.0.1 ./get_list_item_by_value.sh date.txt 2020-08-25T17:57:01.978Z ... ``` ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios |
||
---|---|---|
.ci | ||
.github | ||
common/graphql | ||
config | ||
data | ||
docs | ||
examples | ||
licenses | ||
packages | ||
rfcs | ||
scripts | ||
src | ||
tasks | ||
test | ||
typings | ||
utilities | ||
vars | ||
webpackShims | ||
x-pack | ||
.backportrc.json | ||
.browserslistrc | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.js | ||
.fossa.yml | ||
.gitattributes | ||
.gitignore | ||
.i18nrc.json | ||
.node-version | ||
.nvmrc | ||
.prettierrc | ||
.sass-lint.yml | ||
.telemetryrc.json | ||
.yarnrc | ||
api-documenter.json | ||
CONTRIBUTING.md | ||
FAQ.md | ||
github_checks_reporter.json | ||
Gruntfile.js | ||
Jenkinsfile | ||
kibana.d.ts | ||
LICENSE.txt | ||
NOTICE.txt | ||
package.json | ||
preinstall_check.js | ||
README.md | ||
renovate.json5 | ||
STYLEGUIDE.md | ||
tsconfig.browser.json | ||
tsconfig.json | ||
tsconfig.types.json | ||
TYPESCRIPT.md | ||
yarn.lock |
Kibana
Kibana is your window into the Elastic Stack. Specifically, it's a browser-based analytics and search dashboard for Elasticsearch.
- Getting Started
- Documentation
- Version Compatibility with Elasticsearch
- Questions? Problems? Suggestions?
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:
- Download the latest version on the Kibana Download Page.
- Learn more about Kibana's features and capabilities on the Kibana Product Page.
- We also offer a hosted version of Kibana on our Cloud Service.
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:
- CONTRIBUTING.md will help you get Kibana up and running.
- If you would like to contribute code, please follow our STYLEGUIDE.md.
- Learn more about our UI code with UI_SYSTEMS.md.
- For all other questions, check out the FAQ.md and wiki.
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.