Skip to main content
Cloud DevOps Solutions
Get a quote Talk to an engineer

Observability and monitoring

ELK Stack Consulting and Engineering for Searchable, Affordable Logs

The ELK Stack combines Elasticsearch for storing and searching data, Logstash for processing it, Kibana for exploring it, and lightweight shippers such as Beats or Fluent Bit for collection. We design clusters, ingest pipelines, retention and access control so log search stays fast, secure and affordable.

Key takeaways

  • ELK is a strong choice when you need full-text search, rich aggregations and flexible analysis over logs and events.
  • Elasticsearch indexes content, so storage and memory costs rise faster than with label-indexed systems such as Loki.
  • Index lifecycle management and data tiers are what keep a cluster affordable. Without them, disks fill.
  • Shard count and mapping design are the usual causes of unstable clusters.
  • Licensing differs between Elastic's distribution and OpenSearch, so choose with your legal and cloud constraints in mind.

What teams use ELK Stack for

Application and platform log search

Engineers query structured logs across services during incidents, filtering by field instead of grepping files.

Security and audit analysis

Authentication events, API audit trails and access logs retained and searched for investigations and compliance.

Log analytics and aggregation

Error counts, slow endpoints and top talkers computed from log fields in Kibana visualisations.

Application search

Elasticsearch can also power product or site search, separate from the observability workload.

Kubernetes log pipelines

Node-level collectors enrich container logs with pod and namespace metadata before indexing.

What the ELK Stack is and why teams adopt it

The ELK Stack is a log analytics toolset built around Elasticsearch, a distributed search and analytics engine. Logs arrive through shippers or Logstash, are parsed into fields, indexed in Elasticsearch and explored through Kibana. Because content is indexed, you can search for any term, filter by any field and aggregate across millions of events in seconds.

Teams adopt ELK because that flexibility is hard to match. A support engineer can find every request that touched a customer ID, a security analyst can trace a login sequence, and a developer can chart errors by endpoint, all from the same data. The trade-off is operational weight: Elasticsearch is a stateful, memory-hungry cluster that needs deliberate design. Our logging with ELK, Loki and OpenTelemetry service covers the full engagement.

How we run ELK in production

Cluster design

We separate node roles as the cluster grows: dedicated master-eligible nodes for stability, hot data nodes with fast disks for recent logs, warm or cold nodes with cheaper storage for older data, and optionally ingest and coordinating nodes. A small team may begin with fewer roles, but we plan the path so scaling is a configuration change rather than a rebuild.

On Kubernetes we typically use the Elastic operator (ECK), which handles rolling upgrades and certificates, with local or high-performance persistent volumes and anti-affinity so replicas do not share a node. For very small volumes a managed service avoids this work entirely.

Collection and parsing

For Kubernetes we run a node-level collector such as Fluent Bit or Filebeat as a DaemonSet and enrich events with pod, namespace and label metadata. Our guide to Fluent Bit as a Kubernetes DaemonSet explains the pattern. Parsing at the edge is cheaper than parsing centrally, but heavy transformation belongs in Logstash or an ingest pipeline. Structured JSON logging from applications removes most of this work, which is why we push teams towards the conventions in our structured logging guidelines.

Mappings and shards

Dynamic mapping is convenient and dangerous. A single service that logs a new field name per request can create thousands of fields and destabilise a cluster. We define index templates with explicit mappings, set field limits, and use keyword types for identifiers and text types only where full-text search is needed.

Shards are the other classic problem. Each shard carries overhead, so thousands of tiny ones hurt more than they help. We use rollover to create indices by size or age and target shard sizes that match the hardware, as in this lifecycle sketch:

PUT _ilm/policy/app-logs
{
  "policy": {
    "phases": {
      "hot":    { "actions": { "rollover": { "max_primary_shard_size": "50gb", "max_age": "7d" } } },
      "warm":   { "min_age": "7d",  "actions": { "shrink": { "number_of_shards": 1 } } },
      "delete": { "min_age": "30d", "actions": { "delete": {} } }
    }
  }
}

Thresholds there are illustrative. We set them from your volume and retention needs, as covered in our log retention and ILM policy guide.

Security and access

Modern Elasticsearch enables TLS and authentication by default, and we keep it that way. Beyond that we apply role-based access with document or field level restrictions where teams must not see each other’s data, connect Kibana to your identity provider, and keep the cluster off the public internet. Logs are a common place for personal data and secrets to leak, so we scrub or hash sensitive fields before indexing. The approach is described in log PII scrubbing for GDPR and HIPAA. Snapshots to object storage with restricted access cover recovery and long-term archive.

Cost and capacity

Elasticsearch cost is driven by retained volume, replica count, indexing overhead and heap. The levers are straightforward: log less noise, drop unused fields, use tiers, shorten hot retention and keep older data in snapshots. We avoid quoting percentages because outcomes depend on your logs. A useful exercise is ranking services by volume, since a handful of chatty ones often dominate the bill.

Day-2 operations and failure modes

