Skip to content

Commit

Permalink
Merge with master and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Dec 18, 2020
2 parents d7e5bcf + ca24e11 commit b73881a
Show file tree
Hide file tree
Showing 466 changed files with 11,956 additions and 4,436 deletions.
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=14.15.1
ARG NODE_VERSION=14.15.2

FROM node:${NODE_VERSION} AS base

Expand Down
Empty file removed data/.empty
Empty file.
1 change: 1 addition & 0 deletions docs/api/upgrade-assistant.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ include::upgrade-assistant/status.asciidoc[]
include::upgrade-assistant/reindexing.asciidoc[]
include::upgrade-assistant/batch_reindexing.asciidoc[]
include::upgrade-assistant/batch_queue.asciidoc[]
include::upgrade-assistant/default-field.asciidoc[]
include::upgrade-assistant/check_reindex_status.asciidoc[]
include::upgrade-assistant/cancel_reindex.asciidoc[]
2 changes: 0 additions & 2 deletions docs/api/upgrade-assistant/check_reindex_status.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

experimental[] Check the status of the reindex operation.

Check the status of the reindex operation.

[[check-reindex-status-request]]
==== Request

Expand Down
113 changes: 113 additions & 0 deletions docs/api/upgrade-assistant/default-field.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
[[upgrade-assistant-api-default-field]]
=== Add default field API
++++
<titleabbrev>Add default field</titleabbrev>
++++

experimental[] In {es} 7.0 and later, some query types, such as Simple Query String, have a limit to the number of fields they can query against.
To configure the cap in {es}, set the `indices.query.bool.max_clause_count` cluster setting, which is 1024 by default.

For indices with more fields than the cap, add the `index.query.default_field` index setting to inform {es} which
fields to use by default when no field is specified for a query. Use the add default field API to add the `index.query.default_field` setting to an {es} index.

[[upgrade-assistant-api-default-field-request]]
==== Request

To add the `index.query.default_field` setting to an {es} index, submit a POST request to `/api/upgrade_assistant/add_query_default_field/<index>`:

[source,js]
--------------------------------------------------
GET /api/upgrade_assistant/add_query_default_field/myIndex
{
"fieldTypes": ["text", "keyword"], <1>
"otherFields": ["myField.*"] <2>
}
--------------------------------------------------
// KIBANA

<1> A required array of {es} field types that generate the list of fields.
<2> An optional array of additional field names, dot-deliminated.

To add the `index.query.default_field` index setting to the specified index, {kib} generates an array of all fields from the index mapping.
The fields contain the types specified in `fieldTypes`. {kib} appends any other fields specified in `otherFields` to the array of default fields.

[[upgrade-assistant-api-default-field-response-codes]]
==== Response codes

`200`::
Indicates a successful call.

`400`::
Indicates that the index already has the `index.query.default_field` setting. No changes are made to the index.

[[upgrade-assistant-api-default-field-response-body]]
==== Response body

The response body contains a JSON structure, similar to the following:

[source,js]
--------------------------------------------------
{
"acknowledged": true
}
--------------------------------------------------

[[upgrade-assistant-api-default-field-example]]
==== Example

Your index contains following mappings:

[source,js]
--------------------------------------------------
GET /myIndex/_mappings
{
"myIndex": {
"mappings": {
"properties": {
"field1": { "type": "text" },
"field2": { "type": "float" },
"nestedfield": {
"properties": {
"field3": { "type": "keyword" },
"field4": { "type": "long" },
}
}
}
}
}
}
--------------------------------------------------
// CONSOLE

Make the following request to {kib}:

[source,js]
--------------------------------------------------
GET /api/upgrade_assistant/add_query_default_field/myIndex
{
"fieldTypes": ["text", "long"],
"otherFields": ["field2"]
}
--------------------------------------------------
// KIBANA

The API returns the following:

[source,js]
--------------------------------------------------
GET /myIndex/_settings?flat_settings=true
{
"myIndex": {
"settings": {
"index.query.default_field": [
"field1",
"nestedfield.field4",
"field2",
]
}
}
}
--------------------------------------------------
// CONSOLE

{kib} generates the `field1` and `nestedfield.field4` values based on the specified `fieldTypes`, then appends the `otherFields` to the array.
2 changes: 1 addition & 1 deletion docs/canvas/canvas-share-workpad.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For more information, refer to <<reporting-getting-started, Reporting from Kiban

If you have a subscription that supports the {report-features}, you can create a POST URL that you can use to automatically generate PDF reports using <<watcher-ui,Watcher>> or a script.

