RousselTMLEARNING

TP · OpenSearch: from discovery to expertise

Lab: Install OpenSearch, index and search

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. 1. Start the stack

    Why? Without a strong password, OpenSearch refuses to start.

    Write .env and the Compose file, set vm.max_map_count, then check cluster state.
  2. 2. Declare an index template

    Why? A field type cannot change after the first write.

    Create a template for logs-app-*.
  3. 3. Index in batches

    Why? _bulk is the normal path for data.

    Index three documents, then read the errors field of the response.
  4. 4. Search and aggregate

    Why? filter is faster than must when the score does not matter.

    Search “banque” in the paiement service, then compute the p95 duration per service.
  5. 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 at http://localhost:5601.

Difficulty level : ●○○○○ (1/5)

My progress

  • ⏱ Estimated time : ≈ 45 min

Sign in to track your progress and take notes. Sign in

💬 Ask a question

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...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!