Logstash - transport and process your logs, events, or other data
Find a file
2018-02-08 11:46:11 -08:00
.github Move Contributors for more visibility 2016-05-20 10:00:33 -07:00
bin Replace command 'which' with 'command -v' for compatibility 2018-02-07 17:43:21 +00:00
buildSrc BUILD: Fix wrong paths and wrong output declarations on installTestGems task 2018-01-29 14:27:54 +00:00
ci BUILD: Run rake tasks in Gradle JVM 2018-01-17 11:57:16 +00:00
config Remove pipeline.output.workers from logstash.yml 2018-01-04 21:02:02 +00:00
data Add back missing gitkeep in data dir 2018-01-23 12:40:36 +00:00
docs Test change to introduce file conflict (#9121) 2018-02-08 11:46:11 -08:00
gradle/wrapper MINOR: Move to Gradle 4.3 + Use Gradle Source Distribution 2017-10-31 19:42:22 +00:00
lib Secret Store: Ability to set and use secret data from an encrypted data store. 2018-01-13 01:24:33 +00:00
logstash-core Fix PQ stats with ruby pipeline 2018-02-08 16:59:07 +00:00
logstash-core-plugin-api Add generated runtime_dependency to logstash core plugin 2017-10-13 15:03:41 +00:00
modules Adding an ability of being more verbose when setting up netflow module 2017-11-17 02:18:37 +00:00
pkg Ensure that environment variables are only accessible to be read root 2018-01-24 16:43:37 +00:00
qa test fix: use single worker in test to avoid concurrency issue in sleep filter 2018-01-17 18:07:53 +00:00
rakelib BUILD: Remove invocations in rake tasks 2018-01-26 21:11:12 +00:00
spec Remove in memory serialized queue Ruby wrappers 2018-01-22 23:22:15 +00:00
tools #8360 fix tests by enforcing IPV4 in Benchmark tool UTs 2017-09-23 06:50:40 +00:00
.dockerignore Introduce docker for CI builds. 2017-09-14 18:55:41 +00:00
.gitignore Keystore documentation 2018-02-06 01:32:54 +00:00
.ruby-version Revert "MINOR: Adjust Ruby Version File" 2017-09-12 17:55:54 +00:00
build.gradle BUILD: Fix wrong paths and wrong output declarations on installTestGems task 2018-01-29 14:27:54 +00:00
CONTRIBUTING.md Doc: update contributing guide to include link for IntelliJ setup Fixes #7120 2017-06-19 12:53:40 +00:00
CONTRIBUTORS Doc: update contributing guide to include link for IntelliJ setup Fixes #7120 2017-06-19 12:53:40 +00:00
COPYING.csv Add tool to generate dependency details in csv 2017-12-22 16:54:29 +00:00
Dockerfile Revert "Add .lock.release to the test docker container" 2017-11-29 17:01:44 +00:00
Dockerfile.base Minor: Remove JRuby 1.7 from the docker base image (it is not used) 2017-09-20 12:16:05 +00:00
Gemfile.template add jdbc_static (#8933) 2018-01-16 18:54:28 +00:00
gradle.properties Test fix: disable the gradle daemon by default (as recommended for CI) 2017-10-05 20:50:48 +00:00
gradlew Migrate Logstash to Log4j2 Logging (#5651) 2016-08-25 10:30:22 -07:00
gradlew.bat Migrate Logstash to Log4j2 Logging (#5651) 2016-08-25 10:30:22 -07:00
LICENSE Generate notice file during artifact build (#6538) 2017-01-16 10:09:02 -08:00
Rakefile Rakefile: update help with test tasks. 2017-03-31 14:01:29 -04:00
README.md Fix spacing 2018-02-07 19:45:17 +00:00
ROADMAP.md New roadmap page 2016-05-20 05:59:42 +00:00
settings.gradle Benchmark Tool 2017-07-24 15:46:30 +00:00
STYLE.md use jruby 9.1.9.0 2017-06-12 12:35:10 -04:00
versions.yml Bump to 6.3 2018-01-22 15:51:58 +00:00

Logstash

Logstash is part of the Elastic Stack along with Beats, Elasticsearch and Kibana. Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite "stash." (Ours is Elasticsearch, naturally.). Logstash has over 200 plugins, and you can write your own very easily as well.

The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.

For more info, see https://www.elastic.co/products/logstash

Documentation and Getting Started

You can find the documentation and getting started guides for Logstash on the elastic.co site

For information about building the documentation, see the README in https://github.com/elastic/docs

Downloads

You can download officially released Logstash binaries, as well as debian/rpm packages for the supported platforms, from downloads page.

Snapshot Builds

For the daring, snapshot builds are available. These builds are created nightly and have undergone no formal QA, so they should never be run in production.

artifact
tar
zip
deb
rpm

Need Help?

Logstash Plugins

Logstash plugins are hosted in separate repositories under the logstash-plugins github organization. Each plugin is a self-contained Ruby gem which gets published to RubyGems.org.

Writing your own Plugin

Logstash is known for its extensibility. There are hundreds of plugins for Logstash and you can write your own very easily! For more info on developing and testing these plugins, please see the working with plugins section

Plugin Issues and Pull Requests

Please open new issues and pull requests for plugins under its own repository

For example, if you have to report an issue/enhancement for the Elasticsearch output, please do so here.

Logstash core will continue to exist under this repository and all related issues and pull requests can be submitted here.

Developing Logstash Core

Prerequisites

  • Install JDK version 8. Make sure to set the JAVA_HOME environment variable to the path to your JDK installation directory. For example set JAVA_HOME=<JDK_PATH>
  • Install JRuby 9.1.x It is recommended to use a Ruby version manager such as RVM or rbenv.
  • Install rake and bundler tool using gem install rake and gem install bundler respectively.

RVM install (optional)

If you prefer to use rvm (ruby version manager) to manage Ruby versions on your machine, follow these directions:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby=jruby-9.1.10.0

Check Ruby version

Before you proceed, please check your ruby version by:

$ ruby -v
jruby 9.1.10.0 (2.3.3) 2017-05-25 b09c48a Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 +jit [darwin-x86_64]

Building Logstash

  • To run Logstash from the repo you must first bootstrap the environment:
rake bootstrap
  • You can then use bin/logstash to start Logstash, but there are no plugins installed. To install default plugins, you can run:
rake plugin:install-default

This will install the 80+ default plugins which makes Logstash ready to connect to multiple data sources, perform transformations and send the results to Elasticsearch and other destinatins.

To verify your environment, run the following to send your first event:

bin/logstash -e 'input { stdin { } } output { stdout {} }'

This should start Logstash with stdin input waiting for you to enter an event

hello world
2016-11-11T01:22:14.405+0000 0.0.0.0 hello world

Advanced: Drip Launcher

Drip is a tool that solves the slow JVM startup problem while developing Logstash. The drip script is intended to be a drop-in replacement for the java command. We recommend using drip during development, in particular for running tests. Using drip, the first invocation of a command will not be faster but the subsequent commands will be swift.

To tell logstash to use drip, either set the USE_DRIP=1 environment variable or set JAVACMD=`which drip`.

Example:

USE_DRIP=1 bin/rspec

Caveats

Drip does not work with STDIN. You cannot use drip for running configs which use the stdin plugin.

Building Logstash Documentation

To build the Logstash Reference (open source content only) on your local machine, clone the following repos:

logstash - contains main docs about core features

logstash-docs - contains generated plugin docs

docs - contains doc build files

Make sure you have the same branch checked out in logstash and logstash-docs. Check out master in the docs repo.

Run the doc build script from within the docs repo. For example:

./build_docs.pl --doc ../logstash/docs/index.asciidoc --chunk=1 -open

Testing

Most of the unit tests in Logstash are written using rspec for the Ruby parts. For the Java parts, we use junit. For testing you can use the test rake tasks and the bin/rspec command, see instructions below:

Core tests

1- To run the core tests you can use the Gradle task:

./gradlew test

or use the rspec tool to run all tests or run a specific test:

bin/rspec
bin/rspec spec/foo/bar_spec.rb

Note that before running the rspec command for the first time you need to set up the RSpec test dependencies by running:

./gradlew bootstrap

2- To run the subset of tests covering the Java codebase only run:

./gradlew javaTests

3- To execute the complete test-suite including the integration tests run:

./gradlew check

Plugins tests

To run the tests of all currently installed plugins:

rake test:plugin

You can install the default set of plugins included in the logstash package:

rake test:install-default

Note that if a plugin is installed using the plugin manager bin/logstash-plugin install ... do not forget to also install the plugins development dependencies using the following command after the plugin installation:

bin/logstash-plugin install --development

Building Artifacts

You can build a Logstash snapshot package as tarball or zip file

./gradlew assembleTarDistribution
./gradlew assembleZipDistribution

This will create the artifact LS_HOME/build directory

You can also build .rpm and .deb, but the fpm tool is required.

rake artifact:rpm
rake artifact:deb

Project Principles

  • Community: If a newbie has a bad time, it's a bug.
  • Software: Make it work, then make it right, then make it fast.
  • Technology: If it doesn't do a thing today, we can make it do it tomorrow.

Contributing

All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin.

Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here.

It is more important to me that you are able to contribute.

For more information about contributing, see the CONTRIBUTING file.