To begin, click *Share > PDF reports > Copy POST URL*.
To begin, click *Share > PDF reports > Advanced options > Copy POST URL*.

[role="screenshot"]
image::images/canvas-create-URL.gif[Image showing how to create POST URL]
Expand Down
Binary file modified docs/canvas/images/canvas-create-URL.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/canvas/images/canvas-generate-pdf.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ heatmap charts.
|{kib-repo}blob/{branch}/src/plugins/vis_type_xy/README.md[visTypeXy]
|Contains the new xy-axis chart using the elastic-charts library, which will eventually
replace the vislib xy-axis (bar, area, line) charts.
replace the vislib xy-axis charts including bar, area, and line.
|{kib-repo}blob/{branch}/src/plugins/visualizations/README.md[visualizations]
Expand Down
2 changes: 1 addition & 1 deletion docs/fleet/fleet.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ image::fleet/images/fleet-start.png[{fleet} app in {kib}]
== Get started

To get started with {fleet}, refer to the
{ingest-guide}/index.html[{fleet}] docs.
{fleet-guide}/index.html[{fleet}] docs.
2 changes: 1 addition & 1 deletion docs/getting-started/quick-start-guide.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ For more information, refer to <<lens, *Lens*>>.

If you are you ready to add your own data, refer to <<connect-to-elasticsearch,Add data to {kib}>>.

If you want to ingest your data, refer to {ingest-guide}/fleet-quick-start.html[Quick start: Get logs and metrics into the Elastic Stack].
If you want to ingest your data, refer to {fleet-guide}/fleet-quick-start.html[Quick start: Get logs and metrics into the Elastic Stack].
3 changes: 3 additions & 0 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ of buckets to try to represent.
==== Visualization

[horizontal]
[[visualization-visualize-chartslibrary]]`visualization:visualize:chartsLibrary`::
Enables the new charts library for area, line, and bar charts in visualization panels. Does *not* support the split chart aggregation.

[[visualization-colormapping]]`visualization:colorMapping`::
**This setting is deprecated and will not be supported as of 8.0.**
Maps values to specific colors in *Visualize* charts and *TSVB*. This setting does not apply to *Lens*.
Expand Down
185 changes: 185 additions & 0 deletions docs/maps/connect-to-ems.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,188 @@ To disable EMS, change your <<settings, kibana.yml>> file.
. Set `map.includeElasticMapsService` to `false` to turn off the EMS connection.
. Set `map.tilemap.url` to the URL of your tile server. This configures the default tile layer of Maps.
. (Optional) Set `map.regionmap` to the vector shapes of the administrative boundaries that you want to use.

[float]
[id=elastic-maps-server]
=== Host Elastic Maps Service locally

beta::[]

If you cannot connect to Elastic Maps Service from the {kib} server or browser clients, and your cluster has the appropriate license level, you can opt to host the service on your own infrastructure.

{hosted-ems} is a self-managed version of Elastic Maps Service offered as a Docker image that provides both the EMS basemaps and EMS boundaries. You must first download and run the image. After connecting it to your {es} cluster for license validation, you're guided to download and configure the basemaps database, which must be retrieved separately.

IMPORTANT: {hosted-ems} does not serve raster tiles, needed by Vega, coordinate, and region map visualizations.

You can use +docker pull+ to download the {hosted-ems} image from the Elastic Docker registry.

ifeval::["{release-state}"=="unreleased"]
Version {version} of {hosted-ems} has not yet been released, so no Docker image is currently available for this version.
endif::[]

ifeval::["{release-state}"!="unreleased"]

["source","bash",subs="attributes"]
----------------------------------
docker pull {ems-docker-image}
----------------------------------

Start {hosted-ems} and expose the default port `8080`:

["source","bash",subs="attributes"]
----------------------------------
docker run --rm --init --publish 8080:8080 \
{ems-docker-image}
----------------------------------

Once {hosted-ems} is running, follow instructions from the webpage at `localhost:8080` to define a configuration file and download the basemaps database.

[role="screenshot"]
image::images/elastic-maps-server-instructions.png[Set-up instructions]

endif::[]

[float]
[[elastic-maps-server-configuration]]
==== Configuration

{hosted-ems} reads properties from a configuration file in YAML format that is validated on startup. The location of this file is provided by the `EMS_PATH_CONF` environment variable and defaults to `/usr/src/app/server/config/elastic-maps-server.yml`.

*General settings*

[cols="2*<"]
|===
| [[ems-hostname]]`hostname`
| Specifies the host of the backend server. To allow remote users to connect, set the value to the IP address or DNS name of the {hosted-ems} container. *Default: _your-hostname_*. <<server-host,Equivalent {kib} setting>>.

