Skip to content

Commit

Permalink
Add sample configuration file
Browse files Browse the repository at this point in the history
This adds a simple Logstash config sample that works as a standard
Beats -> Logstash -> Elasticsearch starting point.

It's being deployed in packages, typically under /etc/logstash/logstash-sample.conf

This also adds a Dockerfile that can be used to build the artifacts.

Fixes elastic#9588
  • Loading branch information
tsg committed May 17, 2018
1 parent c0abde2 commit 500271b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions config/logstash-sample.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Elasticsearch pipeline.

input {
beats {
port => 5044
}
}

output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
#user => "elastic"
#password => "changeme"
}
}
5 changes: 5 additions & 0 deletions rakelib/artifacts.rake
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ namespace "artifact" do
File.join(basedir, "config", "logstash.yml").tap do |path|
dir.input("#{path}=/etc/logstash")
end
File.join(basedir, "config", "logstash-sample.conf").tap do |path|
dir.input("#{path}=/etc/logstash")
end
File.join(basedir, "pkg", "pipelines.yml").tap do |path|
dir.input("#{path}=/etc/logstash")
end
Expand All @@ -415,6 +418,7 @@ namespace "artifact" do
out.config_files << "/etc/logstash/jvm.options"
out.config_files << "/etc/logstash/log4j2.properties"
out.config_files << "/etc/logstash/logstash.yml"
out.config_files << "/etc/logstash/logstash-sample.conf"
out.config_files << "/etc/logstash/pipelines.yml"
when "debian", "ubuntu"
require "fpm/package/deb"
Expand All @@ -430,6 +434,7 @@ namespace "artifact" do
out.config_files << "/etc/logstash/jvm.options"
out.config_files << "/etc/logstash/log4j2.properties"
out.config_files << "/etc/logstash/logstash.yml"
out.config_files << "/etc/logstash/logstash-sample.conf"
out.config_files << "/etc/logstash/pipelines.yml"
end

Expand Down

0 comments on commit 500271b

Please sign in to comment.