2018-08-31 17:51:32.0|分类: docker+node.js+zookeeper构建微服务|浏览量: 2437
Elasticsearch镜像版本列表 https://hub.docker.com/r/library/elasticsearch/tags/ Logstash镜像版本列表 https://hub.docker.com/r/library/logstash/tags/ kibana镜像版本列表 https://hub.docker.com/r/library/kibana/tags/ elk https://hub.docker.com/r/sebp/elk/ docker run --rm -p 9200:9200 --name elasticsearch elasticsearch 解决办法:(1)elasticsearch5.0默认分配jvm空间大小为2g,修改jvm空间分配 docker run -e ES_JAVA_OPTS="-Xms2g -Xmx2g" (2)修改虚拟机大内存大小, 再次启动elasticsearch docker run --rm -p 9200:9200 --name elasticsearch elasticsearch { "name" : "r8Sb-f9", "cluster_name" : "elasticsearch", "cluster_uuid" : "mOREt9I9S5u5czxmp9Karw", "version" : { "number" : "5.6.11", "build_hash" : "bc3eef4", "build_date" : "2018-08-16T15:25:17.293Z", "build_snapshot" : false, "lucene_version" : "6.6.1" }, "tagline" : "You Know, for Search" } docker run -d -p 4560:4560 -v ~/logstash/logstash.conf:/etc/logstash.conf --link elasticsearch:elasticsearch --name logstash logstash -f /etc/logstash.conf logstash.conf input { tcp{ port => 4560 codec => json } udp{ port => 4560 codec => json } } output { elasticsearch { hosts => ["elasticsearch:9200"] } } docker run -d -p 5601:5601 --link elasticsearch:elasticsearch -e "ELASTICSEARCH_URL=http://elasticsearch:9200" --name kibana kibana Unable to fetch mapping. Do you have indices matching the pattern? 这就说明logstash没有把日志写入到elasticsearch。 |