-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit was created by the elastic-dockerfiles-publisher.
- Loading branch information
1 parent
233d532
commit b0c83e7
Showing
11 changed files
with
120 additions
and
11 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
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
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
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,59 @@ | ||
# This Dockerfile was generated from templates/Dockerfile.j2 | ||
FROM centos:7 | ||
|
||
# Install Java and the "which" command, which is needed by Logstash's shell | ||
# scripts. | ||
RUN yum update -y && yum install -y java-11-openjdk-devel which && \ | ||
yum clean all | ||
|
||
# Provide a non-root user to run the process. | ||
RUN groupadd --gid 1000 logstash && \ | ||
adduser --uid 1000 --gid 1000 \ | ||
--home-dir /usr/share/logstash --no-create-home \ | ||
logstash | ||
|
||
# Add Logstash itself. | ||
RUN curl -Lo - https://artifacts.elastic.co/downloads/logstash/logstash-7.2.0.tar.gz | \ | ||
tar zxf - -C /usr/share && \ | ||
mv /usr/share/logstash-7.2.0 /usr/share/logstash && \ | ||
chown --recursive logstash:logstash /usr/share/logstash/ && \ | ||
chown -R logstash:root /usr/share/logstash && \ | ||
chmod -R g=u /usr/share/logstash && \ | ||
find /usr/share/logstash -type d -exec chmod g+s {} \; && \ | ||
ln -s /usr/share/logstash /opt/logstash | ||
|
||
WORKDIR /usr/share/logstash | ||
|
||
ENV ELASTIC_CONTAINER true | ||
ENV PATH=/usr/share/logstash/bin:$PATH | ||
|
||
# Provide a minimal configuration, so that simple invocations will provide | ||
# a good experience. | ||
ADD config/pipelines.yml config/pipelines.yml | ||
ADD config/logstash-full.yml config/logstash.yml | ||
ADD config/log4j2.properties config/ | ||
ADD pipeline/default.conf pipeline/logstash.conf | ||
RUN chown --recursive logstash:root config/ pipeline/ | ||
|
||
# Ensure Logstash gets a UTF-8 locale by default. | ||
ENV LANG='en_US.UTF-8' LC_ALL='en_US.UTF-8' | ||
|
||
# Place the startup wrapper script. | ||
ADD bin/docker-entrypoint /usr/local/bin/ | ||
RUN chmod 0755 /usr/local/bin/docker-entrypoint | ||
|
||
USER 1000 | ||
|
||
ADD env2yaml/env2yaml /usr/local/bin/ | ||
|
||
EXPOSE 9600 5044 | ||
|
||
|
||
LABEL org.label-schema.schema-version="1.0" \ | ||
org.label-schema.vendor="Elastic" \ | ||
org.label-schema.name="logstash" \ | ||
org.label-schema.version="7.2.0" \ | ||
org.label-schema.url="https://www.elastic.co/products/logstash" \ | ||
org.label-schema.vcs-url="https://github.com/elastic/logstash" \ | ||
license="Elastic License" | ||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] |
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 @@ | ||
#!/bin/bash -e | ||
|
||
# Map environment variables to entries in logstash.yml. | ||
# Note that this will mutate logstash.yml in place if any such settings are found. | ||
# This may be undesirable, especially if logstash.yml is bind-mounted from the | ||
# host system. | ||
env2yaml /usr/share/logstash/config/logstash.yml | ||
|
||
export LS_JAVA_OPTS="-Dls.cgroup.cpuacct.path.override=/ -Dls.cgroup.cpu.path.override=/ $LS_JAVA_OPTS" | ||
|
||
if [[ -z $1 ]] || [[ ${1:0:1} == '-' ]] ; then | ||
exec logstash "$@" | ||
else | ||
exec "$@" | ||
fi |
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,16 @@ | ||
status = error | ||
name = LogstashPropertiesConfig | ||
|
||
appender.console.type = Console | ||
appender.console.name = plain_console | ||
appender.console.layout.type = PatternLayout | ||
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n | ||
|
||
appender.json_console.type = Console | ||
appender.json_console.name = json_console | ||
appender.json_console.layout.type = JSONLayout | ||
appender.json_console.layout.compact = true | ||
appender.json_console.layout.eventEol = true | ||
|
||
rootLogger.level = ${sys:ls.log.level} | ||
rootLogger.appenderRef.console.ref = ${sys:ls.log.format}_console |
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,2 @@ | ||
http.host: "0.0.0.0" | ||
xpack.monitoring.elasticsearch.hosts: [ "http://elasticsearch:9200" ] |
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 @@ | ||
http.host: "0.0.0.0" |
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,6 @@ | ||
# This file is where you define your pipelines. You can define multiple. | ||
# For more information on multiple pipelines, see the documentation: | ||
# https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html | ||
|
||
- pipeline.id: main | ||
path.config: "/usr/share/logstash/pipeline" |
Binary file not shown.
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,12 @@ | ||
input { | ||
beats { | ||
port => 5044 | ||
} | ||
} | ||
|
||
output { | ||
stdout { | ||
codec => rubydebug | ||
} | ||
} | ||
|