| `port`
| Specifies the port used by the backend server. Default: *`8080`*. <<server-port,Equivalent {kib} setting>>.

| `ui`
| Controls the display of the status page and the layer preview. *Default: `true`*

| `logging.level`
| Verbosity of {hosted-ems} logs. Valid values are `trace`, `debug`, `info`, `warn`, `error`, `fatal`, and `silent`. *Default: `info`*

| `path.planet`
| Path of the basemaps database. *Default: `/usr/src/app/data/planet.mbtiles`*
|===


*{es} connection and security settings*

[cols="2*<"]
|===

| `elasticsearch.host`
| URL of the {es} instance to use for license validation.

| `elasticsearch.username` and `elasticsearch.password`
| Credentials of a user with at least the `monitor` role.

| `elasticsearch.ssl.certificateAuthorities`
| Paths to one or more PEM-encoded X.509 certificate authority (CA) certificates that make up a trusted certificate chain for {hosted-ems}. This chain is used by {hosted-ems} to establish trust when connecting to your {es} cluster. <<elasticsearch-ssl-certificateAuthorities,Equivalent {kib} setting>>.

| `elasticsearch.ssl.certificate` and `elasticsearch.ssl.key`, and `elasticsearch.ssl.keyPassphrase`
| Optional settings that provide the paths to the PEM-format SSL certificate and key files and the key password. These files are used to verify the identity of {hosted-ems} to {es} and are required when `xpack.security.http.ssl.client_authentication` in {es} is set to `required`. <<elasticsearch-ssl-cert-key,Equivalent {kib} setting>>.

| `elasticsearch.ssl.verificationMode`
| Controls the verification of the server certificate that {hosted-ems} receives when making an outbound SSL/TLS connection to {es}. Valid values are "`full`", "`certificate`", and "`none`". Using "`full`" performs hostname verification, using "`certificate`" skips hostname verification, and using "`none`" skips verification entirely. *Default: `full`*. <<elasticsearch-ssl-verificationMode,Equivalent {kib} setting>>.

|===

*Server security settings*

[cols="2*<"]
|===

| `ssl.enabled`
| Enables SSL/TLS for inbound connections to {hosted-ems}. When set to `true`, a certificate and its corresponding private key must be provided. *Default: `false`*. <<server-ssl-enabled,Equivalent {kib} setting>>.

| `ssl.certificateAuthorities`
| Paths to one or more PEM-encoded X.509 certificate authority (CA) certificates that make up a trusted certificate chain for {hosted-ems}. This chain is used by the {hosted-ems} to establish trust when receiving inbound SSL/TLS connections from end users. <<server-ssl-certificateAuthorities,Equivalent {kib} setting>>.

| `ssl.key`, `ssl.certificate`, and `ssl.keyPassphrase`
| Location of yor SSL key and certificate files and the password that decrypts the private key that is specified via `ssl.key`. This password is optional, as the key may not be encrypted. <<server-ssl-cert-key,Equivalent {kib} setting>>.

| `ssl.supportedProtocols`
| An array of supported protocols with versions.
Valid protocols: `TLSv1`, `TLSv1.1`, `TLSv1.2`, `TLSv1.3`. *Default: `TLSv1.1`, `TLSv1.2`, `TLSv1.3`*. <<server-ssl-supportedProtocols,Equivalent {kib} setting>>.

| `ssl.cipherSuites`
| Details on the format, and the valid options, are available via the
https://www.openssl.org/docs/man1.1.1/man1/ciphers.html#CIPHER-LIST-FORMAT[OpenSSL cipher list format documentation].
*Default: `TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256 ECDHE-RSA-AES128-GCM-SHA256, ECDHE-ECDSA-AES128-GCM-SHA256, ECDHE-RSA-AES256-GCM-SHA384, ECDHE-ECDSA-AES256-GCM-SHA384, DHE-RSA-AES128-GCM-SHA256, ECDHE-RSA-AES128-SHA256, DHE-RSA-AES128-SHA256, ECDHE-RSA-AES256-SHA384, DHE-RSA-AES256-SHA384, ECDHE-RSA-AES256-SHA256, DHE-RSA-AES256-SHA256, HIGH,!aNULL, !eNULL, !EXPORT, !DES, !RC4, !MD5, !PSK, !SRP, !CAMELLIA`*. <<server-ssl-cipherSuites,Equivalent {kib} setting>>.
|===

[float]
[[elastic-maps-server-bind-mount-config]]
===== Bind-mounted configuration

