RousselTMLEARNING

Article · Elasticsearch: from discovery to expertise

Monitoring and troubleshooting

1. The method #

Always in the same order.

Steps #

Elasticsearch diagnostic method
GET _cluster/health?filter_path=status,number_of_nodes,unassigned_shards
GET _cat/nodes?v&h=name,node.role,heap.percent,ram.percent,cpu,load_1m,disk.used_percent
GET _cat/shards?v&s=state&h=index,shard,prirep,state,unassigned.reason
GET _cluster/allocation/explain
GET _cat/thread_pool/search,write?v&h=node_name,name,active,queue,rejected
GET _nodes/hot_threads

2. Common causes #

The classics.

Table #

SymptomCauseFix
Yellow after restartReplicas being rebuilt or impossible (single node)Wait, add a node, or reduce number_of_replicas
Red, unassigned shardsNode lost without a replica, full diskallocation/explain, restore from snapshot
Read-only indexDisk above the flood-stage threshold (95%)Free up space; the block is lifted automatically
Write rejections (429)Write thread pool queue saturatedReduce client concurrency, more nodes, larger bulks
Circuit breakerQuery or aggregation too memory-hungryLimit aggregation size, review aggregated text fields
Long GC pausesHeap too small or too largeHeap ≤ 50% of RAM and under ~31 GB

3. Slow logs and monitoring #

Keeping a record.

Configuration #

PUT logs-nginx-*/_settings
{ "index.search.slowlog.threshold.query.warn": "2s",
  "index.search.slowlog.threshold.query.info": "500ms",
  "index.indexing.slowlog.threshold.index.warn": "5s" }
  • Stack Monitoring (via Elastic Agent or Metricbeat) sends cluster metrics to a separate monitoring cluster.
  • Elastic's support diagnostics tool collects all useful APIs into one archive for analysis or a support ticket.
Good practice: Monitor the cluster from another cluster: a failing cluster cannot show its own metrics.

📄 Elasticsearch monitoring and troubleshooting: health, unassigned shards, JVM, hot threads and slow logs →

My progress

  • ⏱ Estimated time : ≈ 3 min

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

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

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 performance and capacity planning: shards, heap, indexing and benchmarks

Size and optimize Elasticsearch: shard size and count, JVM heap, caches, indexing settings (refre...

OpenSearch performance, sizing and troubleshooting

Sizing and optimizing an OpenSearch cluster: shard size and count, bulk indexing, refresh and tra...

Elasticsearch best practices: mappings, shards, lifecycle and operations

Elasticsearch best practices: shard sizing, explicit mappings, templates, ILM, JVM memory, securi...

Elasticsearch distributed architecture: node roles, shards, replicas and allocation

Understand how Elasticsearch works as a distributed system: node roles, master nodes and quorum, ...

Automation and infrastructure as code for Elasticsearch: API, Terraform, Ansible and CI/CD

Automate Elasticsearch administration: REST API and clients, the elasticstack Terraform provider ...

Grafana Loki vs Elasticsearch: the battle of log storage

A comparison between Loki, the Prometheus-inspired log system, and Elasticsearch, the reference f...

Cross-cluster search and cross-cluster replication: multi-cluster Elasticsearch architectures

Design multi-cluster Elasticsearch architectures: remote clusters, cross-cluster search, cross-cl...

Advanced Elasticsearch security: TLS, certificates, API keys, FLS, DLS and audit

Secure Elasticsearch in depth: transport and HTTP TLS, certificate management with elasticsearch-...

Elasticsearch ingestion: Bulk API, ingest pipelines, enrich and reindex

Ingest and transform data in Elasticsearch: Bulk API, ingest pipelines and processors (grok, diss...

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!