Last active
November 26, 2018 22:00
-
-
Save eduardorost/661baf10cbdb6385e8ed1802f5f8a461 to your computer and use it in GitHub Desktop.
docker-compose and configuration for elastic stack
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 | |
} | |
} | |
filter | |
{ | |
grok{ | |
match => { | |
"message" => "%{COMBINEDAPACHELOG}" | |
} | |
} | |
mutate{ | |
convert => { "bytes" => "integer" } | |
} | |
date { | |
match => [ "timestamp", "dd/MMM/YYYY:HH:mm:ss Z" ] | |
locale => en | |
remove_field => "timestamp" | |
} | |
geoip { | |
source => "clientip" | |
} | |
useragent { | |
source => "agent" | |
target => "useragent" | |
} | |
} | |
output | |
{ | |
stdout { | |
codec => dots | |
} | |
elasticsearch { | |
hosts => ["elasticsearch:9200"] | |
} | |
} |
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.6' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.0 | |
logstash: | |
image: docker.elastic.co/logstash/logstash:6.5.0 | |
command: logstash -f /user/share/logstash/pipeline/apache.conf | |
volumes: | |
- './data/apache.conf:/user/share/logstash/pipeline/apache.conf' | |
depends_on: ['elasticsearch'] | |
filebeat: | |
image: docker.elastic.co/beats/filebeat:6.5.0 | |
volumes: | |
- './data/logs:/usr/share/data/logs:ro' | |
- './data/filebeat.yml:/usr/share/filebeat/filebeat.yml' | |
depends_on: ['logstash'] | |
kibana: | |
image: docker.elastic.co/kibana/kibana:6.5.0 | |
ports: ['5601:5601'] | |
depends_on: ['elasticsearch'] |
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
filebeat.inputs: | |
- type: log | |
enabled: true | |
paths: | |
- /usr/share/data/logs/logs | |
output.logstash: | |
hosts: ["logstash:5044"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment