What you will learn in this TP
- Start OpenSearch
- Declare types
- Search and aggregate
Introduction #
What you will learn in this section
- Start OpenSearch
- Declare types
- Search and aggregate
Context. Your team wants an Apache 2.0 log search engine. You evaluate OpenSearch on a prototype.
Prerequisites: Docker Compose, 4 GB of free memory · Estimated time: 45 min
A node and its console.Setup #
Guided steps, with their solution.
1. Start the stack
Why? Without a strong password, OpenSearch refuses to start.
Write.envand the Compose file, setvm.max_map_count, then check cluster state.2. Declare an index template
Why? A field type cannot change after the first write.
Create a template forlogs-app-*.3. Index in batches
Why?
Index three documents, then read the_bulkis the normal path for data.errorsfield of the response.4. Search and aggregate
Why?
Search “banque” in thefilteris faster thanmustwhen the score does not matter.paiementservice, then compute the p95 duration per service.5. Try PPL and the console
Why? PPL is very readable for exploring logs.
Count documents per level with PPL, then find them in Discover athttp://localhost:5601.
Difficulty level : ●○○○○ (1/5)
My progress
Sign in to track your progress and take notes. Sign in
Recommended Articles
Bonnes pratiques Elasticsearch : mappings, shards, cycle de vie et exploitation
Bonnes pratiques Elasticsearch : dimensionnement des shards, mappings explicites, templates, ILM,...
Index Lifecycle Management (ILM) : data tiers, rollover et rétention
Automatiser le cycle de vie des index avec ILM : data tiers hot, warm, cold et frozen, rollover p...
Exploring data in OpenObserve: SQL, PromQL and VRL
Search with SQL, query metrics with PromQL, optimize a stream (indexes, partitions, retention) an...
Understanding the concept of score
The concept of score allows Elasticsearch to rank your documents by relevance during a search.
Kibana : rôle, installation et premiers pas
Ce qu'est Kibana dans la suite Elastic, comment l'installer avec Elasticsearch (start-local, Dock...
Logs Datadog avancés : index, filtres d'exclusion, Flex Logs, archives et Sensitive Data Scanner
Maîtriser coût et conformité des logs Datadog : pipelines et processeurs, index et rétention, fil...
Logs dans Datadog : collecte, pipelines, index et maîtrise du volume
Collecter les logs avec l'agent, les structurer avec pipelines et processeurs (grok), utiliser fa...
Loki : stockage, index TSDB, rétention et stockage objet
Configurer le stockage de Loki : chunks, index TSDB, schéma v13, S3/MinIO/GCS, compactor, rétenti...
Explorer ses données dans Discover : KQL, Lucene et ES|QL
Rechercher et analyser des logs dans Kibana Discover : filtres, KQL, syntaxe Lucene, et le langag...