{"id":4716,"date":"2015-10-21T15:56:15","date_gmt":"2015-10-21T07:56:15","guid":{"rendered":"https:\/\/www.hmouse.tk\/?p=4716"},"modified":"2015-10-22T10:01:14","modified_gmt":"2015-10-22T02:01:14","slug":"elasticsearch%e7%9a%84%e7%a0%94%e7%a9%b6%ef%bc%88%e4%ba%8c%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.hmouse.cn\/?p=4716","title":{"rendered":"elasticsearch\u7684\u7814\u7a76\uff08\u4e8c\uff09"},"content":{"rendered":"<p>\u5728\u4f7f\u7528\u4e862\u4e2a\u6708\u7684elasticsearch\u540e\uff0c\u53d1\u73b0\u5355\u53f0\u7684elasticsearch\u7684\u6027\u80fd\u5b9e\u5728\u662f\u65e0\u6cd5\u6ee1\u8db3\u6211\u4eec\u7684\u9700\u6c42\uff0c\u5c31\u60f3\u5230elasticsearch\u96c6\u7fa4\uff0c\u5176\u5b9eelasticsearch\u7684\u914d\u7f6e\u8fd8\u662f\u5f88\u7b80\u5355\u7684\u3002\u6211\u5927\u81f4\u8bf4\u8bf4\u3002<\/p>\n<p>\u53c2\u8003url\uff1a<a title=\"http:\/\/stackoverflow.com\/questions\/28473687\/elasticsearch-cluster-no-known-master-node-scheduling-a-retry\" href=\"http:\/\/stackoverflow.com\/questions\/28473687\/elasticsearch-cluster-no-known-master-node-scheduling-a-retry\">http:\/\/stackoverflow.com\/questions\/28473687\/elasticsearch-cluster-no-known-master-node-scheduling-a-retry<\/a><\/p>\n<p>\u914d\u7f6e\u5f88\u597d\u7684\u6f14\u793a<\/p>\n<p><a title=\"http:\/\/www.learnes.net\/getting_started\/installing_es.html\" href=\"http:\/\/www.learnes.net\/getting_started\/installing_es.html\">http:\/\/www.learnes.net\/getting_started\/installing_es.html<\/a><\/p>\n<p>Marvel \u63d2\u4ef6 \u5176\u5b9e\u6211\u6ca1\u7528\uff0c\u4e0d\u8fc7\u89c9\u5f97\u633a\u597d\u7684\u4e5f\u63a8\u8350\u770b\u4e0b<\/p>\n<p><a title=\"http:\/\/my.oschina.net\/xiaohui249\/blog\/228748\" href=\"http:\/\/my.oschina.net\/xiaohui249\/blog\/228748\">http:\/\/my.oschina.net\/xiaohui249\/blog\/228748<\/a><\/p>\n<p>head\u63d2\u4ef6 \u548c bigdesk\u63d2\u4ef6 \u633a\u597d\u7528\u7684\u3002<\/p>\n<p><a title=\"http:\/\/www.cnblogs.com\/hdflzh\/p\/4103226.html\" href=\"http:\/\/www.cnblogs.com\/hdflzh\/p\/4103226.html\">http:\/\/www.cnblogs.com\/hdflzh\/p\/4103226.html<\/a><\/p>\n<p>\u6bd4\u8f83\u8be6\u7ec6\u8bf4\u660eelasticsearch\u914d\u7f6e\u6587\u4ef6\u7684\u53c2\u6570\u7684\u6587\u7ae0<\/p>\n<p><a title=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/modules-transport.html\" href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/modules-transport.html\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/modules-transport.html<\/a><\/p>\n<p>transport \u7684IP\u95ee\u9898\uff0c\u8fd9\u662f\u6211\u9047\u5230\u7684\u7279\u6b8a\u7684\u4e00\u4e2a\u60c5\u51b5\uff0c\u53ef\u4ee5\u89e3\u51b3\u6211\u9047\u5230\u7684\u95ee\u9898\u3002<\/p>\n<h1>\u5b89\u88c5\uff1a<\/h1>\n<p>\u6ca1\u5565\u8bf4\u7684\u3002\u7b49\u4e8e\u5b89\u88c52\u4e2aelasticsearch\uff0c\u7136\u540e\u6309\u7167\u4e0a\u9762\u63d0\u793a\u53bb\u5b89\u88c5\u63d2\u4ef6\u3002<\/p>\n<p>\u4e3e\u4f8b\uff1a<\/p>\n<p>&nbsp; \uff081\uff09head  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u548c\u63d2\u4ef6\u540d\u5b57\u4e00\u6837\uff0c\u9996\u63a8\u8fd9\u4e2a\u63d2\u4ef6\u3002\u901a\u8fc7head\uff0c\u53ef\u4ee5\u67e5\u770b\u96c6\u7fa4\u51e0\u4e4e\u6240\u6709\u4fe1\u606f\uff0c\u8fd8\u80fd\u8fdb\u884c\u7b80\u5355\u7684\u641c\u7d22\u67e5\u8be2\uff0c\u89c2\u5bdf\u81ea\u52a8\u6062\u590d\u7684\u60c5\u51b5\u7b49\u7b49\u3002  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u5f00\u59cb\u5b89\u88c5\uff1asudo elasticsearch\/bin\/plugin -install mobz\/elasticsearch-head  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u8bb0\u5f97\u4e24\u53f0\u673a\u5668\u90fd\u5b89\u88c5\u4e00\u4e0b\u54e6\u3002\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u5728\u6d4f\u89c8\u5668\u8f93\u5165\uff1ahttp:\/\/ip:9200\/_plugin\/head\/ \uff0c\u53ef\u4ee5\u67e5\u770b\u663e\u793a\u6548\u679c\u3002\u5982\u4e0b\u56fe\uff1a  <\/p>\n<p><a href=\"http:\/\/static.oschina.net\/uploads\/space\/2014\/0430\/104917_6Srk_1010775.png\"><img decoding=\"async\" src=\"http:\/\/static.oschina.net\/uploads\/space\/2014\/0430\/104917_6Srk_1010775.png\"><\/a>  <\/p>\n<p>cluster health:green (2, 20) : \u8868\u793a\u8be5\u96c6\u7fa4\u76ee\u524d\u5904\u4e8e\u5065\u5eb7\u72b6\u6001\uff0c\u96c6\u7fa4\u5305\u542b2\u53f0\u673a\u5668\uff0c\u7d22\u5f15\u603b\u517120\u4e2a\u5206\u7247\u3002\u7c97\u7ebf\u7eff\u6846\u8868\u793a\u4e3b\u5206\u7247\uff0c\u7ec6\u7ebf\u7eff\u6846\u4e3a\u5907\u4efd\u5206\u7247\u3002  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u8fd8\u6709\u5f88\u591a\u529f\u80fd\uff0c\u8bf7\u8bfb\u8005\u81ea\u5df1\u53bb\u4f53\u9a8c\u3002  <\/p>\n<h1>\u914d\u7f6e\uff1a<\/h1>\n<p>Node 1:<\/p>\n<pre><code>cluster.name: mycluster\nnode.name: \"node1\"\nnode.master: true\nnode.data: true\ndiscovery.zen.ping.multicast.enabled: false\ndiscovery.zen.ping.unicast.hosts: [\"node1.example.com\"]\n<\/code><\/pre>\n<p>Node 2:<\/p>\n<pre><code>cluster.name: mycluster\nnode.name: \"node2\"\nnode.master: false\nnode.data: true\ndiscovery.zen.ping.multicast.enabled: false\ndiscovery.zen.ping.unicast.hosts: [\"node1.example.com\"]<\/code><\/pre>\n<p>\u8fd9\u4e2a\u5c31\u662f\u5173\u4e8e\u96c6\u7fa4\u7684\u914d\u7f6e\uff0c\u552f\u4e00\u6ce8\u610f\u7684\u5c31\u662fhosts\u9700\u8981\u5b9a\u5411\uff0c\u6216\u8005\u914d\u7f6e\u5bf9\u5e94\u7684IP\u3002\u7136\u540e\u542f\u52a82\u4e2a\u5c31\u597d\u4e86\u3002<\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image_thumb.png\" width=\"244\" height=\"76\"><\/a> <\/p>\n<p>\u914d\u7f6e\u597d\u540e\u6211\u7684\u96c6\u7fa4\u663e\u793a\u5982\u4e0b\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d\u6211\u9047\u5230\u4e2a\u95ee\u9898\uff0c\u5c31\u662fkibana3\u9700\u8981\u8bbf\u95eeelasticsearch\uff0c\u8fd9\u4e2a\u6211\u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\u4e5f\u8bf4\u8fc7\uff0c\u4f46\u662f\u5f53\u65f6\u662f\u628apublish_address\u6362\u6210\u5916\u7f51ip,\u73b0\u5728\u67092\u53f0\u96c6\u7fa4\u9700\u8981\u4ea4\u4e92\uff0c\u914d\u7f6e\u6210\u5916\u7f51\uff0c\u4f1a\u5f71\u54cd\u5916\u7f51\u5e26\u5bbd\uff0c\u540c\u65f6\u6548\u7387\u4e5f\u4e0d\u9ad8\uff0c\u540e\u6765\u901a\u8fc7\u770b\u6587\u6863\u53d1\u73b0\uff1a<\/p>\n<p><font color=\"#ff0000\">transport.tcp.port: 9300<br \/>\u8bbe\u7f6e\u8282\u70b9\u4e4b\u95f4\u4ea4\u4e92\u7684tcp\u7aef\u53e3\uff0c\u9ed8\u8ba4\u662f9300\u3002<\/font> <\/p>\n<p><font color=\"#ff0000\">http.port: 9200<br \/>\u8bbe\u7f6e\u5bf9\u5916\u670d\u52a1\u7684http\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a9200\u3002<\/font> <\/p>\n<p>\u8fd9\u4e2a\u5927\u81f4\u8ddf\u6211\u6240\u4e86\u89e3\u7684\u5bf9\u4e0a\u4e86\uff0c\u90a3\u4e48\u6211\u53ef\u4e0d\u53ef\u4ee5\u628a9200\u7684\u8bbf\u95eeip\u8bbe\u7f6e\u6210\u5916\u7f51\u65b9\u4fbf\u5916\u9762\u8bbf\u95ee\uff0c9300\u7684\u8bbf\u95ee\u8bbe\u7f6e\u5185\u7f51\u65b9\u4fbf\u8282\u70b9\u4ea4\u4e92\uff1f <\/p>\n<p>\u53bb\u5b98\u7f51\u53d1\u73b0\u771f\u7684\u6709\u8fd9\u7c7b\u7684\u914d\u7f6e\uff1a <\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image_thumb1.png\" width=\"244\" height=\"94\"><\/a> <\/p>\n<p>\u90a3\u4e48\u6211\u5c31\u8fd9\u6837\u8bbe\u7f6e\u5373\u53ef\uff1a <\/p>\n<p>network.publish_host: 121.40.143.26&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \uff08\u9ed8\u8ba4\u7684\u5916\u7f51\uff0c\u7531\u4e8etransport\u6307\u5b9a\u4e86\uff0c\u6240\u4ee5\u5176\u5b9e\u8bbe\u7f6e\u7684\u5c31\u662fhttp\u76849200\u7684\u8bbf\u95ee\u5730\u5740\uff09<br \/>transport.publish_host : 10.168.25.125&nbsp;&nbsp; \uff08\u5185\u7f51\u5730\u5740\uff0ctransport\u7684\u4ea4\u4e92ip\uff09 <\/p>\n<p>\u542f\u52a8\u53d1\u73b0\u679c\u7136\u662f\u8fd9\u6837\u7684\u3002<\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image_thumb2.png\" width=\"244\" height=\"29\"><\/a> <\/p>\n<p>\u8fd9\u6837http\u7684\u8bbf\u95ee\u5c31\u662f\u5916\u7f51\uff08\u56e0\u4e3a\u5927\u591a\u6570\u673a\u623f\u8ddf\u516c\u53f8\u4e0d\u4f1a\u5728\u4e00\u4e2a\u5185\u7f51\uff09\uff0c\u8282\u70b9\u7684\u4ea4\u4e92\u8d70\u5185\u7f51\u3002\u7686\u5927\u6b22\u559c\u3002<\/p>\n<p>\u4e0d\u8fc7http\u7684\u5916\u7f51\u4f20\u8f93 \u8fd8\u662f\u5f88\u8017\u5e26\u5bbd\u7684\u3002\u901a\u8fc7kibana3\u8bbf\u95ee\u8fd8\u662f\u6162\u3002\u540e\u671f\u7ee7\u7eed\u7814\u7a76\u3002<\/p>\n<p>\u5df2\u7ecf\u4fdd\u5b58\u7684\u9762\u677f\u7684\u8fc1\u79fb\uff0c\u5982\u679c\u4e4b\u524d\u7684\u9762\u677f\u8981\u79fb\u690d\u5230\u65b0\u7684\u96c6\u7fa4\u7684\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>\u53c2\u8003url\uff1a<a title=\"http:\/\/stackoverflow.com\/questions\/22048179\/location-of-custom-kibana-dashboards-in-elasticsearch\" href=\"http:\/\/stackoverflow.com\/questions\/22048179\/location-of-custom-kibana-dashboards-in-elasticsearch\">http:\/\/stackoverflow.com\/questions\/22048179\/location-of-custom-kibana-dashboards-in-elasticsearch<\/a><\/p>\n<p>\u6700\u597d\u7684\u529e\u6cd5\u5c31\u662f\u901a\u8fc7\u63d2\u4ef6\u628adashboard\u5bfc\u5165\u3002\u6b63\u5982\u8fd9\u4e2aurl\u6240\u8bf4\uff1a<\/p>\n<p>Yes, the Kibana dashboards are being saved in Elasticsearch under <code>kibana-int<\/code> index (by default, you can override that in the <code>config.js<\/code> file). If you want to move your Kibana dashboards to another ES cluster you have two options:<\/p>\n<ol>\n<li>Export manually the dashboards. Click on Save -&gt; Advanced -&gt; Export Schema. You have to save the file and then in the new Kibana you have to import click over Load -&gt; Advanced -&gt; Choose File and choosing the file that have selected. This is a pain, because you have to do this operation per dashboard that you want to migrate.\n<li>You can use an utility to migrate an ES index from one ES cluster to another. There are some utilities already that can perform this operation. Searching in SO, I found <a href=\"http:\/\/stackoverflow.com\/a\/18320466\/1004046\">this answer<\/a> that suggest you to use the <a href=\"https:\/\/github.com\/clintongormley\/ElasticSearch.pm#reindex\">Elasticsearch.pm library<\/a> (Perl :S) to do this. Probably there are more utilities like this but I do not think that doing a script that migrate an index to another cluster is such a difficult task.<\/li>\n<\/ol>\n<p><strong>EDIT:<\/strong> For the second option, you can use the python elasticsearch library and its helper <code>reindex<\/code>, if you feel more confortable with Python: <a href=\"https:\/\/elasticsearch-py.readthedocs.org\/en\/latest\/helpers.html#elasticsearch.helpers.reindex\">https:\/\/elasticsearch-py.readthedocs.org\/en\/latest\/helpers.html#elasticsearch.helpers.reindex<\/a><\/p>\n<p>\u4f46\u662f\u6211\u627e\u6587\u4ef6\u627e\u4e86\u534a\u5929\uff0c\u6ca1\u627e\u5230\u5408\u9002\u7684\u5de5\u5177\uff0c\u7b2c\u4e00\u6b65\u53c8\u592a\u6162\uff0c\u6240\u4ee5\u6211\u76f4\u63a5\u628a<code>kibana-int<\/code> \u90fdcopy\u8fc7\u53bb\u4e86\u3002\u76ee\u524d\u6765\u770bdashboard\u662f\u5bfc\u5165\u4e86\uff0c\u4f46\u662f\u8fd9\u4e2a\u8c8c\u4f3c\u4f1a\u6709\u5f88\u591a\u62a5\u9519\uff0c\u8fd8\u6709\u5f85\u89c2\u5bdf\u3002<\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image_thumb3.png\" width=\"244\" height=\"11\"><\/a> <\/p>\n<p>scp kibana-int.tar.gz root@10.168.248.3:\/usr\/local\/elasticsearch\/data\/elasticsearch_rizhi\/nodes\/0\/indices<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u4f7f\u7528\u4e862\u4e2a\u6708\u7684elasticsearch\u540e\uff0c\u53d1\u73b0\u5355\u53f0\u7684elasticsearch\u7684\u6027\u80fd\u5b9e\u5728\u662f\u65e0\u6cd5\u6ee1\u8db3\u6211\u4eec\u7684\u9700\u6c42\uff0c\u5c31\u60f3\u5230elasticsearch\u96c6\u7fa4\uff0c\u5176\u5b9eelasticsearch\u7684\u914d\u7f6e\u8fd8\u662f\u5f88\u7b80\u5355\u7684\u3002\u6211\u5927\u81f4\u8bf4\u8bf4\u3002<\/p>\n<p>\u53c2\u8003url\uff1a<a title=\"http:\/\/stackoverflow.com\/questions\/28473687\/elasticsearch-cluster-no-known-master-node-scheduling-a-retry\" href=\"http:\/\/stackoverflow.com\/questions\/28473687\/elasticsearch-cluster-no-known-master-node-scheduling-a-retry\">http:\/\/stackoverflow.com\/questions\/28473687\/elasticsearch-cluster-no-known-master-node-scheduling-a-retry<\/a><\/p>\n<p>\u914d\u7f6e\u5f88\u597d\u7684\u6f14\u793a<\/p>\n<p><a title=\"http:\/\/www.learnes.net\/getting_started\/installing_es.html\" href=\"http:\/\/www.learnes.net\/getting_started\/installing_es.html\">http:\/\/www.learnes.net\/getting_started\/installing_es.html<\/a><\/p>\n<p>Marvel \u63d2\u4ef6 \u5176\u5b9e\u6211\u6ca1\u7528\uff0c\u4e0d\u8fc7\u89c9\u5f97\u633a\u597d\u7684\u4e5f\u63a8\u8350\u770b\u4e0b<\/p>\n<p><a title=\"http:\/\/my.oschina.net\/xiaohui249\/blog\/228748\" href=\"http:\/\/my.oschina.net\/xiaohui249\/blog\/228748\">http:\/\/my.oschina.net\/xiaohui249\/blog\/228748<\/a><\/p>\n<p>head\u63d2\u4ef6 \u548c bigdesk\u63d2\u4ef6 \u633a\u597d\u7528\u7684\u3002<\/p>\n<p><a title=\"http:\/\/www.cnblogs.com\/hdflzh\/p\/4103226.html\" href=\"http:\/\/www.cnblogs.com\/hdflzh\/p\/4103226.html\">http:\/\/www.cnblogs.com\/hdflzh\/p\/4103226.html<\/a><\/p>\n<p>\u6bd4\u8f83\u8be6\u7ec6\u8bf4\u660eelasticsearch\u914d\u7f6e\u6587\u4ef6\u7684\u53c2\u6570\u7684\u6587\u7ae0<\/p>\n<p><a title=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/modules-transport.html\" href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/modules-transport.html\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/modules-transport.html<\/a><\/p>\n<p>transport \u7684IP\u95ee\u9898\uff0c\u8fd9\u662f\u6211\u9047\u5230\u7684\u7279\u6b8a\u7684\u4e00\u4e2a\u60c5\u51b5\uff0c\u53ef\u4ee5\u89e3\u51b3\u6211\u9047\u5230\u7684\u95ee\u9898\u3002<\/p>\n<h1>\u5b89\u88c5\uff1a<\/h1>\n<p>\u6ca1\u5565\u8bf4\u7684\u3002\u7b49\u4e8e\u5b89\u88c52\u4e2aelasticsearch\uff0c\u7136\u540e\u6309\u7167\u4e0a\u9762\u63d0\u793a\u53bb\u5b89\u88c5\u63d2\u4ef6\u3002<\/p>\n<p>\u4e3e\u4f8b\uff1a<\/p>\n<p>&nbsp; \uff081\uff09head  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u548c\u63d2\u4ef6\u540d\u5b57\u4e00\u6837\uff0c\u9996\u63a8\u8fd9\u4e2a\u63d2\u4ef6\u3002\u901a\u8fc7head\uff0c\u53ef\u4ee5\u67e5\u770b\u96c6\u7fa4\u51e0\u4e4e\u6240\u6709\u4fe1\u606f\uff0c\u8fd8\u80fd\u8fdb\u884c\u7b80\u5355\u7684\u641c\u7d22\u67e5\u8be2\uff0c\u89c2\u5bdf\u81ea\u52a8\u6062\u590d\u7684\u60c5\u51b5\u7b49\u7b49\u3002  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u5f00\u59cb\u5b89\u88c5\uff1asudo elasticsearch\/bin\/plugin -install mobz\/elasticsearch-head  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u8bb0\u5f97\u4e24\u53f0\u673a\u5668\u90fd\u5b89\u88c5\u4e00\u4e0b\u54e6\u3002\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u5728\u6d4f\u89c8\u5668\u8f93\u5165\uff1ahttp:\/\/ip:9200\/_plugin\/head\/ \uff0c\u53ef\u4ee5\u67e5\u770b\u663e\u793a\u6548\u679c\u3002\u5982\u4e0b\u56fe\uff1a  <\/p>\n<p><a href=\"http:\/\/static.oschina.net\/uploads\/space\/2014\/0430\/104917_6Srk_1010775.png\"><img decoding=\"async\" src=\"http:\/\/static.oschina.net\/uploads\/space\/2014\/0430\/104917_6Srk_1010775.png\"><\/a>  <\/p>\n<p>cluster health:green (2, 20) : \u8868\u793a\u8be5\u96c6\u7fa4\u76ee\u524d\u5904\u4e8e\u5065\u5eb7\u72b6\u6001\uff0c\u96c6\u7fa4\u5305\u542b2\u53f0\u673a\u5668\uff0c\u7d22\u5f15\u603b\u517120\u4e2a\u5206\u7247\u3002\u7c97\u7ebf\u7eff\u6846\u8868\u793a\u4e3b\u5206\u7247\uff0c\u7ec6\u7ebf\u7eff\u6846\u4e3a\u5907\u4efd\u5206\u7247\u3002  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u8fd8\u6709\u5f88\u591a\u529f\u80fd\uff0c\u8bf7\u8bfb\u8005\u81ea\u5df1\u53bb\u4f53\u9a8c\u3002  <\/p>\n<h1>\u914d\u7f6e\uff1a<\/h1>\n<p>Node 1:<\/p>\n<pre><code>cluster.name: mycluster\nnode.name: \"node1\"\nnode.master: true\nnode.data: true\ndiscovery.zen.ping.multicast.enabled: false\ndiscovery.zen.ping.unicast.hosts: [\"node1.example.com\"]\n<\/code><\/pre>\n<p>Node 2:<\/p>\n<pre><code>cluster.name: mycluster\nnode.name: \"node2\"\nnode.master: false\nnode.data: true\ndiscovery.zen.ping.multicast.enabled: false\ndiscovery.zen.ping.unicast.hosts: [\"node1.example.com\"]<\/code><\/pre>\n<p>\u8fd9\u4e2a\u5c31\u662f\u5173\u4e8e\u96c6\u7fa4\u7684\u914d\u7f6e\uff0c\u552f\u4e00\u6ce8\u610f\u7684\u5c31\u662fhosts\u9700\u8981\u5b9a\u5411\uff0c\u6216\u8005\u914d\u7f6e\u5bf9\u5e94\u7684IP\u3002\u7136\u540e\u542f\u52a82\u4e2a\u5c31\u597d\u4e86\u3002<\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image_thumb.png\" width=\"244\" height=\"76\"><\/a> <\/p>\n<p>\u914d\u7f6e\u597d\u540e\u6211\u7684\u96c6\u7fa4\u663e\u793a\u5982\u4e0b\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d\u6211\u9047\u5230\u4e2a\u95ee\u9898\uff0c\u5c31\u662fkibana3\u9700\u8981\u8bbf\u95eeelasticsearch\uff0c\u8fd9\u4e2a\u6211\u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\u4e5f\u8bf4\u8fc7\uff0c\u4f46\u662f\u5f53\u65f6\u662f\u628apublish_address\u6362\u6210\u5916\u7f51ip,\u73b0\u5728\u67092\u53f0\u96c6\u7fa4\u9700\u8981\u4ea4\u4e92\uff0c\u914d\u7f6e\u6210\u5916\u7f51\uff0c\u4f1a\u5f71\u54cd\u5916\u7f51\u5e26\u5bbd\uff0c\u540c\u65f6\u6548\u7387\u4e5f\u4e0d\u9ad8\uff0c\u540e\u6765\u901a\u8fc7\u770b\u6587\u6863\u53d1\u73b0\uff1a<\/p>\n<p><font color=\"#ff0000\">transport.tcp.port: 9300<br \/>\u8bbe\u7f6e\u8282\u70b9\u4e4b\u95f4\u4ea4\u4e92\u7684tcp\u7aef\u53e3\uff0c\u9ed8\u8ba4\u662f9300\u3002<\/font> <\/p>\n<p><font color=\"#ff0000\">http.port: 9200<br \/>\u8bbe\u7f6e\u5bf9\u5916\u670d\u52a1\u7684http\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a9200\u3002<\/font> <\/p>\n<p>\u8fd9\u4e2a\u5927\u81f4\u8ddf\u6211\u6240\u4e86\u89e3\u7684\u5bf9\u4e0a\u4e86\uff0c\u90a3\u4e48\u6211\u53ef\u4e0d\u53ef\u4ee5\u628a9200\u7684\u8bbf\u95eeip\u8bbe\u7f6e\u6210\u5916\u7f51\u65b9\u4fbf\u5916\u9762\u8bbf\u95ee\uff0c9300\u7684\u8bbf\u95ee\u8bbe\u7f6e\u5185\u7f51\u65b9\u4fbf\u8282\u70b9\u4ea4\u4e92\uff1f <\/p>\n<p>\u53bb\u5b98\u7f51\u53d1\u73b0\u771f\u7684\u6709\u8fd9\u7c7b\u7684\u914d\u7f6e\uff1a <\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image_thumb1.png\" width=\"244\" height=\"94\"><\/a> <\/p>\n<p>\u90a3\u4e48\u6211\u5c31\u8fd9\u6837\u8bbe\u7f6e\u5373\u53ef\uff1a <\/p>\n<p>network.publish_host: 121.40.143.26&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \uff08\u9ed8\u8ba4\u7684\u5916\u7f51\uff0c\u7531\u4e8etransport\u6307\u5b9a\u4e86\uff0c\u6240\u4ee5\u5176\u5b9e\u8bbe\u7f6e\u7684\u5c31\u662fhttp\u76849200\u7684\u8bbf\u95ee\u5730\u5740\uff09<br \/>transport.publish_host : 10.168.25.125&nbsp;&nbsp; \uff08\u5185\u7f51\u5730\u5740\uff0ctransport\u7684\u4ea4\u4e92ip\uff09 <\/p>\n<p>\u542f\u52a8\u53d1\u73b0\u679c\u7136\u662f\u8fd9\u6837\u7684\u3002<\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image_thumb2.png\" width=\"244\" height=\"29\"><\/a> <\/p>\n<p>\u8fd9\u6837http\u7684\u8bbf\u95ee\u5c31\u662f\u5916\u7f51\uff08\u56e0\u4e3a\u5927\u591a\u6570\u673a\u623f\u8ddf\u516c\u53f8\u4e0d\u4f1a\u5728\u4e00\u4e2a\u5185\u7f51\uff09\uff0c\u8282\u70b9\u7684\u4ea4\u4e92\u8d70\u5185\u7f51\u3002\u7686\u5927\u6b22\u559c\u3002<\/p>\n<p>\u4e0d\u8fc7http\u7684\u5916\u7f51\u4f20\u8f93 \u8fd8\u662f\u5f88\u8017\u5e26\u5bbd\u7684\u3002\u901a\u8fc7kibana3\u8bbf\u95ee\u8fd8\u662f\u6162\u3002\u540e\u671f\u7ee7\u7eed\u7814\u7a76\u3002<\/p>\n<p>\u5df2\u7ecf\u4fdd\u5b58\u7684\u9762\u677f\u7684\u8fc1\u79fb\uff0c\u5982\u679c\u4e4b\u524d\u7684\u9762\u677f\u8981\u79fb\u690d\u5230\u65b0\u7684\u96c6\u7fa4\u7684\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>\u53c2\u8003url\uff1a<a title=\"http:\/\/stackoverflow.com\/questions\/22048179\/location-of-custom-kibana-dashboards-in-elasticsearch\" href=\"http:\/\/stackoverflow.com\/questions\/22048179\/location-of-custom-kibana-dashboards-in-elasticsearch\">http:\/\/stackoverflow.com\/questions\/22048179\/location-of-custom-kibana-dashboards-in-elasticsearch<\/a><\/p>\n<p>\u6700\u597d\u7684\u529e\u6cd5\u5c31\u662f\u901a\u8fc7\u63d2\u4ef6\u628adashboard\u5bfc\u5165\u3002\u6b63\u5982\u8fd9\u4e2aurl\u6240\u8bf4\uff1a<\/p>\n<p>Yes, the Kibana dashboards are being saved in Elasticsearch under <code>kibana-int<\/code> index (by default, you can override that in the <code>config.js<\/code> file). If you want to move your Kibana dashboards to another ES cluster you have two options:<\/p>\n<ol>\n<li>Export manually the dashboards. Click on Save -&gt; Advanced -&gt; Export Schema. You have to save the file and then in the new Kibana you have to import click over Load -&gt; Advanced -&gt; Choose File and choosing the file that have selected. This is a pain, because you have to do this operation per dashboard that you want to migrate.\n<li>You can use an utility to migrate an ES index from one ES cluster to another. There are some utilities already that can perform this operation. Searching in SO, I found <a href=\"http:\/\/stackoverflow.com\/a\/18320466\/1004046\">this answer<\/a> that suggest you to use the <a href=\"https:\/\/github.com\/clintongormley\/ElasticSearch.pm#reindex\">Elasticsearch.pm library<\/a> (Perl :S) to do this. Probably there are more utilities like this but I do not think that doing a script that migrate an index to another cluster is such a difficult task.<\/li>\n<\/ol>\n<p><strong>EDIT:<\/strong> For the second option, you can use the python elasticsearch library and its helper <code>reindex<\/code>, if you feel more confortable with Python: <a href=\"https:\/\/elasticsearch-py.readthedocs.org\/en\/latest\/helpers.html#elasticsearch.helpers.reindex\">https:\/\/elasticsearch-py.readthedocs.org\/en\/latest\/helpers.html#elasticsearch.helpers.reindex<\/a><\/p>\n<p>\u4f46\u662f\u6211\u627e\u6587\u4ef6\u627e\u4e86\u534a\u5929\uff0c\u6ca1\u627e\u5230\u5408\u9002\u7684\u5de5\u5177\uff0c\u7b2c\u4e00\u6b65\u53c8\u592a\u6162\uff0c\u6240\u4ee5\u6211\u76f4\u63a5\u628a<code>kibana-int<\/code> \u90fdcopy\u8fc7\u53bb\u4e86\u3002\u76ee\u524d\u6765\u770bdashboard\u662f\u5bfc\u5165\u4e86\uff0c\u4f46\u662f\u8fd9\u4e2a\u8c8c\u4f3c\u4f1a\u6709\u5f88\u591a\u62a5\u9519\uff0c\u8fd8\u6709\u5f85\u89c2\u5bdf\u3002<\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2015\/10\/image_thumb3.png\" width=\"244\" height=\"11\"><\/a> <\/p>\n<p>scp kibana-int.tar.gz root@10.168.248.3:\/usr\/local\/elasticsearch\/data\/elasticsearch_rizhi\/nodes\/0\/indices<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[182,186,187],"class_list":["post-4716","post","type-post","status-publish","format-standard","hentry","category-5","tag-elasticsearch","tag-transport","tag-187","category-5-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/4716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4716"}],"version-history":[{"count":2,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/4716\/revisions"}],"predecessor-version":[{"id":4720,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/4716\/revisions\/4720"}],"wp:attachment":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}