0
0
Elasticsearchquery~10 mins

Index patterns for time-series in Elasticsearch - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define an index pattern that matches all daily logs.

Elasticsearch
GET /[1]-*/_search
Drag options to blanks, or click blank then click option'
Adata
Blog
Cdaily
Dlogs
Attempts:
3 left
💡 Hint
Common Mistakes
Using a singular form like 'log' which may not match the actual index names.
Using unrelated prefixes like 'daily' or 'data' that don't match the index naming.
2fill in blank
medium

Complete the code to search only indices for January 2024 using a date pattern.

Elasticsearch
GET /logs-2024-[1]-*/_search
Drag options to blanks, or click blank then click option'
A01
B02
C12
D11
Attempts:
3 left
💡 Hint
Common Mistakes
Using '02' which is February.
Using '12' or '11' which are later months.
3fill in blank
hard

Fix the error in the index pattern to correctly match weekly indices starting with 'logs'.

Elasticsearch
GET /[1]-week-*/_search
Drag options to blanks, or click blank then click option'
Alogs
Blog
Clog-week
Dweek
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'log' which does not match the actual index prefix.
Using 'week' alone which misses the 'logs-' prefix.
4fill in blank
hard

Fill both blanks to create an index pattern that matches monthly indices for 2023 and 2024.

Elasticsearch
GET /logs-[1]-[2]-*/_search
Drag options to blanks, or click blank then click option'
A2023
B2024
C*
D01
Attempts:
3 left
💡 Hint
Common Mistakes
Using specific years or months limits the pattern to fewer indices.
Mixing specific and wildcard values incorrectly.
5fill in blank
hard

Fill all three blanks to create an index pattern that matches daily logs for January 2024 only.

Elasticsearch
GET /logs-[1]-[2]-[3]/_search
Drag options to blanks, or click blank then click option'
A2024
B01
C*
D2023
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*' for year or month which matches unwanted indices.
Using wrong year like '2023'.