RousselTMLEARNING

TP · Logstash: from discovery to expertise

Logstash installation with correction

The correction is integrated into the TP (See the green boxes)

What you will learn in this TP
  • Identify the distribution
  • Install Logstash with the package manager
  • Enable automatic startup
Mode :

All steps and instructions are shown. Recommended for this lab: guided

Prerequisites #

Context. Logstash must be installed cleanly and start with the server. You use the package manager suited to the distribution.

Prerequisites: a Linux machine (or the course test environment)  ·  Estimated time: 20 min

You must have a Linux machine. If you do not have a machine or test environment, we invite you to do the lab on setting up the test environment.

Package manager #

In this lab, we will install Logstash using the package manager that corresponds to your distribution.

  1. Identify the distribution

    You must identify the machine's distribution with the different options available to you: file, command.

    See the correction
    You have different options to identify your distribution. The most used is to do it with the lsb_release command:
    root@logstash-formation:/home/debian# lsb_release -a
    Distributor ID: Debian
    ...
    The Linux Standard Base (abbreviation: LSB) is a joint project by a number of Linux distributions under the organizational structure of the Free Standards Group in order to design and standardize the internal structure of GNU/Linux-based operating systems.

    Alongside this, another option is to use system files:
    root@logstash-formation:/home/debian# cat /etc/*release
    ID="genericcloud"
    ...
    Depending on the distributions, you may have specific files. For example, in the Debian OS family, you will have the file /etc/[debian|ubuntu|...]_version
  2. Install Logstash

    In the previous section, you identified the machine's distribution. You must therefore proceed with its installation by following the procedure that corresponds to the distribution's package manager.

    See the correction
    You must follow the installation procedure that corresponds to your package manager: Logstash Installation

    Knowing that you have these matches:
    • YUM / DNF: Fedora family (fedora, redhat, centos, ...)
    • APT: Debian family (debian, ubuntu, ...)
  3. Enable automatic startup

    In the previous section, you installed Logstash. In this section we will make sure that it is started and set in the services to start with the system.

    See the correction
    Historically Linux systems used init.d. But if this is the case on your machine, we recommend you update your OS to a newer version that uses systemd. You will thus be able to start and enable your logstash service with the following commands:
    root@logstash-formation:/home/debian# systemctl start logstash
    ...
    root@logstash-formation:/home/debian# systemctl enable logstash
    Created symlink /etc/systemd/system/multi-user.target.wants/logstash.service → /lib/systemd/system/logstash.service.

    You have other options for the systemctl command that we encourage you to learn:
    root@logstash-formation:/home/debian# systemctl --help

Validate your work

Check that each goal above is reached and that you get the result described in the introduction.

Difficulty level : ●○○○○ (1/5)

My progress

  • ⏱ Estimated time : ≈ 20 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Course Glossary

Logstash

An open-source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to...

Recommended Articles

Logstash: managing plugins and adopting Elastic Common Schema (ECS)

Written version of the video lessons: list, install, update and bundle Logstash plugins offline; ...

Logstash best practices: pipelines, performance, reliability and monitoring

Logstash best practices: multiple pipelines, dissect rather than grok, conditionals, persistent q...

Logstash: role, pipeline concept and installation

Written version of the video lessons: what Logstash is for, how a pipeline works (inputs, filters...

Logstash: inputs and outputs

Written version of the video lessons: common inputs (beats, file, tcp/udp, http, kafka, jdbc) and...

Logstash: filters, grok and dissect

Written version of the video lessons: essential filters (mutate, date, json, kv, drop), the grok ...

Logstash in production: persistent queues, DLQ and multiple pipelines

Make Logstash reliable in production: persistent queue, dead letter queue, multiple pipelines and...

Logstash: enrich, test, monitor and deploy on Kubernetes

Enrich with translate, geoip and elasticsearch, consume Kafka, test pipelines, monitor Logstash a...

Beats: going further (security, performance, Elastic Agent and migrating to Alloy)

Industrialize Filebeat, Metricbeat and the other Beats: secure outputs, processors, modules, tuni...

Standalone Elastic Agent, Logstash and Kafka outputs, and OpenTelemetry (EDOT)

Write a standalone configuration, ship to Logstash or Kafka, and use Elastic Agent as an OpenTele...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!