I am configuring the ELK + filebeat environment using docker-compose , but the environment and configuration are as follows.
-
Environment: MacOS
-
Functions to be implemented: Collect the /Users/mymac/dev/logs/app.log file in the MacOS host path from filebeat and send it to logstash
-
composition
Elasticsearch
logstash
kibana
filebeat
All run with docker-compose
Version 7.5.1
-
configuration file
-
docker-compose.yml
logstash:
... ports: - "5044:5044" - "9600:9600" networks: elk
filebeat:
user: root container_name: filebeat volumes: - /Users/mymac/dev/logs:/var/log/server:ro networks: elk depends_on: - logstash
-
filebeat.yml
filebeat.inputs:
-
type: log
enabled: true
paths:
- /var/log/server/*.log
-
-
If you set it up as above and run it with docker-compose ..
After the server is running, the app.log data is sent to logstash immediately, but no changes are sent after that.
The items checked for this are as follows.
- Are you connected to logstash normally?
-> When running the container, check the log of logstash to confirm that it was received normally
- Is the filebeat.yml file in the filebeat container applied properly?
-> Connect to the filebeat container and check the /usr/share/filebeat/filebeat.yml file. As a result, the file set by the host is normally applied.
- Does filebeat's log folder and files exist?
-> Connect to the filebeat container and check the existence of the /var/log/server/app.log file
-> However, even if the host file information is changed or updated, it is confirmed that the date and contents do not change in this container.
-> By forcibly modifying the contents or changing the file permission, the update date and contents are detected as changed and sent to logstash
- When filebeat is run in the background in a MacOS host environment other than docker
-> Collection and delivery normally. make sure there is no problem
Can anyone help me with my problem?
I'm looking for a solution and waiting for help.