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
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

Related

  • 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
  • Designing a Blog Application Using Document Databases
  • Leveraging Neo4j for Effective Identity Access Management

Trending

  • Transform Settlement Process Using AWS Data Pipeline
  • Serverless vs Containers: Choosing the Right Architecture for Your Application
  • Streamlining DevOps: How Containers and Kubernetes Deliver
  • Essential JVM Tools for Garbage Collection Debugging
  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.

By 
Sudip Bhandari user avatar
Sudip Bhandari
·
Mar. 20, 19 · Analysis
Likes (2)
Comment
Save
Tweet
Share
14.5K 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

  • 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
  • Designing a Blog Application Using Document Databases
  • Leveraging Neo4j for Effective Identity Access Management

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • 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
  • [email protected]

Let's be friends: