-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from kumashun8/dc-sample
docker-composeでEFKを動作させる
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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:8.1.2 | ||
container_name: elasticsearch | ||
environment: | ||
- "discovery.type=single-node" | ||
- xpack.security.enabled=false | ||
expose: | ||
- "9200" | ||
ports: | ||
- "9200:9200" | ||
|
||
kibana: | ||
image: docker.elastic.co/kibana/kibana:8.1.2 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# fluentd/Dockerfile | ||
|
||
FROM fluent/fluentd:v1.12.0-debian-1.0 | ||
USER root | ||
RUN ["gem", "install", "fluent-plugin-elasticsearch", "--no-document", "--version", "5.2.4"] | ||
USER fluent |
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,28 @@ | ||
# 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> |