Adding layers for Elasticsearch dataedit

You’ll add two layers for Elasticsearch data. The first layer displays documents, and the second layer displays aggregated data. The raw documents appear when you zoom in the map to show smaller regions. The aggregated data appears when you zoom out the map to show larger amounts of the globe.

Add a vector layer from the document sourceedit

This layer displays web log documents as points. The layer is only visible when you zoom in the map past zoom level 9.

  1. In the map legend, click Add layer.
  2. Click the Documents data source.
  3. Set Index pattern to kibana_sample_data_logs.
  4. Click the Add layer button.
  5. Set Layer name to Actual Requests.
  6. Set Min zoom to 9 and Max zoom to 24.
  7. Set Layer transparency to 1.
  8. Set Fill color to #2200ff.
  9. Click Save & close.

Add a vector layer from the grid aggregation sourceedit

Aggregations group Elasticsearch 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 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.

grid metrics both

Add the layeredit

  1. In the map legend, click Add layer.
  2. Click the Grid aggregation data source.
  3. Set Index pattern to kibana_sample_data_logs.
  4. Click the Add layer button.
  5. Set Layer name to Total Requests and Bytes.
  6. Set Min zoom to 0 and Max zoom to 9.
  7. Set Layer transparency to 1.

Configure the aggregation metricsedit

  1. Click plus gs plus icon to the right of Metrics label.
  2. Select Sum in the aggregation select.
  3. Select bytes in the field select.

Set the vector styleedit

  1. In Vector style, change Symbol size:

    1. Set Min size to 1.
    2. Set Max size to 25.
    3. In the field select, select sum of bytes.
  2. Click Save & close button.

    Your map now looks like this:

    gs add es layer