增加logstash支持

master
Chopper 2021-05-28 16:22:02 +08:00
parent e7b673d48d
commit 0e5aee02cf
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,14 @@
input {
tcp {
mode => "server"
host => "0.0.0.0"
port => 4560
codec => json_lines
}
}
output {
elasticsearch {
hosts => "elasticsearch:9200"
index => "springboot-logstash-%{+YYYY.MM.dd}"
}
}

View File

@ -73,7 +73,18 @@ services:
# - "./config/kibana.yml:/usr/share/kibana/config/kibana.yml" # - "./config/kibana.yml:/usr/share/kibana/config/kibana.yml"
networks: networks:
- stack - stack
depends_on: ['elasticsearch']
logstash:
image: logstash:7.3.0
container_name: logstash
volumes:
- ./config/logstash-springboot.conf:/usr/share/logstash/pipeline/logstash.conf #挂载logstash的配置文件
networks:
- stack
depends_on: ['elasticsearch'] depends_on: ['elasticsearch']
ports: ['4560:4560']
# rocket mq name server # rocket mq name server
rmqnamesrv: rmqnamesrv: