1. The method #
Always in the same order.
Steps #
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_threads2. Common causes #
The classics.
Table #
| Symptom | Cause | Fix |
|---|---|---|
| Yellow after restart | Replicas being rebuilt or impossible (single node) | Wait, add a node, or reduce number_of_replicas |
| Red, unassigned shards | Node lost without a replica, full disk | allocation/explain, restore from snapshot |
| Read-only index | Disk above the flood-stage threshold (95%) | Free up space; the block is lifted automatically |
| Write rejections (429) | Write thread pool queue saturated | Reduce client concurrency, more nodes, larger bulks |
| Circuit breaker | Query or aggregation too memory-hungry | Limit aggregation size, review aggregated text fields |
| Long GC pauses | Heap too small or too large | Heap ≤ 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.
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 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...