Chapter 95: Logging with Loki, Elastic Stack and CloudWatch
95.8 Elastic Stack — Elasticsearch, Logstash and Kibana
Story (fictional teaching scenario). At a fictional Kochi shop, Elena from Berlin asks whether Kibana stores the logs. Rohan separates collection, storage/search and the interface.
Why
ELK is a useful name, but it does not mean every deployment needs exactly three processes.
What
- Elasticsearch stores and searches documents and supports analytics.
- A document is one stored structured record.
- Logstash is a processing pipeline that can transform/route events.
- Kibana is an interface for exploring data and building visualizations.
- ELK abbreviates Elasticsearch, Logstash and Kibana; Elastic Stack includes additional components. Collector and deployment choices vary.
How
-
Choose how approved events enter the pipeline.
-
Transform fields and protect data before indexing.
-
Store in a planned schema.
-
Use Kibana for authorized searches and dashboards, not as a substitute for access control.
Example 1: One event route
- Read the command or request.
Synthetic JSON -> chosen collector -> processing -> Elasticsearch -> Kibana
- Read the result.
Output (illustrative; NOT executed against Loki, Elastic or CloudWatch)
Kibana displays search results; it is not the original event producer.
- Line by line: The route is a conceptual design. Logstash is not mandatory in every architecture. No Elastic service, container, license entitlement or hosted account was created or checked. Evaluate product features/terms for the actual chosen distribution and deployment separately.
Ravindra Bagale's Tip
A dashboard and the searchable storage are different layers.
Dashboard आणि searchable storage वेगवेगळे layers आहेत.
Dashboard और searchable storage अलग layers हैं.
Did you understand? Let us try it once more.