Running Logstash as a Service on Debian or RPM

edit

Running Logstash as a Service on Debian or RPM

edit

Logstash is not started automatically after installation. How to start and stop Logstash depends on whether your system uses systemd, upstart, or SysV.

Here are some common operating systems and versions, and the corresponding startup styles they use. This list is intended to be informative, not exhaustive.

Distribution

Service System

Ubuntu 16.04 and newer

systemd

Ubuntu 12.04 through 15.10

upstart

Debian 8 "jessie" and newer

systemd

Debian 7 "wheezy" and older

sysv

CentOS (and RHEL) 7 and newer

systemd

CentOS (and RHEL) 6

upstart

Running Logstash by Using Systemd

edit

Distributions like Debian Jessie, Ubuntu 15.10+, and many of the SUSE derivatives use systemd and the systemctl command to start and stop services. Logstash places the systemd unit files in /etc/systemd/system for both deb and rpm. After installing the package, you can start up Logstash with:

sudo systemctl start logstash.service

Running Logstash by Using Upstart

edit

For systems that use upstart, you can start Logstash with:

sudo initctl start logstash

The auto-generated configuration file for upstart systems is /etc/init/logstash.conf.

Running Logstash by Using SysV

edit

For systems that use SysV, you can start Logstash with:

sudo /etc/init.d/logstash start

The auto-generated configuration file for SysV systems is /etc/init.d/logstash.