EFK Stack容器部署
基础环境
安装docker
# curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -
# yum install docker-compose
# mkdir -p /etc/docker
# tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://ar4vj99q.mirror.aliyuncs.com"]
}
EOF
# systemctl daemon-reload
# systemctl restart docker
配置docker-compose.yml
# git clone https://github.com/kzk/docker-compose-efk.git
构建EFK环境
# yum install python-pip
# pip install --upgrade pip
# pip install docker-compose
# cd docker-compose-efk/
# vim fluentd/conf/fluent.conf
<source>
@type syslog
port 5140
bind 0.0.0.0
tag system
</source>
# docker-compose up
验证安装
# curl http://localhost:80/
<html><body><h1>It works!</h1></body></html>
配置Kibana
### web登入http://192.168.200.15:5601
参考文档
Docker Logging via EFK (Elasticsearch + Fluentd + Kibana) Stack with Docker Compose