mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* [DOCS] Adds dashboard first to Maps tutorial * [DOCS] Incorporates review comments * [DOCS] Incorporates review comments * [DOCS] Updates image * [DOCS] Updates images re; filtering * [DOCS] Minor edits
This commit is contained in:
parent
955e67aba0
commit
ffd8c94689
6 changed files with 133 additions and 170 deletions
Binary file not shown.
Before Width: | Height: | Size: 87 KiB |
Binary file not shown.
Before Width: | Height: | Size: 405 KiB After Width: | Height: | Size: 956 KiB |
Binary file not shown.
Before Width: | Height: | Size: 504 KiB After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
Before Width: | Height: | Size: 731 KiB |
|
@ -1,231 +1,197 @@
|
|||
[role="xpack"]
|
||||
[[maps-getting-started]]
|
||||
== Get started with Maps
|
||||
== Create a map with multiple layers and data sources
|
||||
|
||||
++++
|
||||
<titleabbrev>Get started</titleabbrev>
|
||||
<titleabbrev>Create a multilayer map</titleabbrev>
|
||||
++++
|
||||
|
||||
If you are new to **Maps**, this tutorial is a good place to start.
|
||||
It guides you through the common steps for working with your location data.
|
||||
|
||||
You'll learn to:
|
||||
|
||||
You work with Maps by adding layers. The data for a layer can come from
|
||||
sources such as {es} documents, vector sources, tile map services, web map
|
||||
services, and more. You can symbolize the data in different ways.
|
||||
For example, you might show which airports have the longest flight
|
||||
delays by using circles from small to big. Or,
|
||||
you might show the amount of web log traffic by shading countries from
|
||||
light to dark.
|
||||
- Create a map with multiple layers and data sources
|
||||
- Use symbols, colors, and labels to style data values
|
||||
- Embed a map in a dashboard
|
||||
- Search across panels in your dashboard
|
||||
|
||||
When you complete this tutorial, you’ll have a map that looks like this:
|
||||
|
||||
[role="screenshot"]
|
||||
image::maps/images/sample_data_web_logs.png[]
|
||||
|
||||
[[maps-read-only-access]]
|
||||
NOTE: If you have insufficient privileges to create or save maps, a read-only icon
|
||||
appears in the application header. The buttons to create new maps or edit
|
||||
existing maps won't be visible. For more information on granting access to
|
||||
Kibana see <<xpack-security-authorization>>.
|
||||
|
||||
[role="screenshot"]
|
||||
image::maps/images/read-only-badge.png[Example of Maps' read only access indicator in Kibana's header]
|
||||
|
||||
[float]
|
||||
=== Prerequisites
|
||||
Before you start this tutorial, <<add-sample-data, add the web logs sample data set>>. Each
|
||||
sample data set includes a map to go along with the data. Once you've added the data, open Maps and
|
||||
explore the different layers of the *[Logs] Total Requests and Bytes* map.
|
||||
You'll re-create this map in this tutorial.
|
||||
|
||||
- If you don’t already have {kib}, set it up with https://www.elastic.co/cloud/elasticsearch-service/signup?baymax=docs-body&elektra=docs[our free trial].
|
||||
- This tutorial requires the <<get-started, web logs sample data set>>. The sample data includes a [Logs] Total Requests and Bytes map, which you’ll re-create in this tutorial.
|
||||
- You must have the correct privileges for creating a map.
|
||||
If you don't have sufficient privileges to create or save maps,
|
||||
a read-only icon appears in the toolbar. For more information,
|
||||
refer to <<xpack-security-authorization,Granting access to {kib}>>.
|
||||
|
||||
[float]
|
||||
=== Take-away skills
|
||||
In this tutorial, you'll learn to:
|
||||
|
||||
* Create a multi-layer map
|
||||
* Connect a layer to a data source
|
||||
* Use symbols, colors, and labels to style a layer
|
||||
* Create layers for {es} data
|
||||
|
||||
[role="xpack"]
|
||||
[[maps-create]]
|
||||
=== Create a map
|
||||
=== Step 1. Create a map
|
||||
|
||||
The first thing to do is to create a new map.
|
||||
|
||||
. If you haven't already, open the main menu, then click *Maps*.
|
||||
. On the maps list page, click *Create map*.
|
||||
. Open the main menu, and then click *Dashboard*.
|
||||
. Click **Create dashboard**.
|
||||
. Set the time range to *Last 7 days*.
|
||||
+
|
||||
A new map is created using a base tile layer.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/gs_create_new_map.png[]
|
||||
. Click **Create new**.
|
||||
. Click **Maps**.
|
||||
|
||||
[role="xpack"]
|
||||
[float]
|
||||
[[maps-add-choropleth-layer]]
|
||||
=== Add a choropleth layer
|
||||
=== Step 2. Add a choropleth layer
|
||||
|
||||
Now that you have a map, you'll want to add layers to it.
|
||||
The first layer you'll add is a choropleth layer to shade world countries
|
||||
by web log traffic. Darker shades symbolize countries with more web log traffic,
|
||||
and lighter shades symbolize countries with less traffic.
|
||||
by web log traffic. Darker shades will symbolize countries with more web log traffic,
|
||||
and lighter shades will symbolize countries with less traffic.
|
||||
|
||||
. Click *Add layer*.
|
||||
. Select *Choropleth*.
|
||||
. From the *Layer* dropdown menu, select *World Countries*.
|
||||
. Under *Statistics source*, set *Index pattern* to *kibana_sample_data_logs*.
|
||||
. Set *Join field* to *geo.src*.
|
||||
. Click the *Add layer* button.
|
||||
. Set *Name* to `Total Requests by Country`.
|
||||
. Set *Opacity* to 50%.
|
||||
. Click *Add* under *Tooltip fields*.
|
||||
. In the popover, select *ISO 3166-1 alpha-2 code* and *name* and click *Add*.
|
||||
. Under *Fill color*, select the grey color ramp.
|
||||
. Under *Border color*, change the selected color to *white*.
|
||||
. Click *Save & close*.
|
||||
. Click **Add layer**, and then click **Choropleth**.
|
||||
|
||||
. From the **Layer** dropdown menu, select **World Countries**.
|
||||
|
||||
. In **Statistics source**, set:
|
||||
** **Index pattern** to **kibana_sample_data_logs**
|
||||
** **Join field** to **geo.src**
|
||||
|
||||
. Click **Add layer**.
|
||||
|
||||
. In **Layer settings**, set:
|
||||
|
||||
** **Name** to `Total Requests by Country`
|
||||
** **Opacity** to 50%
|
||||
|
||||
. Add a Tooltip field:
|
||||
|
||||
** Select **ISO 3166-1 alpha-2 code** and **name**.
|
||||
** Click **Add**.
|
||||
|
||||
. In **Layer style**, set:
|
||||
|
||||
** **Fill color** to the grey color ramp
|
||||
** **Border color** to white
|
||||
|
||||
. Click **Save & close**.
|
||||
+
|
||||
Your map now looks like this:
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/gs_add_cloropeth_layer.png[]
|
||||
|
||||
[role="xpack"]
|
||||
[float]
|
||||
[[maps-add-elasticsearch-layer]]
|
||||
=== Add layers for the {es} data
|
||||
=== Step 3. Add layers for the Elasticsearch data
|
||||
|
||||
To avoid overwhelming the user with too much data at once, you'll add two layers for {es} data.
|
||||
To avoid overwhelming the user with too much data at once, you'll add two layers
|
||||
for the Elasticsearch data. The first layer will display individual documents
|
||||
when users zoom in on the map. The second layer will
|
||||
display aggregated data when users zoom the map out.
|
||||
|
||||
* The first layer will display individual documents.
|
||||
The layer will appear when the user zooms in the map to show smaller regions.
|
||||
* The second layer will display aggregated data that represents many documents.
|
||||
The layer will appear when the user zooms out the map to show larger amounts of the globe.
|
||||
|
||||
==== Add a vector layer to display individual documents
|
||||
[float]
|
||||
==== Add a layer for individual documents
|
||||
|
||||
This layer displays web log documents as points.
|
||||
The layer is only visible when users zoom in the map past zoom level 9.
|
||||
The layer is only visible when users zoom in.
|
||||
|
||||
. Click *Add layer*.
|
||||
. Select *Documents*.
|
||||
. Set *Index pattern* to *kibana_sample_data_logs*.
|
||||
. Click the *Add layer* button.
|
||||
. Set *Name* to `Actual Requests`.
|
||||
. Set *Visibilty* to the range [9, 24].
|
||||
. Set *Opacity* to 100%.
|
||||
. Click *Add* under *Tooltip fields*.
|
||||
. In the popover, select *clientip*, *timestamp*, *host*, *request*, *response*, *machine.os*, *agent*, and *bytes* and click *Add*.
|
||||
. Set *Fill color* to *#2200ff*.
|
||||
. Click *Save & close*.
|
||||
. Click **Add layer**, and then click **Documents**.
|
||||
|
||||
. Set **Index pattern** to **kibana_sample_data_logs**.
|
||||
|
||||
. Set **Scaling** to *Limits results to 10000.*
|
||||
|
||||
. Click **Add layer**.
|
||||
|
||||
. In **Layer settings**, set:
|
||||
** **Name** to `Actual Requests`
|
||||
** **Visibilty** to the range [9, 24]
|
||||
** **Opacity** to 100%
|
||||
|
||||
. Add a tooltip field and select **agent**, **bytes**, **clientip**, **host**,
|
||||
**machine.os**, **request**, **response**, and **timestamp**.
|
||||
|
||||
. In **Layer style**, set **Fill color** to **#2200FF**.
|
||||
|
||||
. Click **Save & close**.
|
||||
+
|
||||
Your map now looks like this between zoom levels 9 and 24:
|
||||
Your map will look like this from zoom level 9 to 24:
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/gs_add_es_document_layer.png[]
|
||||
|
||||
==== Add a vector layer to display aggregated data
|
||||
[float]
|
||||
==== Add a layer for aggregated data
|
||||
|
||||
Aggregations group {es} documents into grids. You can calculate metrics
|
||||
for each gridded cell.
|
||||
|
||||
You'll create a layer for aggregated data and make it visible only when the map
|
||||
is zoomed out past zoom level 9. Darker colors will symbolize grids
|
||||
You'll create a layer for {ref}/search-aggregations.html[aggregated data] and make it visible only when the map
|
||||
is zoomed out. Darker colors will symbolize grids
|
||||
with more web log traffic, and lighter colors will symbolize grids with less
|
||||
traffic. Larger circles will symbolize grids with
|
||||
more total bytes transferred, and smaller circles will symbolize
|
||||
grids with less bytes transferred.
|
||||
|
||||
[role="screenshot"]
|
||||
image::maps/images/grid_metrics_both.png[]
|
||||
|
||||
===== Add the layer
|
||||
|
||||
. Click *Add layer*.
|
||||
. Select *Clusters and grids*.
|
||||
. Set *Index pattern* to *kibana_sample_data_logs*.
|
||||
. Click the *Add layer* button.
|
||||
. Set *Name* to `Total Requests and Bytes`.
|
||||
. Set *Visibility* to the range [0, 9].
|
||||
. Set *Opacity* to 100%.
|
||||
|
||||
===== Configure the aggregation metrics
|
||||
|
||||
. Click *Add metric* under of *Metrics* label.
|
||||
. Select *Sum* in the aggregation select.
|
||||
. Select *bytes* in the field select.
|
||||
|
||||
===== Set the layer style
|
||||
|
||||
. In *Layer style*, change *Symbol size*:
|
||||
.. Set *Min size* to 7.
|
||||
.. Set *Max size* to 25.
|
||||
.. Change the field select from *count* to *sum of bytes*.
|
||||
. Click *Save & close* button.
|
||||
. Click **Add layer**, and select **Clusters and grids**.
|
||||
. Set **Index pattern** to **kibana_sample_data_logs**.
|
||||
. Click **Add layer**.
|
||||
. In **Layer settings**, set:
|
||||
** **Name** to `Total Requests and Bytes`
|
||||
** **Visibility** to the range [0, 9]
|
||||
** **Opacity** to 100%
|
||||
. Add a metric with:
|
||||
** **Aggregation** set to **Sum**
|
||||
** **Field** set to **bytes**
|
||||
. In **Layer style**, change **Symbol size**:
|
||||
** Set the field select to *sum bytes*.
|
||||
** Set the min size to 7 and the max size to 25 px.
|
||||
. Click **Save & close** button.
|
||||
+
|
||||
Your map now looks like this between zoom levels 0 and 9:
|
||||
Your map will look like this between zoom levels 0 and 9:
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/sample_data_web_logs.png[]
|
||||
|
||||
[role="xpack"]
|
||||
[float]
|
||||
[[maps-save]]
|
||||
=== Save the map
|
||||
Now that your map is complete, you'll want to save it so others can use it.
|
||||
=== Step 4. Save the map
|
||||
Now that your map is complete, save it and return to the dashboard.
|
||||
|
||||
. In the application toolbar, click *Save*.
|
||||
. In the toolbar, click *Save*.
|
||||
. Enter `Tutorial web logs map` for the title.
|
||||
. Click *Save*.
|
||||
+
|
||||
You have completed the steps for re-creating the sample data map.
|
||||
. Ensure *Add to Dashboard after saving* is enabled.
|
||||
. Click *Save and return*.
|
||||
|
||||
*Next steps:*
|
||||
|
||||
* Continue with this tutorial and <<maps-embedding, use your map in a Kibana dashboard>>.
|
||||
* Create a map using your own data. You might find these resources helpful:
|
||||
** <<heatmap-layer, Heat map layer>>
|
||||
** <<tile-layer, Tile layer>>
|
||||
** <<vector-layer, Vector layer>>
|
||||
|
||||
[role="xpack"]
|
||||
[float]
|
||||
[[maps-embedding]]
|
||||
=== Add the map to a dashboard
|
||||
You can add your saved map to a {kibana-ref}/dashboard.html[dashboard] and view your geospatial data alongside bar charts, pie charts, and other visualizations.
|
||||
=== Step 5. Explore your data from the dashboard
|
||||
|
||||
. Open the main menu, then click *Dashboard*.
|
||||
. Click *Create dashboard*.
|
||||
. Set the time range to *Last 7 days*.
|
||||
. Click *Add*.
|
||||
+
|
||||
A panel opens with a list of objects that you can add to the dashboard. You'll add a map and two visualizations.
|
||||
+
|
||||
. Set the *Types* select to *Map*.
|
||||
. Click the name of your saved map or the *[Logs] Total Requests and Bytes* map included with the sample data set to add a map to the dashboard.
|
||||
. Set the *Types* select to *Visualization*.
|
||||
. Click *[Logs] Heatmap* to add a heatmap to the dashboard.
|
||||
. Click *[Logs] Visitors by OS* to add a pie chart to the dashboard.
|
||||
. Close the panel.
|
||||
+
|
||||
Your dashboard should look like this:
|
||||
View your geospatial data alongside a heat map and pie chart, and then filter the data.
|
||||
When you apply a filter in one panel, it is applied to all panels on the dashboard.
|
||||
|
||||
. In the toolbar, click **Add** to open a list of objects that you can add to the dashboard.
|
||||
. Set the **Types** select to **Visualization**.
|
||||
. Add **[Logs] Heatmap** and **[Logs] Visitors by OS** to the dashboard.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/gs_dashboard_with_map.png[]
|
||||
|
||||
==== Explore your data using filters
|
||||
. To filter for documents where **machine.os.keyword** is **osx**, click
|
||||
the **osx** slice in the pie chart.
|
||||
|
||||
You can apply filters to your dashboard to hone in on the data that you are most interested in.
|
||||
The dashboard is interactive--you can quickly create filters by clicking on the desired data in the map and visualizations.
|
||||
The panels are linked, so that when you apply a filter in one panel, the filter is applied to all panels on the dashboard.
|
||||
. Remove the filter by clicking **x** next to its name in the filter bar.
|
||||
|
||||
. In the *[Logs] Visitors by OS* visualization, click on the *osx* pie slice.
|
||||
+
|
||||
Both the visualizations and map are filtered to only show documents where *machine.os.keyword* is *osx*.
|
||||
The *machine.os.keyword: osx* filter appears in the dashboard query bar.
|
||||
+
|
||||
. Click the *x* to remove the *machine.os.keyword: osx* filter.
|
||||
. In the map, click in the United States vector.
|
||||
. Click plus image:maps/images/gs_plus_icon.png[] next to the *iso2* row in the tooltip.
|
||||
+
|
||||
Both the visualizations and the map are filtered to only show documents where *geo.src* is *US*.
|
||||
The *geo.src: US* filter appears in the dashboard query bar.
|
||||
+
|
||||
Your dashboard should look like this:
|
||||
. Set a filter from the map:
|
||||
|
||||
.. Open a tooltip by clicking anywhere in the United States vector.
|
||||
|
||||
.. To show only documents where **geo.src** is **US**, click the filter icon in the row for **ISO 3066-1 alpha-2**.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/gs_dashboard_with_terms_filter.png[]
|
||||
|
||||
[float]
|
||||
=== What's next?
|
||||
|
||||
* Check out <<vector-layer, additional types of layers>> that you can add to your map.
|
||||
* Learn more ways <<maps-vector-style-properties, customize your map>>.
|
||||
* Learn more about <<vector-tooltip,vector tooltips>>.
|
||||
|
|
|
@ -30,6 +30,9 @@ You can create two types of filters by interacting with your map:
|
|||
* <<maps-spatial-filters, Spatial filters>>
|
||||
* <<maps-phrase-filter, Phrase filters>>
|
||||
|
||||
[role="screenshot"]
|
||||
image::maps/images/create_spatial_filter.png[]
|
||||
|
||||
[float]
|
||||
[[maps-spatial-filters]]
|
||||
==== Spatial filters
|
||||
|
@ -40,9 +43,6 @@ You can create spatial filters in two ways:
|
|||
|
||||
* Click the tool icon image:maps/images/tools_icon.png[], and then draw a polygon or bounding box on the map to define the spatial filter.
|
||||
* Click *Filter by geometry* in a <<maps-vector-tooltip-locking, locked tooltip>>, and then use the feature's geometry for the spatial filter.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/create_spatial_filter.png[]
|
||||
|
||||
Spatial filters have the following properties:
|
||||
|
||||
|
@ -59,9 +59,6 @@ A phrase filter narrows search results to documents that contain the specified t
|
|||
You can create a phrase filter by clicking the plus icon image:maps/images/gs_plus_icon.png[] in a <<maps-vector-tooltip-locking, locked tooltip>>.
|
||||
If the map is a dashboard panel with drilldowns, you can apply a phrase filter to a drilldown by selecting the drilldown action.
|
||||
|
||||
[role="screenshot"]
|
||||
image::maps/images/create_phrase_filter.png[]
|
||||
|
||||
[role="xpack"]
|
||||
[[maps-layer-based-filtering]]
|
||||
=== Filter a single layer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue