Interview Prep/Monitoring & Observability/Logging: ELK/EFK, Loki & Log Shippers

What are Elasticsearch cluster health states?

IntermediateConceptLogging: ELK/EFK, Loki & Log Shippers
Answer
curl -s localhost:9200/_cluster/health?pretty
curl -s 'localhost:9200/_cat/shards?v&h=index,shard,prirep,state,unassigned.reason'
  • Green: all primary and replica shards assigned.
  • Yellow: all primaries assigned, some replicas not (common on a single-node cluster). No data loss but reduced redundancy.
  • Red: at least one primary shard unassigned; some data is unsearchable and writes to it fail.

GET _cluster/allocation/explain tells you why a shard is unassigned (disk watermark, node left, allocation filter).

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging: ELK/EFK, Loki & Log Shippers