SHARE
TWEET

es-kb-lgts-docker-compose.yml

correiabrux Jan 23rd, 2019 (edited) 128 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ cat docker-compose.yml
  2.  
  3. version: '3'
  4. services:
  5.   elasticsearch:
  6.     image: elasticsearch:6.5.4
  7.     ports:
  8.       - 9200:9200
  9.       - 9300:9300
  10.   kibana:
  11.     image: kibana:6.5.4
  12.     ports:
  13.       - 5601:5601
  14.     depends_on:
  15.       - elasticsearch
  16.  
  17.   logstash:
  18.     container_name: logstash
  19.     image: logstash:6.5.4
  20.     command: logstash -f /etc/logstash/conf.d/logstash.conf
  21.     ports:
  22.         - "514:514/tcp"
  23.         - "5043:5043/tcp"
  24.         - "9292:9292/tcp"
  25.  
  26.     volumes:
  27.       - ./logstash/conf.d/:/etc/logstash/conf.d/
  28.       - /tmp/:/tmp/
  29.  
  30.  
  31. $cat logstash/conf.d/logstash.conf
  32.  
  33. input {
  34.     file {
  35.         path => "/tmp/detran.csv"
  36.         type => "_doc"
  37.         start_position => "beginning"
  38.         sincedb_path => "log_sincedb"
  39.     }
  40. }
  41. filter {
  42.     if [type] == "_doc" {
  43.       json {
  44.         source => "message"
  45.       }
  46.     }
  47. }
  48. output {
  49.     elasticsearch { hosts => "elasticsearch" }
  50. }
  51.  
  52. $ sudo docker-compose down
  53. $ sudo docker-compose up
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top