DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Migrate, Modernize and Build Java Web Apps on Azure: This live workshop will cover methods to enhance Java application development workflow.

Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.

Kubernetes in the Enterprise: The latest expert insights on scaling, serverless, Kubernetes-powered AI, cluster security, FinOps, and more.

A Guide to Continuous Integration and Deployment: Learn the fundamentals and understand the use of CI/CD in your apps.

Related

  • Logging With the Elastic Stack
  • Unified Observability: Metrics, Logs, and Tracing of App and Database Tiers in a Single Grafana Console
  • Couchbase: Improving Performance When Querying Multiple Arrays With FTS and N1QL
  • How to Build a Serverless App With Vue, Azure Functions and FaunaDB Part 2

Trending

  • Optimizing Generative AI With Retrieval-Augmented Generation: Architecture, Algorithms, and Applications Overview
  • The Future of Java: Virtual Threads in JDK 21 and Their Impact
  • Use Amazon Bedrock and LangChain To Build an Application To Chat With Web Pages
  • Python “Magic” Methods (Part 2)
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. ELK Stack Overview and Use Cases

ELK Stack Overview and Use Cases

We take a look a the ELK stack and explore why this tech stack has become a popular tool for data analysis and visualization.

Sudip Bhandari user avatar by
Sudip Bhandari
·
Mar. 20, 19 · Analysis
Like (2)
Save
Tweet
Share
13.8K Views

Join the DZone community and get the full member experience.

Join For Free

ELK Stack

Instead of writing about what exactly ELK is, let me state the need and use cases for it.

Log Aggregation and Efficient Searching

In a very naive scenario, you have one server and lots of log messages generated by your application and system which are crucial to look at once something goes wrong. Now there are basically two problems with it:

  • Manually digging through a log file is really an anachronism. We built all this software to automate things and, in the end, are going through a log file line by line? Further, what are our search criteria? We can definitely leverage some sort of ‘automation/programming’ to analyze based on larger and more complex criteria than simply grepping or vimming a file.
  • The second problem is related to scale. We don’t have a single server anymore. We have probably a tens or hundreds of VMs running behind a load balancer. We don’t know which server processed the request and definitely are not going to check all the logs one by one.

Here comes ELK.

We treat all the log messages generated as some sort of event and stream it into single storage ordered by timestamp. This channeling of logs/messages/texts is done by Logstash (the L in ELK). These messages/texts are now fed into Elastic clusters (the E in ELK) which is a glorified wrapper around Apache Lucene. Prior to this, messages are preprocessed based on various conditions. Elastic Clusters mainly do something called ‘reverse indexing.’ All the messages are stored as a document and are indexed using the words and phrases. Kibana acts as the front-end UI for the whole stack, providing an interface where you can query for messages using a specified query language, generate charts/visualizations, and so on.

If you are running a Java app called ‘myJavaApp’ and want to quickly see what exceptions have occurred in the last 15 minutes, you can quickly open the Kibana dashboard and fire up a query like:

product:myJavaApp AND msg:’Exception’

This will quickly load all the documents indexed using the keyword 'Exception.' You can write more and more complex queries as you go.

Generic Search

Although log aggregation is the major use case for the ELK stack, it can also be used as a framework for a generic text search where you can leverage reverse indexing. This can be an activity such as searching through a web page. You can also set up a local ELK stack on your system and have your sys logs and var logs analyzed for you.

Database Use case cluster Kibana Leverage (statistics) Document Sort (Unix) app

Opinions expressed by DZone contributors are their own.

Related

  • Logging With the Elastic Stack
  • Unified Observability: Metrics, Logs, and Tracing of App and Database Tiers in a Single Grafana Console
  • Couchbase: Improving Performance When Querying Multiple Arrays With FTS and N1QL
  • How to Build a Serverless App With Vue, Azure Functions and FaunaDB Part 2

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: