49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
version: '3'
|
|
services:
|
|
# collect logs for docker containers
|
|
filebeat:
|
|
restart: on-failure
|
|
image: docker.elastic.co/beats/filebeat-oss:8.10.4
|
|
volumes:
|
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ./docker/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml
|
|
|
|
# collect scrapped logs
|
|
logstash:
|
|
restart: on-failure
|
|
image: opensearchproject/logstash-oss-with-opensearch-output-plugin
|
|
volumes:
|
|
- ./docker/logstash/pipeline:/usr/share/logstash/pipeline
|
|
|
|
# database to store logs
|
|
opensearch:
|
|
restart: on-failure
|
|
image: opensearchproject/opensearch
|
|
environment:
|
|
- discovery.type=single-node
|
|
- plugins.security.ssl.http.enabled=false
|
|
ports:
|
|
- 9200:9200 # REST API
|
|
- 9600:9600 # Performance Analyzer
|
|
volumes:
|
|
- opensearch-data:/usr/share/opensearch/data
|
|
|
|
# web ui for visualization
|
|
opensearch-dashboards:
|
|
restart: on-failure
|
|
image: opensearchproject/opensearch-dashboards
|
|
ports:
|
|
- 5601:5601
|
|
environment:
|
|
- OPENSEARCH_HOSTS=http://opensearch:9200
|
|
volumes:
|
|
- opensearch-dashboards-data:/usr/share/opensearch-dashboards/data
|
|
|
|
# logs persistent
|
|
volumes:
|
|
opensearch-data:
|
|
external: false
|
|
opensearch-dashboards-data:
|
|
external: false
|