Last active
September 21, 2020 03:37
-
-
Save anandsunderraman/736bceba231a4dce7522bfa924062449 to your computer and use it in GitHub Desktop.
ELK docker compose
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: | |
elastic: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.6.0 | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
environment: | |
- discovery.type=single-node | |
kibana: | |
image: docker.elastic.co/kibana/kibana:6.6.0 | |
ports: | |
- "5601:5601" | |
environment: | |
SERVER_NAME: kibana | |
SERVER_HOST: kibana | |
ELASTICSEARCH_HOSTS: http://host.docker.internal:9200/ | |
depends_on: | |
- elastic | |
logstash: | |
image: docker.elastic.co/logstash/logstash:6.6.0 | |
volumes: | |
- ./logstash-conf:/usr/share/logstash/pipeline/ | |
ports: | |
- "5044:5044" | |
environment: | |
ELASTIC_HOST: host.docker.internal:9200 | |
depends_on: | |
- elastic |
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
input { | |
beats { | |
port => "5044" | |
codec => "json" | |
} | |
} | |
filter { | |
json { | |
source => "message" | |
} | |
} | |
output { | |
elasticsearch { | |
hosts => "${ELASTIC_HOST}" | |
index => "%{[fields][project]}-%{[fields][application]}-%{+YYYY.MM.dd}" | |
codec => json | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment