Docker安装 logstash教程

拉取镜像

docker pull logstash:7.3.0

创建文件

mkdir /vdocker/logstash /vdocker/logstash/conf.d
touch /vdocker/logstash/patterns
 chown -R 1000:1000 /vdocker/logstash

启动镜像

docker run -d --name=logstash -p 5044:5044 -p 9600:9600 \
-v /vdocker/logstash/conf.d:/usr/share/logstash/conf.d \
-v /vdocker/logstash/log:/usr/share/logstash/log \
 logstash:7.3.0

修改配置

vi /vdocker/logstash/config/conf.d/logstash.yml
path.config: /usr/share/logstash/conf.d/*.conf  
path.logs: /var/log/logstash

你可能感兴趣的:(docker,docker,容器,运维)