-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d3b288d
Showing
14 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM docker.elastic.co/logstash/logstash:6.2.2 | ||
|
||
MAINTAINER "Kristofer Borgström" | ||
|
||
LABEL name="logstash multi-pipeline indexer example with xpack" | ||
LABEL vendor="Elastic" | ||
|
||
RUN chmod a+rwx /usr/share/logstash/data/ | ||
|
||
RUN rm -f /usr/share/logstash/pipeline/logstash.conf | ||
|
||
# Add new pipelines to this yaml file and a matching folder defining the pipeline in conf.d | ||
COPY config/pipelines.yml /usr/share/logstash/pipeline/pipelines.yml | ||
COPY config/logstash.yml /usr/share/logstash/config/logstash.yml | ||
COPY conf.d/ /usr/share/logstash/pipeline/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Example use of official xpack Logstash docker image using multiple pipelines | ||
|
||
Tested using docker-compose and Openshift 3.6 & 3.7 (Kubernetes 1.6/1.7) | ||
|
||
## Pipelines | ||
This image supports multiple pipelines. Each pipeline needs: | ||
* An entry in config/pipelines.yml | ||
* A pipeline defined in conf.d/<pipeline-name> | ||
* As a minimum it needs 00-input.conf and 70-output.conf, please see existing pipelines like docker for examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
input { | ||
syslog { | ||
id => "my_plugin_id" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## Preprocessing filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#Add grok filters etc. here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
output { | ||
|
||
elasticsearch { | ||
id => "pipe1" | ||
hosts => "${ELASTICSEARCH}" | ||
user => "logstash" # Should not be the same as for monitoring, needs access to appropriate indexes. | ||
password => "${LOGSTASH_PASSWD}" | ||
index => "logstash-pipe1-%{+YYYY.MM.dd}" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
input { | ||
syslog { | ||
id => "my_plugin_id" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## Preprocessing filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#Add grok filters etc. here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
output { | ||
|
||
elasticsearch { | ||
id => "pipe2" | ||
hosts => "${ELASTICSEARCH}" | ||
user => "logstash" # Should not be the same as for monitoring, needs access to appropriate indexes. | ||
password => "${LOGSTASH_PASSWD}" | ||
index => "logstash-pipe2-%{+YYYY.MM.dd}" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# ------------ Data path ------------------ | ||
# | ||
# Which directory should be used by logstash and its plugins | ||
# for any persistent needs. Defaults to LOGSTASH_HOME/data | ||
# | ||
path.data: /usr/share/logstash/data/ | ||
|
||
# ------------ Pipeline Configuration Settings -------------- | ||
# | ||
# Where to fetch the pipeline configuration for the main pipeline | ||
# | ||
path.settings: /usr/share/logstash/pipeline/ | ||
|
||
# ------------ Dead-Letter Queue Settings -------------- | ||
# Flag to turn on dead-letter queue. | ||
# | ||
dead_letter_queue.enable: false | ||
|
||
xpack.monitoring.elasticsearch.url: http://${ELASTICSEARCH}:9200 | ||
xpack.monitoring.elasticsearch.username: logstash_system # Make sure to use this default user for monitoring | ||
xpack.monitoring.elasticsearch.password: changeme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- pipeline.id: pipeline1 | ||
path.config: "/usr/share/logstash/pipeline/pipe1/*.conf" | ||
- pipeline.id: pipeline2 | ||
path.config: "/usr/share/logstash/pipeline/pipe2/*.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: '2' | ||
services: | ||
logstash: | ||
image: kribor/docker-logstash-indexer-example:6.2.2 | ||
build: . | ||
environment: | ||
- LOGSTASH_PASSWD=changeme | ||
- ELASTICSEARCH=127.0.0.1 |