ELK vs. Grafana Stack: A Practical Comparison for Observability
Two of the most popular observability stacks, the philosophy that actually separates them, and how to pick the right one.
If you’ve spent any time running production systems, you’ve eventually run into the same two camps. On one side, the ELK Stack (now the Elastic Stack). On the other, the Grafana / Prometheus stack, often shortened to PLG (Prometheus, Loki, Grafana) or, in its fuller form, LGTM (Loki, Grafana, Tempo, Mimir).
People love to frame the difference as “big data vs. small data” or “real-time vs. archival.” After working with both, I think that framing is misleading. The real difference is more interesting and far more useful to internalize: it comes down to what each system chooses to index, and how much it’s willing to pay for that choice.
Let’s break it down properly.
First, the three pillars of observability
Before comparing tools, it helps to remember what observability actually requires. Modern observability rests on three (arguably more) signal types:
- Metrics — numeric time-series. CPU usage, request rates, latency percentiles, error counts. Cheap to store, great for dashboards and alerting.
- Logs — discrete, timestamped event records. Verbose, high-volume, invaluable for debugging the why.
- Traces — the path of a single request across many services. Essential in distributed systems.
The key insight: no single tool is naturally great at all three. How each stack handles these pillars is where the comparison gets real.
What each stack actually is
The Elastic Stack (ELK)
ELK is built around one powerful core engine and a set of supporting tools:
- Elasticsearch — a distributed search and storage engine built on an inverted index. This is the heart of the stack. It can store logs, metrics, traces, and arbitrary documents.
- Logstash — an ingestion and transformation pipeline (increasingly replaced by lighter Beats and ingest pipelines).
- Kibana — the visualization and exploration layer.
- Beats — lightweight shippers (Filebeat, Metricbeat, etc.) that send data into the stack.
The defining characteristic: Elasticsearch indexes everything. Every field of every document gets added to an inverted index, which is what makes full-text search across enormous datasets feel instant. You can search for any word in any log line without telling Elasticsearch in advance that you’d want to.
The Grafana Stack (PLG / LGTM)
This stack takes the opposite approach — best-of-breed specialized components, each doing one job well:
- Prometheus — a metrics system. Pull-based, with a dimensional data model and its own query language, PromQL. Purpose-built for time-series metrics.
- Loki — a logs system, explicitly designed to be “Prometheus, but for logs.” Push-based, queried with LogQL.
- Grafana — the visualization layer, and notably data-source agnostic.
- Tempo (traces) and Mimir (long-term metrics) round out the full LGTM stack.
The defining characteristic: Loki indexes almost nothing. It indexes only a small set of labels (metadata like app, namespace, level) and stores the raw log content as compressed chunks in cheap object storage. It does not build a full-text index over your log content.
The core difference: indexing philosophy
This is the single most important thing to understand, and it explains almost every other tradeoff.
Elasticsearch says: “Index everything. Storage and compute are worth it because search will be instant and arbitrary.”
Loki says: “Index almost nothing. Keep storage dirt cheap, and accept that searching log content means scanning the chunks that match your labels.”
When you query Loki, you first narrow down by labels (e.g. {app="checkout", level="error"}), and Loki then effectively greps through just those matching chunks. This is brute-force on the content — but because the label filtering pre-narrows the data, and because object storage is cheap, it scales beautifully on cost.
A crucial clarification many people get wrong: Prometheus is not “a worse version of Elasticsearch’s indexing.” Prometheus indexes time-series by their label sets — a completely different job, purpose-built for metrics. The fair comparison is Loki vs. Elasticsearch for logs, and there, “indexes less” is Loki’s entire selling point, not a weakness.
Get Krunal Patel’s stories in your inbox
Join Medium for free to get updates from this writer.
ElasticsearchLokiPrometheusWhat it indexesEvery field (full inverted index)Labels onlyTime-series by label setBest atFull-text search, arbitrary queriesCheap, high-volume log storageMetrics & alertingCost profileHigh (storage + compute)Low (object storage)Low–moderateQuery languageQuery DSL / KQL / ES|QLLogQLPromQL
Scale and retention: busting a common myth
A popular (and backwards) belief is “ELK is for big, long-term data; the Grafana stack is for medium-sized, recent data.” The reality is more nuanced:
- Vanilla Prometheus is actually weak at long-term, large-scale storage. It’s designed for recent operational metrics on a single node. Teams bolt on Thanos, Cortex, or Mimir precisely because plain Prometheus doesn’t handle long retention or high availability well.
- Loki is built for huge log volumes cheaply, thanks to its object-storage backend. It thrives on scale.
- Elasticsearch scales fine too, via sharding across nodes — but every byte you index costs you in storage and compute, so the total cost of ownership climbs faster.
So it’s not “ELK = big, PLG = small.” It’s “Elasticsearch = expensive-but-powerful at any scale; the Grafana stack = cheaper, with the heavy lifting split across specialized components.”
Real-time vs. archival
There’s a kernel of truth in the “time-sensitivity” framing: Prometheus is built around real-time monitoring and alerting on recent metrics, with a pull-based scrape model that’s inherently current. Its Alertmanager is a first-class citizen.
But “ELK is not for time-sensitive data” is too strong. Elasticsearch is heavily used for real-time log analysis — tailing errors as they happen, security monitoring, live dashboards. Both stacks do real-time well; they just optimize for different primary signals (metrics vs. searchable logs).
Grafana vs. Kibana: not a knockout
This one is closer than people assume.
Grafana’s real advantage is that it’s data-source agnostic. It can visualize Prometheus, Loki, Elasticsearch, SQL databases, CloudWatch, and dozens of other sources — all in one dashboard. It’s exceptional at time-series visualization and is the de facto standard for metrics dashboards.
Kibana is tightly coupled to Elasticsearch, which is both its limitation and its strength. Because it’s purpose-built for one engine, its log exploration experience (the Discover view) is outstanding, and it ships as part of the broader Elastic suite — APM, security/SIEM, machine learning, and more.
“More interactive” is subjective. “More flexible across backends” is Grafana’s genuine, objective edge.
Cost: the deciding factor for many teams
For high-volume logs especially, the economics often tip toward Loki. Indexing only labels and storing compressed chunks in S3-style object storage is dramatically cheaper than maintaining full inverted indexes across a hot Elasticsearch cluster. At large log volumes, this difference can be the entire reason a team migrates.
Elasticsearch earns its cost when you genuinely need rich, arbitrary, full-text querying — security investigations, complex log analytics, ad-hoc exploration where you can’t predict your query patterns in advance.
When to choose which
Reach for the Elastic Stack (ELK) when:
- You need powerful full-text search across logs and arbitrary fields.
- Your query patterns are unpredictable and ad-hoc.
- You want one engine for logs, metrics, traces, and search.
- You need SIEM / security analytics or the broader Elastic feature set.
- Budget for storage and compute is less of a constraint than query power.
Reach for the Grafana Stack (PLG / LGTM) when:
- You’re cloud-native / Kubernetes-heavy (this is its home turf).
- You’re cost-sensitive, particularly at large log volumes.
- You want a metrics-first monitoring and alerting setup (Prometheus + Alertmanager).
- You prefer best-of-breed, swappable components over a single monolith.
- You want one visualization layer (Grafana) over many data sources.
And in practice? Plenty of organizations run both. Prometheus + Grafana for metrics and alerting, and Elasticsearch for deep log search — unified under Grafana dashboards. The stacks aren’t strictly either/or.
The one-line takeaway
The real split isn’t size or time-sensitivity. It’s metrics vs. logs vs. full-text search, and underneath that, how much each tool chooses to index:
Elasticsearch indexes everything - powerful and expensive. Loki indexes almost nothing — cheap and lean. Prometheus indexes time-series for metrics specifically.
Understand that, and every other tradeoff — cost, scale, query flexibility, retention — falls neatly into place.
Have you run both in production? I’d love to hear which tradeoffs mattered most for your team — drop a note in the comments.





