Last active
August 7, 2018 12:04
-
-
Save muresan/31d28851c1fe60132137b4d768d11333 to your computer and use it in GitHub Desktop.
ElasticSearch + fluentd deployment
This file contains hidden or 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
FROM fluent/fluentd | |
RUN apk add --update --virtual .build-deps \ | |
sudo build-base ruby-dev \ | |
&& sudo gem install \ | |
fluent-plugin-elasticsearch \ | |
&& sudo gem sources --clear-all \ | |
&& apk del .build-deps \ | |
&& rm -rf /var/cache/apk/* \ | |
/home/fluent/.gem/ruby/2.4.0/cache/*.gem | |
This file contains hidden or 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
version: '2' | |
services: | |
tester: | |
image: muresan/logtester | |
links: | |
- fluentd | |
logging: | |
driver: "fluentd" | |
options: | |
fluentd-address: localhost:24224 | |
tag: httpd.access | |
fluentd: | |
image: muresan/fluentd:elasticsearch | |
volumes: | |
- ./fluent.conf:/fluentd/etc/fluent.conf | |
links: | |
- "elasticsearch" | |
ports: | |
- "24224:24224" | |
- "24224:24224/udp" | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.0 | |
expose: | |
- 9200 | |
ports: | |
- "9200:9200" | |
kibana: | |
image: docker.elastic.co/kibana/kibana:6.3.0 | |
volumes: | |
- ./kibana.yml:/usr/share/kibana/config/kibana.yml | |
links: | |
- "elasticsearch" | |
ports: | |
- "5601:5601" | |
This file contains hidden or 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
<source> | |
@type forward | |
port 24224 | |
bind 0.0.0.0 | |
</source> | |
<match *.**> | |
@type copy | |
<store> | |
@type elasticsearch | |
host elasticsearch | |
port 9200 | |
logstash_format true | |
logstash_prefix fluentd | |
logstash_dateformat %Y%m%d | |
include_tag_key true | |
type_name access_log | |
tag_key @log_name | |
flush_interval 1s | |
</store> | |
<store> | |
@type stdout | |
</store> | |
</match> |
This file contains hidden or 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
elasticsearch.username: "kibana" | |
elasticsearch.password: "kibana" | |
server.host: "0.0.0.0" | |
server.name: "larry.adworks.ro" | |
elasticsearch.url: "http://elasticsearch:9200" | |
xpack.monitoring.ui.container.elasticsearch.enabled: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment