Skip to content

Commit

Permalink
Add dockerfile and filebeat config
Browse files Browse the repository at this point in the history
  • Loading branch information
ApsOps committed May 16, 2016
1 parent b1269e9 commit feebd7f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu

MAINTAINER Amanpreet Singh <[email protected]>

ENV FILEBEAT_VERSION 1.2.2

RUN apt-get update && \
apt-get -y install wget && \
wget http://download.elastic.co/beats/filebeat/filebeat-${FILEBEAT_VERSION}-x86_64.tar.gz && \
wget https://download.elastic.co/beats/filebeat/filebeat-${FILEBEAT_VERSION}-x86_64.tar.gz.sha1.txt && \
sha1sum -c filebeat-${FILEBEAT_VERSION}-x86_64.tar.gz.sha1.txt && \
tar xzf filebeat-${FILEBEAT_VERSION}-x86_64.tar.gz && \
mv filebeat-${FILEBEAT_VERSION}-x86_64/filebeat /usr/local/bin && \
rm -rf /filebeat* && \
apt-get -y remove wget && \
apt-get -y autoremove

COPY filebeat.yml /etc/filebeat/

CMD ["/usr/local/bin/filebeat", "-e", "-c", "/etc/filebeat/filebeat.yml"]

15 changes: 15 additions & 0 deletions filebeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
filebeat:
prospectors:
-
paths:
- "/var/log/containers/*.log"
document_type: kube-logs

output:
logstash:
hosts: [${LOGSTASH_HOSTS:'logstash:5043'}]
timeout: 15

logging:
level: ${LOG_LEVEL:error}

0 comments on commit feebd7f

Please sign in to comment.