mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Adding logstash image with pre-install of elasticsearch_groom
This commit is contained in:
parent
57ca565d64
commit
5792b2996a
25
logstash/Dockerfile
Normal file
25
logstash/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
FROM itzg/ubuntu-openjdk-7
|
||||||
|
|
||||||
|
MAINTAINER itzg
|
||||||
|
|
||||||
|
ENV DOCKER_VERSION 1.5.0.rc2-1
|
||||||
|
|
||||||
|
RUN wget -qO /tmp/logstash.deb http://download.elastic.co/logstash/logstash/packages/debian/logstash_${DOCKER_VERSION}_all.deb
|
||||||
|
|
||||||
|
RUN dpkg -i /tmp/logstash.deb && rm /tmp/logstash.deb
|
||||||
|
|
||||||
|
WORKDIR /opt/logstash
|
||||||
|
|
||||||
|
# For collectd reception
|
||||||
|
EXPOSE 25826
|
||||||
|
|
||||||
|
# /conf is the default directory where our logstash will read pipeline config files
|
||||||
|
# /logs is an optional attach point to reference something like /var/log on the host
|
||||||
|
VOLUME ["/conf","/logs"]
|
||||||
|
|
||||||
|
ENV PLUGIN_UPDATES 2015-04-12
|
||||||
|
|
||||||
|
RUN bin/plugin install logstash-input-heartbeat
|
||||||
|
RUN bin/plugin install logstash-output-elasticsearch_groom
|
||||||
|
|
||||||
|
CMD ["bin/logstash","agent","-f","/conf"]
|
25
logstash/conf/example.conf
Normal file
25
logstash/conf/example.conf
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
input {
|
||||||
|
heartbeat {
|
||||||
|
type => 'groom'
|
||||||
|
interval => 11
|
||||||
|
add_field => {
|
||||||
|
scope => 'open'
|
||||||
|
cutoff => '4w'
|
||||||
|
action => 'close'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output {
|
||||||
|
|
||||||
|
if [type] == 'groom' {
|
||||||
|
elasticsearch_groom {
|
||||||
|
host => 'es:9200'
|
||||||
|
index => 'logstash-%{+YYYY.MM.dd}'
|
||||||
|
scope => '%{scope}'
|
||||||
|
age_cutoff => '%{cutoff}'
|
||||||
|
action => '%{action}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user