Expect to deal with disk watermarks, mapping explosions, overloaded ingest during traffic spikes and slow queries from broad wildcards. We monitor cluster health, heap pressure, indexing rejections and shard counts, use Kafka or a similar buffer when ingest is bursty, and rehearse restores from snapshots. Upgrades follow Elastic’s supported path one step at a time, preceded by deprecation checks and a snapshot.

Kibana and alerting

Kibana is where most engineers meet the stack, so it deserves as much design as the cluster. We create data views per log family, curate saved searches for the services people debug most, and build dashboards for error rates, slow endpoints and ingest health. Spaces separate teams, and role mappings stop one team from editing another’s objects.

Alerting inside Kibana can watch thresholds and query results, which is useful for security events and for patterns that metrics cannot express. We still prefer metric-based alerts for availability and latency, because they are cheaper to evaluate and easier to reason about. Log alerts are best kept for specific, high-signal conditions such as repeated authentication failures, and every rule should name an owner and a runbook.

When not to choose ELK

If your questions are mostly “show me the logs for this service in this window”, Grafana Loki is usually cheaper and simpler, and our comparison of ELK Stack versus Grafana Loki walks through the decision. If you do not want to operate a search cluster at all, a hosted option such as Datadog trades operational effort for usage-based cost. To discuss which fits your volume and team, contact us.

Official documentation: www.elastic.co

How we work with ELK Stack

  1. 01

    Assess volume and questions

    We measure daily ingest, field shapes and the questions people need answered, which drives every sizing decision.

  2. 02

    Design the cluster and tiers

    We choose node roles, hot and warm tiers, shard strategy and whether to self-host or use a managed service.

  3. 03

    Build the ingest path

    Collectors, parsing, field mapping and PII handling are defined before data flows, with back-pressure considered.

  4. 04

    Set lifecycle and access

    ILM policies, snapshots, role-based access and audit settings are configured and tested.

  5. 05

    Build Kibana views and alerts

    Saved searches, dashboards and alert rules are created for the services that matter first.

  6. 06

    Tune and document

    After real traffic arrives we adjust shards, mappings and retention and write the operating runbook.

ELK Stack compared with the alternatives

We recommend the tool that fits your team, not the one we know best. Here is when each option makes sense.

OptionChoose it when
ELK StackThe ELK Stack combines Elasticsearch for storing and searching data, Logstash for processing it, Kibana for exploring it, and lightweight shippers such as Beats or Fluent Bit for collection.
Grafana LokiChoose it when logs are mostly viewed by service and time, you already run Grafana, and you want much lower storage and indexing cost.
OpenSearchChoose it if you want a fully open source licence or run on AWS, where a managed OpenSearch service is available.
Datadog LogsChoose it if you prefer a hosted platform and accept usage-based cost tied to ingested and indexed volume.
Cloud native loggingChoose CloudWatch Logs or Azure Monitor Logs for small estates where native integration outweighs search power.

Tools we use alongside ELK Stack

ElasticsearchLogstashKibanaFilebeatFluent BitElastic AgentOpenSearchKafkaCuratorGrafanaOpenTelemetry CollectorElastic Cloud on Kubernetes

Frequently asked questions

What is the ELK Stack?
ELK stands for Elasticsearch, Logstash and Kibana. Elasticsearch stores and searches data, Logstash ingests and transforms it, and Kibana provides search and dashboards. Shippers such as Beats or Fluent Bit are usually added to collect logs, and the combination is mainly used for log analysis and observability.
Is the ELK Stack free?
Elasticsearch and Kibana are source available under Elastic's licences, and recent versions also offer an AGPL option, so you can self-host without a licence fee for many uses. Some features sit in paid tiers, and running clusters costs infrastructure and engineering time. OpenSearch is a separate fully open source alternative.
ELK Stack or Grafana Loki?
ELK indexes log content, so it handles free-text search and aggregations well but costs more to store and run. Loki indexes only labels, so it is cheaper and simpler for browsing by service and time, but slower for arbitrary content search. Many teams pick based on how they actually query.
How many shards should an Elasticsearch index have?
As few as the data and query load justify. Too many small shards waste heap and slow the cluster, while oversized shards slow recovery. We size shards using real volume, use rollover to cap index size, and review the count regularly instead of using a default for every index.
How do you control Elasticsearch storage cost?
Through index lifecycle management and tiers: recent data on fast nodes, older data on cheaper storage, and deletion after the agreed retention. We also drop noisy fields, avoid indexing everything as text, and compress with sensible settings. Snapshots to object storage handle long-term archive.
Should we run Elasticsearch ourselves?
Running it yourself gives control and may be cheaper at scale, but it needs real operational skill: upgrades, shard management and capacity work. Managed offerings reduce that load. We help you decide based on team size, data volume and compliance needs.

Talk to an engineer about ELK Stack

Book a free 30-minute call. We review your current setup and tell you honestly whether and how we can help.

Written by Saddique Khan, DevOps / SRE / Cloud Consultant Engineer. Last updated 2026-10-09.