Skip to content

Instantly share code, notes, and snippets.

@mesaglio
Created July 28, 2020 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mesaglio/352e679cc11d53532699cba717124b3c to your computer and use it in GitHub Desktop.
Save mesaglio/352e679cc11d53532699cba717124b3c to your computer and use it in GitHub Desktop.
Kibana - Elasticsearch - Logstash
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
ports:
- 9200:9200
- 9300:9300
environment:
- discovery.type=single-node
logstash:
image: docker.elastic.co/logstash/logstash:7.8.0
volumes:
- "/home/comafi/logs:/tmp/logs"
- "/home/comafi/ELKConfig/pipeline/logstash.conf:/usr/share/logstash/pipeline/logstash.conf"
links:
- elasticsearch:elasticsearch
depends_on:
- elasticsearch
kibana:
image: docker.elastic.co/kibana/kibana:7.8.0
ports:
- 5601:5601
links:
- elasticsearch:elasticsearch
depends_on:
- elasticsearch
@mesaglio
Copy link
Author

mesaglio commented Jul 28, 2020

logstash.conf

input {
  file {
    type => "log4j"
    path => "/tmp/logs/*.log"
    codec => json
  }
}
output {
  elasticsearch {
    hosts => ["elasticsearch:9200"]
    index => "comafi"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment