Press "Enter" to skip to content

Docker ELK 持久化状态

ELK架构Docker化后需要持久化Elasticsearch索引数据,以及Filebeat读文件信息状态。

Elasticsearch持久化索引数据和日志示例:

docker run -d -p 9200:9200 -p 9300:9300 --name elasticsearch --network elk \
-v /opt/docker_workspace/elk/elasticsearch/data:/usr/share/elasticsearch/data \
-v /opt/docker_workspace/elk/elasticsearch/logs:/usr/share/elasticsearch/logs \
 -e "discovery.type=single-node" elasticsearch:6.7.0

Filebeat读取日志状态和日志示例:

文件读取状态:/usr/share/filebeat/data/registry

docker run -d --name filebeat -v /data/docker_workspace/elk/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml \
-v /data/docker_workspace/elk/filebeat/data:/usr/share/filebeat/data \
-v /data/logs/elk/filebeat/logs:/usr/share/filebeat/logs \
docker.elastic.co/beats/filebeat:6.7.0

Be First to Comment

发表评论

电子邮件地址不会被公开。 必填项已用*标注