Devenv: Add compose block for elastic 8 (#55214)

* Devenv: Add compose block for elastic 8

* added filebeat and metricbeat configurations

* disable mount to `/var/log`

* renamed to elasticstack

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
This commit is contained in:
Torkel Ödegaard 2022-09-19 16:05:42 +02:00 committed by GitHub
parent e1af4e72bc
commit cc4392d514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2049 additions and 0 deletions

View File

@ -0,0 +1 @@
elastic_version=8.4.1

View File

@ -0,0 +1,32 @@
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${elastic_version}
environment:
- "discovery.type=single-node"
- "xpack.license.self_generated.type=basic"
- "xpack.security.enabled=false"
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:${elastic_version}
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
ports:
- 5601:5601
metricbeat-host:
image: docker.elastic.co/beats/metricbeat-oss:${elastic_version}
command: metricbeat -e -strict.perms=false
user: root
volumes:
- ./docker/blocks/elasticstack/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
filebeat-host:
image: docker.elastic.co/beats/filebeat-oss:${elastic_version}
command: filebeat -e -strict.perms=false
volumes:
- ./docker/blocks/elasticstack/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
# - /var/log:/var/log:ro
- ../data/log:/var/log/grafana:ro

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
metricbeat.config:
modules:
path: ${path.config}/modules.d/*.yml
# Reload module configs as they change:
reload.enabled: false
metricbeat.autodiscover:
providers:
- type: docker
hints.enabled: true
metricbeat.modules:
- module: docker
metricsets:
- "container"
- "cpu"
- "diskio"
- "healthcheck"
- "info"
#- "image"
- "memory"
- "network"
hosts: ["unix:///var/run/docker.sock"]
period: 10s
enabled: true
processors:
- add_cloud_metadata: ~
output.elasticsearch:
hosts: ["elasticsearch:9200"]
index: "metricbeat-%{+yyyy.MM.dd}"
setup.template.name: "metricbeat"
setup.template.pattern: "metricbeat-*"
setup.template.settings:
index.number_of_shards: 1
index.number_of_replicas: 1