parent
c82599b6f1
commit
2873a786fb
@ -0,0 +1,36 @@ |
||||
version: '3' |
||||
services: |
||||
es01-test: |
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14 |
||||
container_name: es01-test |
||||
networks: |
||||
- elastic |
||||
ports: |
||||
- "127.0.0.1:9200:9200" |
||||
- "127.0.0.1:9300:9300" |
||||
environment: |
||||
- discovery.type=single-node |
||||
|
||||
kib01-test: |
||||
image: docker.elastic.co/kibana/kibana:7.17.14 |
||||
container_name: kib01-test |
||||
networks: |
||||
- elastic |
||||
ports: |
||||
- "0.0.0.0:5601:5601" |
||||
environment: |
||||
- ELASTICSEARCH_HOSTS=http://es01-test:9200 |
||||
|
||||
logstash: |
||||
image: docker.elastic.co/logstash/logstash:8.11.1 |
||||
container_name: logstash-container |
||||
networks: |
||||
- elastic |
||||
volumes: |
||||
- ./scripts/elk/logstash.conf:/usr/share/logstash/config/logstash.conf |
||||
- ./tmp_log:/tmp_log |
||||
command: logstash -f /usr/share/logstash/config/logstash.conf |
||||
|
||||
networks: |
||||
elastic: |
||||
driver: bridge |
@ -0,0 +1,25 @@ |
||||
input { |
||||
file { |
||||
path => "/tmp_log/*/*.log" |
||||
start_position => "beginning" |
||||
sincedb_path => "/dev/null" |
||||
codec => "json" |
||||
} |
||||
} |
||||
|
||||
filter { |
||||
# You can add additional filters here if needed |
||||
} |
||||
|
||||
output { |
||||
stdout { |
||||
codec => rubydebug |
||||
} |
||||
|
||||
# You can send the parsed logs to other outputs like Elasticsearch |
||||
# Uncomment the lines below and modify the Elasticsearch configuration |
||||
elasticsearch { |
||||
hosts => ["es01-test:9200"] |
||||
index => "harmony" |
||||
} |
||||
} |
Loading…
Reference in new issue