docker(ELK) - logstash-elasticsearch-kibana ╰+攻爆jí腚メ 2022-02-15 11:09 332阅读 0赞 ## 拉取logstash镜像 ## docker pull docker.elastic.co/logstash/logstash:5.5.1 ![在这里插入图片描述][watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0p1bHlfd2hq_size_16_color_FFFFFF_t_70] ## 拉取elasticsearch镜像 ## docker pull docker.elastic.co/elasticsearch/elasticsearch:5.5.1 ![在这里插入图片描述][watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0p1bHlfd2hq_size_16_color_FFFFFF_t_70 1] ## 拉取kibana镜像 ## docker pull docker.elastic.co/kibana/kibana:5.5.1 ![在这里插入图片描述][watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0p1bHlfd2hq_size_16_color_FFFFFF_t_70 2] **启动ES** docker run -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" --name es -d docker.elastic.co/elasticsearch/elasticsearch:5.5.1 **启动Kibana容器** docker run -p 5601:5601 -e "ELASTICSEARCH_URL=http://ip:9200" --name kibana -d docker.elastic.co/kibana/kibana:5.5.1 **编写配置文件** 创建 logstash/logstash.yml http.host: "0.0.0.0" path.config: /usr/share/logstash/pipeline xpack.monitoring.elasticsearch.url: http://ip:9200 xpack.monitoring.elasticsearch.username: elastic xpack.monitoring.elasticsearch.password: changeme **创建logstash/conf.d/logstash.conf** input { file { path => "/tmp/access_log" start_position => "beginning" } } output { elasticsearch { hosts => ["localhost:9200"] user => "elastic" password => "changeme" } } 运行 docker run -v D:/docker/config/logstash:/usr/share/logstash/pipeline/:ro -v /tmp:/tmp:ro -v D:/docker/config/logstash/logstash.yml:/usr/share/logstash/config/logstash.yml:ro --name my-logstash --network host -d docker.elastic.co/logstash/logstash:5.5.1 [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0p1bHlfd2hq_size_16_color_FFFFFF_t_70]: /images/20220215/dbf499c0451442d3aaa1e246d1272717.png [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0p1bHlfd2hq_size_16_color_FFFFFF_t_70 1]: /images/20220215/dec92cb65f9346f795c5ccfd2a8a28ad.png [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0p1bHlfd2hq_size_16_color_FFFFFF_t_70 2]: /images/20220215/bbb66744125e4691a254bb91a1cb1b78.png
还没有评论,来说两句吧...