What is an index template and mapping, and what is a mapping explosion?
AdvancedConceptLogging: ELK/EFK, Loki & Log Shippers
Answer
An index template defines settings (shards, ILM policy) and mappings (field types) for indexes matching a pattern. With dynamic mapping, every new JSON key becomes a new field. If apps log arbitrary keys (user IDs as keys, nested maps), the field count explodes, hitting Limit of total fields [1000] has been exceeded and bloating cluster state.
Fixes: explicit mappings with "dynamic": "strict" or false, flattened field type for arbitrary maps, and agreeing on a schema such as Elastic Common Schema (ECS) or OpenTelemetry semantic conventions.
More on Logging: ELK/EFK, Loki & Log Shippers
What is the ELK stack, and what is EFK?BeginnerHow does Elasticsearch store and search logs?IntermediateWhat is ILM (Index Lifecycle Management) and why do log clusters need it?IntermediateWhat is an Elasticsearch data stream?AdvancedWhat does Logstash do compared with Beats?IntermediateWhat is Grafana Loki and how is it different from Elasticsearch?Beginner