How to install Logstash On Debian Linux

Objective

The following guide describes a basic installation of Logstash on Debian Linux.

Operating System and Software Versions

  • Operating System: - Debian 9 (Stretch)
  • Software: - Logstash 5.2

Requirements

Privileged access to your Debian system will be required.

Difficulty

EASY

Conventions

  • # - requires given command to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - given command to be executed as a regular non-privileged user

Instructions

Prerequisites installation

The only main prerequisite required by Logstash is Java. We will be downloading Logstash Debian package directly from using wget:
# apt update 
# apt install openjdk-8-jdk-headless wget

Download Logstash

Next, download Logstash using eg. wget:
$ wget  --no-check-certificate https://artifacts.elastic.co/downloads/logstash/logstash-5.2.0.deb

Start Logstash

To start Logstash and enable to start Logstash after reboot run:
# systemctl start logstash
# systemctl enable logstash
Logstash should now be up and running using default configuration :
#  systemctl status logstash
‚óŹ logstash.service - logstash
   Loaded: loaded (/etc/systemd/system/logstash.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2017-02-12 08:38:00 AEDT; 47s ago
 Main PID: 420 (java)
    Tasks: 14 (limit: 4915)

Install Plugins

Logstash keeps it executable binaries within /usr/share/logstash/bin/ Seat you executable path to include Logstash's executable path:
# export PATH=$PATH:/usr/share/logstash/bin/
Install plugins using logstash-plugin:
# logstash-plugin install PLUGIN-NAME