{"id":47,"date":"2023-07-20T10:29:29","date_gmt":"2023-07-20T02:29:29","guid":{"rendered":"https:\/\/guoyingxu.cn\/?p=47"},"modified":"2023-07-20T10:29:29","modified_gmt":"2023-07-20T02:29:29","slug":"install_kibana","status":"publish","type":"post","link":"https:\/\/guoyingxu.cn\/?p=47","title":{"rendered":"install_kibana"},"content":{"rendered":"\n<!doctype html>\n<html>\n<head>\n<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>\n<title><\/title>\n<\/head>\n<body><h2 id='installkibana'>install_kibana<\/h2>\n<pre><code class='language-shell' lang='shell'>#!\/usr\/bin\/bash\npackage_name=&quot;kibana-7.14.0-linux-x86_64.tar.gz&quot;\nelastic_path=&quot;http:\/\/192.168.98.173:9200\\&quot;,\\&quot;http:\/\/192.168.98.174:9200\\&quot;,\\&quot;http:\/\/192.168.98.175:9200&quot;\nip_addr=`ip addr |grep inet |grep brd |awk &#39;{print $2}&#39; |awk -F &#39;\/&#39; &#39;{print $1}&#39;`\nif [ -e $package_name ];then\n\ttar -zxvf $package_name\n\tmv ${package_name:0:26} \/usr\/local\/kibana\ncat &lt;&lt;EOF &gt;&gt;\/usr\/local\/kibana\/config\/kibana.yml\nserver.port: 5601\nserver.host: &quot;0.0.0.0&quot;\nserver.name: &quot;kibana-elastic&quot;\nelasticsearch.hosts:\n    [&quot;$elastic_path&quot;]\nelasticsearch.requestTimeout: 30000\nEOF\n\ncat &lt;&lt;EOF &gt;&gt;\/usr\/lib\/systemd\/system\/kibana.service\n[Unit]\nDescription=kibana\nAfter=network.target\n\n[Service]\nType=simple\nUser=root\nExecStart=\/usr\/local\/kibana\/bin\/kibana --allow-root\nPrivateTmp=true\n\n[Install]\nWantedBy=multi-user.target\nEOF\nsystemctl daemon-reload\nsystemctl enable kibana.service\nsystemctl restart kibana.service\n\n\n\necho &quot;\u8bbf\u95ee\u5730\u5740http\/\/$ip_addr:5601&quot;\necho &quot;\u8bf7\u901a\u8fc7\u9875\u9762\u4e2d\u7684Stack Monitoring\u67e5\u770b\u96c6\u7fa4\u72b6\u6001&quot;\nelse\n\techo &quot;file is not existence&quot;\nfi\n\n\n\n\n\n\n<\/code><\/pre>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47"}],"version-history":[{"count":0,"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions"}],"wp:attachment":[{"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guoyingxu.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}