Skip to content

Commit

Permalink
Merge branch 'master' into telemetry/ui_metrics-findAll
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Mar 11, 2020
2 parents 1c1e45b + 4090149 commit 58c51fa
Show file tree
Hide file tree
Showing 33 changed files with 1,920 additions and 1,021 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const ELASTIC_LICENSE_HEADER = `
*/
`;

const allMochaRules = {};
const allMochaRulesOff = {};
Object.keys(require('eslint-plugin-mocha').rules).forEach(k => {
allMochaRules['mocha/' + k] = 'off';
allMochaRulesOff['mocha/' + k] = 'off';
});

module.exports = {
Expand Down Expand Up @@ -524,7 +524,7 @@ module.exports = {
*/
{
files: ['test/harden/*.js'],
rules: allMochaRules,
rules: allMochaRulesOff,
},

/**
Expand Down
16 changes: 7 additions & 9 deletions docs/getting-started/tutorial-discovering.asciidoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
[[tutorial-discovering]]
=== Discover your data

Using *Discover*, you can enter
Using *Discover*, enter
an {ref}/query-dsl-query-string-query.html#query-string-syntax[Elasticsearch
query] to search your data and filter the results.

. Open *Discover*.
+
The current index pattern appears below the filter bar, in this case `shakes*`.
You might need to click *New* in the menu bar to refresh the data.
The `shakes*` index pattern appears.

. Click the caret to the right of the current index pattern, and select `ba*`.
. To make `ba*` the current index, click the index pattern dropdown, then select `ba*`.
+
By default, all fields are shown for each matching document.

. In the search field, enter the following string:
. In the search field, enter:
+
[source,text]
account_number<100 AND balance>47500
Expand All @@ -25,11 +24,10 @@ excess of 47,500. Results appear for account numbers 8, 32, 78, 85, and 97.
[role="screenshot"]
image::images/tutorial-discover-2.png[]
+
. To choose which
fields to display, hover the pointer over the list of *Available fields*
and then click *add* next to each field you want include as a column in the table.
. Hover over the list of *Available fields*, then
click *add* next to each field you want include as a column in the table.
+
For example, if you add the `account_number` field, the display changes to a list of five
For example, when you add the `account_number` field, the display changes to a list of five
account numbers.
+
[role="screenshot"]
Expand Down
75 changes: 34 additions & 41 deletions docs/management/managing-fields.asciidoc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[[managing-fields]]
== Index Patterns and Fields
== Index patterns and fields

The *Index patterns* UI helps you create and manage
the index patterns that retrieve your data from Elasticsearch.
the index patterns that retrieve your data from {es}.

[role="screenshot"]
image::images/management-index-patterns.png[]

[float]
=== Create an index pattern

An index pattern is the glue that connects Kibana to your Elasticsearch data. Create an
index pattern whenever you load your own data into Kibana. To get started,
An index pattern is the glue that connects {kib} to your {es} data. Create an
index pattern whenever you load your own data into {kib}. To get started,
click *Create index pattern*, and then follow the guided steps. Refer to
<<index-patterns, Creating an index pattern>> for the types of index patterns
that you can create.
Expand All @@ -33,7 +33,7 @@ you create is automatically designated as the default pattern. The default
index pattern is loaded when you open *Discover*.

* *Refresh the index fields list.* You can refresh the index fields list to
pick up any newly-added fields. Doing so also resets Kibana’s popularity counters
pick up any newly-added fields. Doing so also resets the {kib} popularity counters
for the fields. The popularity counters are used in *Discover* to sort fields in lists.

* [[delete-pattern]]*Delete the index pattern.* This action removes the pattern from the list of
Expand All @@ -60,7 +60,7 @@ Kibana has field formatters for the following field types:
* <<field-formatters-numeric, Numbers>>

[[field-formatters-string]]
=== String Field Formatters
=== String field formatters

String fields support the `String` and `Url` formatters.

Expand All @@ -69,7 +69,7 @@ include::field-formatters/string-formatter.asciidoc[]
include::field-formatters/url-formatter.asciidoc[]

[[field-formatters-date]]
=== Date Field Formatters
=== Date field formatters

Date fields support the `Date`, `Url`, and `String` formatters.

Expand All @@ -81,19 +81,19 @@ include::field-formatters/string-formatter.asciidoc[]
include::field-formatters/url-formatter.asciidoc[]

[[field-formatters-geopoint]]
=== Geographic Point Field Formatters
=== Geographic point field formatters

Geographic point fields support the `String` formatter.

include::field-formatters/string-formatter.asciidoc[]

[[field-formatters-numeric]]
=== Numeric Field Formatters
=== Numeric field formatters

Numeric fields support the `Url`, `Bytes`, `Duration`, `Number`, `Percentage`, `String`, and `Color` formatters.

The `Bytes`, `Number`, and `Percentage` formatters enable you to choose the display formats of numbers in this field using
the <<numeral, Elastic numeral pattern>> syntax that Kibana maintains.
the <<numeral, Elastic numeral pattern>> syntax that {kib} maintains.

include::field-formatters/url-formatter.asciidoc[]

Expand All @@ -104,70 +104,63 @@ include::field-formatters/duration-formatter.asciidoc[]
include::field-formatters/color-formatter.asciidoc[]

[[scripted-fields]]
=== Scripted Fields
=== Scripted fields

Scripted fields compute data on the fly from the data in your Elasticsearch indices. Scripted field data is shown on
the Discover tab as part of the document data, and you can use scripted fields in your visualizations.
Scripted field values are computed at query time so they aren't indexed and cannot be searched using Kibana's default
query language. However they can be queried using Kibana's new <<kuery-query, experimental query language>>. Scripted
fields are also supported in the filter bar.
Scripted fields compute data on the fly from the data in your {es} indices. The data is shown on
the Discover tab as part of the document data, and you can use scripted fields in your visualizations. You query scripted fields with the <<kuery-query, {kib} query language>>, and can filter them using the filter bar. The scripted field values are computed at query time, so they aren't indexed and cannot be searched using the {kib} default
query language.

WARNING: Computing data on the fly with scripted fields can be very resource intensive and can have a direct impact on
Kibana's performance. Keep in mind that there's no built-in validation of a scripted field. If your scripts are
{kib} performance. Keep in mind that there's no built-in validation of a scripted field. If your scripts are
buggy, you'll get exceptions whenever you try to view the dynamically generated data.

When you define a scripted field in Kibana, you have a choice of scripting languages. Starting with 5.0, the default
When you define a scripted field in {kib}, you have a choice of scripting languages. In 5.0 and later, the default
options are {ref}/modules-scripting-expression.html[Lucene expressions] and {ref}/modules-scripting-painless.html[Painless].
While you can use other scripting languages if you enable dynamic scripting for them in Elasticsearch, this is not recommended
While you can use other scripting languages if you enable dynamic scripting for them in {es}, this is not recommended
because they cannot be sufficiently {ref}/modules-scripting-security.html[sandboxed].

WARNING: Use of Groovy, JavaScript, and Python scripting is deprecated starting in Elasticsearch 5.0, and support for those
scripting languages will be removed in the future.
WARNING: In 5.0 and later, Groovy, JavaScript, and Python scripting are deprecated and unsupported.

You can reference any single value numeric field in your expressions, for example:

----
doc['field_name'].value
----

For more background on scripted fields and additional examples, refer to this blog:
https://www.elastic.co/blog/using-painless-kibana-scripted-fields[Using Painless in Kibana scripted fields]
For more information on scripted fields and additional examples, refer to
https://www.elastic.co/blog/using-painless-kibana-scripted-fields[Using Painless in {kib} scripted fields]

[float]
[[create-scripted-field]]
=== Creating a Scripted Field
To create a scripted field:
=== Create a scripted field

. Go to *Management > Kibana > Index Patterns*
. Go to *Management > {kib} > Index Patterns*
. Select the index pattern you want to add a scripted field to.
. Go to the pattern's *Scripted fields* tab.
. Click *Add scripted field*.
. Go to the *Scripted fields* tab for the index pattern, then click *Add scripted field*.
. Enter a name for the scripted field.
. Enter the expression that you want to use to compute a value on the fly from your index data.
. Click *Create field*.

For more information about scripted fields in Elasticsearch, see
For more information about scripted fields in {es}, see
{ref}/modules-scripting.html[Scripting].

[float]
[[update-scripted-field]]
=== Updating a Scripted Field
To modify a scripted field:
=== Update a scripted field

. Go to *Management > Kibana > Index Patterns*
. Click the index pattern's *Scripted fields* tab.
. Go to *Management > {kib} > Index Patterns*
. Click the *Scripted fields* tab for the index pattern.
. Click the *Edit* button for the scripted field you want to change.
. Make your changes and then click *Save field* to update the field.
. Make your changes, then click *Save field*.

WARNING: Keep in mind that there's no built-in validation of a scripted field. If your scripts are buggy, you'll get
WARNING: Built-in validation is unsupported for scripted fields. If your scripts are buggy, you'll get
exceptions whenever you try to view the dynamically generated data.

[float]
[[delete-scripted-field]]
=== Deleting a Scripted Field
To delete a scripted field:
=== Delete a scripted field

. Go to *Management > Kibana > Index Patterns*
. Click the index pattern's *Scripted fields* tab.
. Click the *Delete* button for the scripted field you want to remove.
. Click *Delete* in the confirmation window.
. Go to *Management > {kib} > Index Patterns*
. Click the *Scripted fields* tab for the index pattern.
. Click *Delete* for the scripted field you want to remove.
. Click *Delete* on the confirmation window.
7 changes: 6 additions & 1 deletion docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ This page has moved. Please see <<get-data-in>>.
[role="exclude",id="tilemap"]
== Coordinate map

This page has moved. Please see <<coordinate-map>>.
This page has moved. Please see <<maps>>.

[role="exclude",id="visualize-maps"]
== Maps

This page has moved. Please see <<maps>>.
6 changes: 2 additions & 4 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,13 @@ requests. Supported on Elastic Cloud Enterprise.
`map.includeElasticMapsService:`:: *Default: true*
Set to false to disable connections to Elastic Maps Service.
When `includeElasticMapsService` is turned off, only the vector layers configured by `map.regionmap`
and the tile layer configured by `map.tilemap.url` will be available in the <<maps, Maps application>>,
<<tilemap, Coordinate map visualizations>>, and <<visualize-maps, Region map visualizations>>.
and the tile layer configured by `map.tilemap.url` will be available in <<maps, Maps>>.

`map.proxyElasticMapsServiceInMaps:`:: *Default: false*
Set to true to proxy all <<maps, Maps application>> Elastic Maps Service requests through the Kibana server.
This setting does not impact <<tilemap, Coordinate map visualizations>> and <<visualize-maps, Region map visualizations>>.

[[regionmap-settings]] `map.regionmap:`:: Specifies additional vector layers for
use in <<visualize-maps, Region Map>> visualizations. Supported on {ece}. Each layer
use in <<maps, Maps>> visualizations. Supported on {ece}. Each layer
object points to an external vector file that contains a geojson
FeatureCollection. The file must use the
https://en.wikipedia.org/wiki/World_Geodetic_System[WGS84 coordinate reference system (ESPG:4326)]
Expand Down
6 changes: 1 addition & 5 deletions docs/user/visualize.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ data sets.
<<visualize-maps, Maps>>::
* *<<maps,Elastic Maps>>* &mdash; Displays geospatial data in {kib}.

* *Coordinate map* &mdash; Displays points on a map using a geohash aggregation.

* *Region map* &mdash; Merges any structured map data onto a shape.

* *Heat map* &mdash; Displays shaded cells within a matrix.
* <<heat-map,Heat map>>:: Display shaded cells within a matrix.

<<for-dashboard,Dashboard tools>>::

Expand Down
110 changes: 4 additions & 106 deletions docs/visualize/tilemap.asciidoc
Original file line number Diff line number Diff line change
@@ -1,116 +1,14 @@
[[visualize-maps]]
== Maps

To tell a story and answer questions about your geographical data, you can create several types of interactive maps with Visualize.

Visualize supports the following maps:

* *Coordinate* &mdash; Display latitude and longitude coordinates that are associated to the specified bucket aggregation.

* *Region* &mdash; Display colored boundary vector shapes using a gradient. Darker colors indicate larger values, and lighter colors indicate smaller values.

* *Heat* &mdash; Display graphical representations of data where the individual values are represented by colors.

NOTE: The maps in Visualize have been replaced with <<maps>>, which offers more functionality.

[float]
[[coordinate-map]]
=== Coordinate map

Use a coordinate map when your data set includes latitude and longitude values. For example, use a coordinate map to see the varying popularity of destination airports using the sample flight data.

[role="screenshot"]
image::images/visualize_coordinate_map_example.png[]

[float]
[[build-coordinate-map]]
==== Build a coordinate map

Configure the `kibana.yml` settings and add the aggregations.

. Configure the following `kibana.yml` settings:

* Set `xpack.maps.showMapVisualizationTypes` to `true`.

* To use a tile service provider for coordinate maps other than https://www.elastic.co/elastic-maps-service[Elastic Maps Service], configure the <<tilemap-settings,tilemap settings>>.

. To display your data on the coordinate map, use the following aggregations:

* <<visualize-metric-aggregations,Metric>>

* <<visualize-bucket-aggregations,Geohash bucket aggregation>>

. Specify the geohash bucket aggregation options:

* *Precision* slider &mdash; Determines the granularity of the results displayed on the map. To show the *Precision* slider, deselect *Change precision on map zoom*. For information on the area specified by each precision level, refer to {ref}/search-aggregations-bucket-geohashgrid-aggregation.html#_cell_dimensions_at_the_equator[geohash grid].
+
NOTE: Higher precisions increase memory usage for the browser that displays {kib} and the underlying
{es} cluster.

* *Place markers off grid (use {ref}/search-aggregations-metrics-geocentroid-aggregation.html[geocentroid])* &mdash; When you selected, the markers are
placed in the center of all documents in the bucket, and a more accurate visualization is created. When deselected, the markers are placed in the center
of the geohash grid cell.
+
NOTE: When you have multiple values in the geo_point, the coordinate map is unable to accurately calculate the geo_centroid.

[float]
[[navigate-coordinate-map]]
==== Navigate the coordinate map

To navigate the coordinate map, use the navigation options.

* To move the map center, click and hold anywhere on the map and move the cursor.

* To change the zoom level, click *Zoom In* or *Zoom out* image:images/viz-zoom.png[].

* To automatically crop the map boundaries to the
geohash buckets that have at least one result, click *Fit Data Bounds* image:images/viz-fit-bounds.png[].

[float]
[[region-map]]
=== Region map

Use region maps when you want to show statistical data on a geographic area, such as a county, country, province, or state. For example, use a region map if you want to see the average sales for each country with the sample eCommerce order data.

[role="screenshot"]
image::images/visualize_region_map_example.png[]

[float]
[[build-region-maps]]
==== Build a region map

Configure the `kibana.yml` settings and add the aggregations.

. In `kibana.yml`, set `xpack.maps.showMapVisualizationTypes` to `true`.

. To display your data on the region map, use the following aggregations:

* <<visualize-metric-aggregations,Metric>>
* <<visualize-sibling-pipeline-aggregations,Sibling pipeline>>
* <<visualize-bucket-aggregations,Terms bucket aggregation>>

[float]
[[navigate-region-map]]
==== Navigate the region map

To navigate the region map, use the navigation options.

* To change the zoom level, click *Zoom In* or *Zoom out* image:images/viz-zoom.png[].

* To automatically crop the map boundaries, click *Fit Data Bounds* image:images/viz-fit-bounds.png[].

[float]
[[heat-map]]
=== Heat map
== Heat map

Use heat maps when your data set includes categorical data. For example, use a heat map to see the flights of origin countries compared to destination countries using the sample flight data.
Display graphical representations of data where the individual values are represented by colors. Use heat maps when your data set includes categorical data. For example, use a heat map to see the flights of origin countries compared to destination countries using the sample flight data.

[role="screenshot"]
image::images/visualize_heat_map_example.png[]

[float]
[[build-heat-map]]
==== Build a heat map
=== Build a heat map

To display your data on the heat map, use the supported aggregations.

Expand All @@ -123,7 +21,7 @@ Heat maps support the following aggregations:

[float]
[[navigate-heatmap]]
==== Change the color ranges
=== Change the color ranges

When only one color displays on the heat map, you might need to change the color ranges.

Expand Down
Loading

0 comments on commit 58c51fa

Please sign in to comment.