Docker apps logging with Filebeat and Logstash

后端 未结 6 487
执念已碎
执念已碎 2021-01-30 07:34

I have a set of dockerized applications scattered across multiple servers and trying to setup production-level centralized logging with ELK. I\'m ok with the ELK part itself, bu

6条回答
  •  时光取名叫无心
    2021-01-30 08:03

    Docker allows you to specify the logDriver in use. This answer does not care about Filebeat or load balancing.

    In a presentation I used syslog to forward the logs to a Logstash (ELK) instance listening on port 5000. The following command constantly sends messages through syslog to Logstash:

    docker run -t -d --log-driver=syslog --log-opt syslog-address=tcp://127.0.0.1:5000 ubuntu /bin/bash -c 'while true; do echo "Hello $(date)"; sleep 1; done'
    

提交回复
热议问题