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
Partner Zones AWS Cloud
by AWS Developer Relations
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
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Data
  4. Installing Logstash

Installing Logstash

Learn about the components of Logstash, a data processing pipeline as part of performance monitoring, and learn how to install it.

Gaurav Rai Mazra user avatar by
Gaurav Rai Mazra
·
Aug. 27, 18 · Tutorial
Like (3)
Save
Tweet
Share
7.53K Views

Join the DZone community and get the full member experience.

Join For Free

Logstash is a data processing pipeline which ingests data simultaneously from multiple data sources, transforms it, and sends it to different "stashes" like Elasticsearch, Redis, a database, a REST endpoint, etc. It can ingest log files, cleaning and transforming them to machine- and human-readable formats.

Components

There are three components in Logstash: Inputs, Filters, and Outputs.

Inputs

Logstash ingests data of any kind, shape, and size: logs, AWS metrics, instance health metrics, etc.

Filters

Logstash filters parse each event, build a structure, enrich the data in the event, and transform it into the desired form. For example: enriching geo-location from an IP using the GEO-IP filter, anonymizing PII information from events, transforming unstructured data to structural data, using GROK filters, etc.

Outputs

This is the sink layer. There are many output plugins, like Elasticsearch, email, Slack, Datadog, database persistence, etc.

Installing Logstash

As of this writing, Logstash (6.2.3) requires Java 8 to run. To check your Java version, run the following command:

java -version

The output on my system is as follows:

java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

If Java 8 is not installed, then please download it from the Oracle website and follow the instructions for installation. Also, set the JAVA_HOME variable.

Installing From Binaries

You can directly download the binaries here.

Installing From Package Repositories

Installation with APT:

//ADD PUBLIC SIGNING KEY
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

//add https-transports
sudo apt-get install apt-transport-https

//save the repository definition
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list

//installation command
sudo apt-get update && sudo apt-get install logstash

Installation with YUM:

// Download and install the public signing key
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

Add the following in a new .repo file in your /etc/yum.repos.d/ directory

[logstash-6.x]
name=Elastic repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
// Installation command
sudo yum install logstash

Docker Installation

You can follow this link for Docker installation.

Data processing

Published at DZone with permission of Gaurav Rai Mazra, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The Beauty of Java Optional and Either
  • An End-to-End Guide to Vue.js Testing
  • How To Set Up and Run Cypress Test Cases in CI/CD TeamCity
  • Simulating and Troubleshooting BLOCKED Threads in Kotlin [Video]

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: