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 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
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
  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
CORE ·
Mar. 20, 19 · Analysis
Like (2)
Save
Tweet
Share
13.48K 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.

Popular on DZone

  • Enabling DB Migrations Using Kubernetes Init
  • PostgreSQL: Bulk Loading Data With Node.js and Sequelize
  • 9 Ways You Can Improve Security Posture
  • How to Quickly Build an Audio Editor With UI

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
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: