What you will learn in this TP
- Create an index and index documents
- Use the _bulk API
- Create a data stream
All steps and instructions are shown. Recommended for this lab: semi-guided
Prerequisites #
Context. An application's data must be stored in suitable indexes. You create an index, write documents and a bulk load to it, then a data stream for timestamped data.
Prerequisites: an Elasticsearch cluster and Kibana (lab "Installing Elasticsearch"), Dev Tools · Estimated time: 35 min
You need an Elasticsearch cluster with a Kibana instance connected to it. If that is not yet the case, we invite you to complete the lab on installing Elasticsearch.Non-time-based indices #
My first index
Create an index named 'mon-premier-index' with 3 shards and two replicas
My first document
Add the following document to 'mon-premier-index':{ "message": "Mon premier document", "formation": { "name": "Elasticsearch" } }My first bulk request
Send the following documents to the 'mon-premier-index' index in a single command:{ "message" : "mon bulk", "id": 1, "user": {"office": "RousselTM", "number":125} } { "message" : "mon bulk", "id": 2, "user": {"office": "rousseltm", "number":4258} } { "message" : "mon bulk", "id": 3, "user": {"office": "Immo", "number":28215} } { "message" : "mon bulk", "id": 4, "user": {"office": "Elastic", "number":2825} } { "message" : "mon bulk", "id": 5, "user": {"office": "ElAStic", "number":2452} }Index information
Find the command to display the number of documents in 'mon-premier-index'
My first display
Find the command to display the documents in 'mon-premier-index', without any filter for now.
Time-based indices #
My first data stream
Configure a Logstash instance so that it sends its output to the 'mon-premier-datastream' data stream
Validate your work
Check that each goal above is reached and that you get the result described in the introduction.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Elasticsearch : supprimer automatiquement les logs de plus de 30 jours✓ solved · 1 reply(ies)
Ask a question about this lesson →See all discussions about this course
Course Glossary
RBAC (Role-Based Access Control)
An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.
Authentication
The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).
Authorization
The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.
API Key
A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).
Architecture
The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.
Repository
A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...
Elasticsearch
A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.
Recommended Articles
Elasticsearch mappings and text analysis: field types, analyzers and dynamic mapping
Master Elasticsearch mappings: field types (text, keyword, numeric, date, ip, nested), multi-fiel...
Elasticsearch ingestion: Bulk API, ingest pipelines, enrich and reindex
Ingest and transform data in Elasticsearch: Bulk API, ingest pipelines and processors (grok, diss...
Elasticsearch data streams and templates: component templates, index templates and time series
Manage timestamped data with data streams: index templates and component templates, the type-data...
Transforms and enrich: summarising and enriching data in Elasticsearch
Build entity-centric indices with pivot and latest transforms, and enrich documents at ingest tim...
Index Lifecycle Management (ILM): data tiers, rollover and retention
Automate the index lifecycle with ILM: hot, warm, cold and frozen data tiers, rollover by size an...
Administering Kibana: spaces, roles, users and monitoring
Organize Kibana for several teams: spaces, roles and privileges on indices and features, users an...
Automation and infrastructure as code for Elasticsearch: API, Terraform, Ansible and CI/CD
Automate Elasticsearch administration: REST API and clients, the elasticstack Terraform provider ...
Elasticsearch distributed architecture: node roles, shards, replicas and allocation
Understand how Elasticsearch works as a distributed system: node roles, master nodes and quorum, ...
Understanding the Elastic Common Schema (ECS)
As always in our consulting engagements, we recommend that companies harmonise and standardise: k...