Creating Index Templates in Elasticsearch 7.13

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

When working with time series or data streaming use cases, you typically want to spread your data out into multiple indices as to not make an index too large and incur performance penalties as a result. By using index templates, we can instantiate an index for a given dataset very quickly and even automatically. In this hands-on lab, you will get to create index templates in Elasticsearch in order to prepare the cluster to ingest continuously generated time series data.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create the Load Index Template

From the Kibana console, craft a request to create the load index template to match all indices that start with "load-" and creates them with 1 primary and 0 replica shards.

Create the CPU Index Template

From the Kibana console, craft a request to create the cpu index template to match all indices that start with "cpu-" and creates them with 1 primary and 0 replica shards.

Create the Memory Index Template

From the Kibana console, craft a request to create the memory index template to match all indices that start with "memory-" and creates them with 1 primary and 0 replica shards.

Additional Resources

Logging In to the Elastic Environment

  1. Open 1 new browser tab and navigate to the public IP address of the es1 node provided on the lab page (e.g., http://public_ip). Your es1 node has a Kibana instance which can be accessed in your local web browser
  2. Log in using the username elastic and password elastic_acg.

Lab Scenario

You are a site reliability engineer who is proof-of-concepting the use of the Elastic Stack to collect, store, and analyze system telemetry data. To facilitate this endeavor, you need to first create the following index templates in Elasticsearch to properly format the telemetry data indices:

  • load for indices that start with "load-"
  • cpu for indices that start with "cpu-"
  • memory for indices that start with "memory-"

Since this is a single-node cluster, you will need to configure the index templates to create all indices with 1 primary and 0 replica shards to ensure the indices that use these templates are allocated with a green state.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?