I used a lot ELK service during my work in the telecommunication industry. It is used for both costumer service and developer to confirm complains from customers. Usually, I didn’t know how kibana shows the result from my development until I deployed and it risks alot since potentially can affect the production. So, by knowing how ELK work locally, we can see the kibana view and find the bug during the development activity.
elasticsearch:image:docker.elastic.co/elasticsearch/elasticsearch:8.11.1container_name:elasticsearchenvironment:- discovery.type=single-node- "ES_JAVA_OPTS=-Xms512m -Xmx512m"# Adjust memory as needed- xpack.security.enabled=false# Disable security for simplicity in this exampleports:- "9200:9200"- "9300:9300"volumes:- elasticsearch-data:/usr/share/elasticsearch/datakibana:image:docker.elastic.co/kibana/kibana:8.11.1container_name:kibanaports:- "5601:5601"environment:- ELASTICSEARCH_HOSTS=http://elasticsearch:9200- xpack.security.enabled=false# Disable security for simplicity in this exampledepends_on:- elasticsearchfilebeat:image:docker.elastic.co/beats/filebeat:8.11.1container_name:filebeatuser:root# Needed to access logs of other containers. Remove/adjust if possiblevolumes:- ./container/elk/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro- /var/lib/docker/containers:/var/lib/docker/containers:ro# For docker logs- /var/run/docker.sock:/var/run/docker.sock:ro# Needed for docker logs input- filebeat-data:/usr/share/filebeat/data- ./container/elk/filebeat/logs:/diameter-logs:rodepends_on:- elasticsearchconfigs:mqtt_conf:file:./container/mosquitto.confvolumes:elasticsearch-data:filebeat-data: