Fix: logstash volume error
- 마운트 대상을 config폴더 -> config/logstash.yml로 변경 - docker-compose에 서비스 명 변경
This commit is contained in:
parent
7a70c495f5
commit
077cab7218
@ -1,7 +1,7 @@
|
|||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
es:
|
elasticsearch:
|
||||||
image: 'docker.elastic.co/elasticsearch/elasticsearch-oss:7.3.1'
|
image: 'docker.elastic.co/elasticsearch/elasticsearch-oss:7.3.1'
|
||||||
container_name: elasticsearch_container
|
container_name: elasticsearch_container
|
||||||
ports:
|
ports:
|
||||||
@ -15,12 +15,9 @@ services:
|
|||||||
ES_JAVA_OPTS: "-Xmx1024m -Xms1024m"
|
ES_JAVA_OPTS: "-Xmx1024m -Xms1024m"
|
||||||
networks:
|
networks:
|
||||||
- elk_network
|
- elk_network
|
||||||
# links:
|
|
||||||
# - kb
|
|
||||||
# - ls
|
|
||||||
# - fb
|
|
||||||
|
|
||||||
kb:
|
|
||||||
|
kibana:
|
||||||
image: 'docker.elastic.co/kibana/kibana-oss:7.3.1'
|
image: 'docker.elastic.co/kibana/kibana-oss:7.3.1'
|
||||||
container_name: kibana_container
|
container_name: kibana_container
|
||||||
ports:
|
ports:
|
||||||
@ -29,16 +26,12 @@ services:
|
|||||||
- ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
|
- ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- fb
|
- filebeat
|
||||||
networks:
|
networks:
|
||||||
- elk_network
|
- elk_network
|
||||||
# links:
|
|
||||||
# - es
|
|
||||||
# - ls
|
|
||||||
# - fb
|
|
||||||
|
|
||||||
|
|
||||||
ls:
|
logstash:
|
||||||
image: 'docker.elastic.co/logstash/logstash-oss:7.3.1'
|
image: 'docker.elastic.co/logstash/logstash-oss:7.3.1'
|
||||||
container_name: logstash_container
|
container_name: logstash_container
|
||||||
ports:
|
ports:
|
||||||
@ -46,32 +39,25 @@ services:
|
|||||||
- "9600:9600"
|
- "9600:9600"
|
||||||
- "5044:5044"
|
- "5044:5044"
|
||||||
volumes:
|
volumes:
|
||||||
- ./logstash/config:/usr/share/logstash/config:z
|
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:z
|
||||||
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro
|
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
environment:
|
environment:
|
||||||
LS_JAVA_OPTS: "-Xmx1024m -Xms1024m"
|
LS_JAVA_OPTS: "-Xmx1024m -Xms1024m"
|
||||||
depends_on:
|
depends_on:
|
||||||
- es
|
- elasticsearch
|
||||||
networks:
|
networks:
|
||||||
- elk_network
|
- elk_network
|
||||||
# links:
|
|
||||||
# - kb
|
|
||||||
# - es
|
|
||||||
# - fb
|
|
||||||
|
|
||||||
|
|
||||||
fb:
|
filebeat:
|
||||||
image: 'docker.elastic.co/beats/filebeat-oss:7.3.1'
|
image: 'docker.elastic.co/beats/filebeat-oss:7.3.1'
|
||||||
container_name: filebeat_container
|
container_name: filebeat_container
|
||||||
depends_on:
|
depends_on:
|
||||||
- ls
|
- logstash
|
||||||
networks:
|
networks:
|
||||||
- elk_network
|
- elk_network
|
||||||
# links:
|
|
||||||
# - kb
|
|
||||||
# - ls
|
|
||||||
# - es
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
elk_network:
|
elk_network:
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
|
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
|
||||||
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
|
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
|
||||||
# Kibana Server IP입력
|
# Kibana Server IP입력
|
||||||
host: "kb:5601"
|
host: "kibana:5601"
|
||||||
|
|
||||||
# Elasticsearch로는 로그를 보내지 않을 것이기 때문에 다 주석처리
|
# Elasticsearch로는 로그를 보내지 않을 것이기 때문에 다 주석처리
|
||||||
#-------------------------- Elasticsearch output ------------------------------
|
#-------------------------- Elasticsearch output ------------------------------
|
||||||
@ -47,7 +47,7 @@
|
|||||||
output.logstash:
|
output.logstash:
|
||||||
# The Logstash hosts
|
# The Logstash hosts
|
||||||
# Logstash Server IP 입력
|
# Logstash Server IP 입력
|
||||||
hosts: ["ls:5000"]
|
hosts: ["logstash:5000"]
|
||||||
|
|
||||||
#================================ Processors =====================================
|
#================================ Processors =====================================
|
||||||
# 로그 파일을 보낼 때 서버의 Host정보와 Cloud정보를 보낼지 설정하는 부분
|
# 로그 파일을 보낼 때 서버의 Host정보와 Cloud정보를 보낼지 설정하는 부분
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
## Default Kibana configuration from Kibana base image.
|
## Default Kibana configuration from Kibana base image.
|
||||||
## https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/templates/kibana_yml.template.ts
|
## https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/templates/kibana_yml.template.ts
|
||||||
#
|
#
|
||||||
server.name: kibana
|
server.name: "kibana"
|
||||||
server.host: 0.0.0.0
|
server.host: "0.0.0.0"
|
||||||
elasticsearch.hosts: [ http://es:9200 ]
|
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ filter {
|
|||||||
# 모든 데이터를 elk-%{+YYYY.MM.dd}라는 이름의 인덱스를 만들어서 Elasticsearch로 보내도록 설정
|
# 모든 데이터를 elk-%{+YYYY.MM.dd}라는 이름의 인덱스를 만들어서 Elasticsearch로 보내도록 설정
|
||||||
output {
|
output {
|
||||||
elasticsearch {
|
elasticsearch {
|
||||||
hosts => "http://es:9200"
|
hosts => "http://elasticsearch:9200"
|
||||||
index => "elk-%{+YYYY.MM.dd}"
|
index => "elk-%{+YYYY.MM.dd}"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user