Created
February 7, 2020 08:34
-
-
Save crazyrohila/8de618fb04db36807f0aa24605a51a02 to your computer and use it in GitHub Desktop.
Fluent-ES-Kibaba-Logs
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
version: '3' | |
services: | |
web: | |
image: httpd | |
ports: | |
- "80:80" | |
links: | |
- fluentd | |
logging: | |
driver: "fluentd" | |
options: | |
fluentd-address: localhost:24224 | |
tag: httpd.access | |
fluentd: | |
build: ./fluentd | |
volumes: | |
- ./fluentd/conf:/fluentd/etc | |
links: | |
- "elasticsearch" | |
ports: | |
- "24224:24224" | |
- "24224:24224/udp" | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0 | |
environment: | |
- "discovery.type=single-node" | |
expose: | |
- "9200" | |
ports: | |
- "9200:9200" | |
kibana: | |
image: kibana:7.2.0 | |
links: | |
- "elasticsearch" | |
ports: | |
- "5601:5601" |
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
# fluentd/conf/fluent.conf | |
<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 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
# fluentd/Dockerfile | |
FROM fluent/fluentd:v1.6-debian-1 | |
USER root | |
RUN ["gem", "install", "fluent-plugin-elasticsearch", "--no-document", "--version", "3.5.2"] | |
USER fluent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment