Docs
ues
Elasticsearch
Development Guide
Logstash deployment

Logstash Deployment

Logstash Installation

Logstash 5.5 requires Java 8 and does not support Java 9. You can use the official Oracle distribution or open-source distributions such as OpenJDK.

Installation reference Installing-Logstash

Configuration File Writing

To configure Logstash, you need to create a configuration file specifying the plugins to use and the settings for each plugin. You can reference event fields in the configuration and use conditions to handle events that meet specific conditions. When you run Logstash, use -f to specify the configuration file.

Create a file named logstash-simple.conf and save it in the same directory as Logstash.

input { stdin { } }
output {
  elasticsearch { hosts => ["<host>:9200"] }
  stdout { codec => rubydebug }
}

Run Logstash and specify the configuration file using the -f flag.

bin/logstash -f logstash-simple.conf

For more configuration examples, please refer to Logstash-Config-Examples