One way to configure {hosted-ems} is to provide `elastic-maps-server.yml` via bind-mounting. With +docker-compose+, the bind-mount can be specified like this:

["source","yaml",subs="attributes"]
--------------------------------------------
version: '2'
services:
{hosted-ems}:
image: {ems-docker-image}
volumes:
- ./elastic-maps-server.yml:/usr/src/app/config/elastic-maps-server.yml
--------------------------------------------

[float]
[[elastic-maps-server-envvar-config]]
===== Environment variable configuration
All configuration settings can be overridden by environment variables that are named with all uppercase letters and by replacing YAML periods with underscores. For example `elasticsearch.ssl.certificate` could be overridden by the environment variable `ELASTICSEARCH_SSL_CERTIFICATE`. Boolean variables must use the `true` or `false` strings.

WARNING: All information that you include in environment variables is visible through the `ps` command, including sensitive information.

These variables can be set with +docker-compose+ like this:

["source","yaml",subs="attributes"]
----------------------------------------------------------
version: '2'
services:
{hosted-ems}:
image: {ems-docker-image}
environment:
ELASTICSEARCH_HOST: http://elasticsearch.example.org
ELASTICSEARCH_USERNAME: 'ems'
ELASTICSEARCH_PASSWORD: 'changeme'
----------------------------------------------------------

[float]
[[elastic-maps-server-data]]
==== Data

{hosted-ems} hosts vector layer boundaries and vector tile basemaps for the entire planet. Boundaries include world countries, global administrative regions, and specific country regions. A minimal basemap is provided with {hosted-ems}. This can be used for testing environments but won't be functional for normal operations. The full basemap (around 90GB file) needs to be mounted on the Docker container for {hosted-ems} to run normally.

TIP: The available basemaps and boundaries can be explored from the `/maps` endpoint in a web page that is your self-managed equivalent to https://maps.elastic.co


[float]
[[elastic-maps-server-kibana]]
==== Kibana configuration

With {hosted-ems} running, add the `map.emsUrl` configuration key in your <<settings, kibana.yml>> file pointing to the root of the service. This setting will point {kib} to request EMS basemaps and boundaries from {hosted-ems}. Typically this will be the URL to the <<ems-hostname,hostname and port>> of {hosted-ems}. For example, `map.emsUrl: https://my-ems-server:8080`.


[float]
[[elastic-maps-server-check]]
==== Status check

{hosted-ems} periodically runs a status check that is exposed in three different forms:

* At the root of {hosted-ems}, a web page will render the status of the different services.
* A JSON representation of {hosted-ems} status is available at the `/status` endpoint.
* The Docker https://docs.docker.com/engine/reference/builder/#healthcheck[`HEALTHCHECK`] instruction is run by default and will inform about the health of the service, running a process equivalent to the `/status` endpoint.

IMPORTANT: {hosted-ems} won't respond to any data request if the license validation is not fulfilled.


[float]
[[elastic-maps-server-logging]]
==== Logging

Logs are generated in {ecs-ref}[ECS JSON format] and emitted to the standard output and to `/var/log/elastic-maps-server/elastic-maps-server.log`. The server won't rotate the logs automatically but the `logrotate` tool is installed in the image. Mount `/dev/null` to the default log path if you want to disable the output to that file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/maps/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
:ems-docker-repo: docker.elastic.co/elastic-maps-service/elastic-maps-server-ubi8
:ems-docker-image: {ems-docker-repo}:{version}
:hosted-ems: Elastic Maps Server

[role="xpack"]
[[maps]]
= Maps
Expand Down
2 changes: 1 addition & 1 deletion docs/settings/fleet-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ experimental[]
You can configure `xpack.fleet` settings in your `kibana.yml`.
By default, {fleet} is enabled. To use {fleet}, you also need to configure {kib} and {es} hosts.

See the {ingest-guide}/index.html[{fleet}] docs for more information.
See the {fleet-guide}/index.html[{fleet}] docs for more information.

[[general-fleet-settings-kb]]
==== General {fleet} settings
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/connect-to-elasticsearch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ship with dashboards and visualizations,
so you can quickly get insights into your data.

To get started, refer to
{ingest-guide}/fleet-quick-start.html[Quick start: Get logs and metrics into the Elastic Stack].
{fleet-guide}/fleet-quick-start.html[Quick start: Get logs and metrics into the Elastic Stack].

[role="screenshot"]
image::images/add-data-fleet.png[Add data using Fleet]
Expand Down
Loading

0 comments on commit b73881a

Please sign in to comment.