{"id":41591,"date":"2025-06-03T23:27:29","date_gmt":"2025-06-03T15:27:29","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/41591.html"},"modified":"2025-06-03T23:27:29","modified_gmt":"2025-06-03T15:27:29","slug":"%e5%9f%ba%e4%ba%8eelk%e7%9a%84%e5%88%86%e5%b8%83%e5%bc%8f%e6%97%a5%e5%bf%97%e5%ae%9e%e6%97%b6%e5%88%86%e6%9e%90%e4%b8%8e%e5%8f%af%e8%a7%86%e5%8c%96%e7%b3%bb%e7%bb%9f%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/41591.html","title":{"rendered":"\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"-toc\" style=\"margin-left:40px\">\n<p id=\"%E4%B8%80%E3%80%81ELK%E5%B9%B3%E5%8F%B0%E4%BB%8B%E7%BB%8D-toc\" style=\"margin-left:40px\">\u4e00\u3001ELK\u5e73\u53f0\u4ecb\u7ecd<\/p>\n<p id=\"1.ELK%E6%A6%82%E8%BF%B0-toc\" style=\"margin-left:80px\">1.ELK\u6982\u8ff0<\/p>\n<p id=\"2.Elasticsearch-toc\" style=\"margin-left:80px\">2.Elasticsearch<\/p>\n<p id=\"3.Logstash-toc\" style=\"margin-left:80px\">3.Logstash<\/p>\n<p id=\"4.Kibana-toc\" style=\"margin-left:80px\">4.Kibana<\/p>\n<p id=\"%E4%BA%8C%E3%80%81%E9%83%A8%E7%BD%B2ES%E7%BE%A4%E9%9B%86-toc\" style=\"margin-left:40px\">\u4e8c\u3001\u90e8\u7f72ES\u7fa4\u96c6<\/p>\n<p id=\"1.%E8%B5%84%E6%BA%90%E6%B8%85%E5%8D%95-toc\" style=\"margin-left:80px\">1.\u8d44\u6e90\u6e05\u5355<\/p>\n<p id=\"2.%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE-toc\" style=\"margin-left:80px\">2.\u57fa\u672c\u914d\u7f6e<\/p>\n<p id=\"3.%E5%AE%89%E8%A3%85Elasticsearch%EF%BC%88elk1%E4%B8%8A%E3%80%81elk2%E4%B8%8A%E3%80%81elk3%E4%B8%8A%EF%BC%89-toc\" style=\"margin-left:80px\">3.\u5b89\u88c5Elasticsearch&#xff08;elk1\u4e0a\u3001elk2\u4e0a\u3001elk3\u4e0a&#xff09;<\/p>\n<p id=\"4.%E5%AE%89%E8%A3%85logstash%EF%BC%88elk1%E4%B8%8A%EF%BC%89-toc\" style=\"margin-left:80px\">4.\u5b89\u88c5logstash&#xff08;elk1\u4e0a&#xff09;<\/p>\n<p id=\"5.Filebeat-toc\" style=\"margin-left:80px\">5.Filebeat<\/p>\n<p id=\"6.%E5%AE%89%E8%A3%85Kibana%EF%BC%88elk1%E4%B8%8A%EF%BC%89-toc\" style=\"margin-left:80px\">6.\u5b89\u88c5Kibana&#xff08;elk1\u4e0a&#xff09;<\/p>\n<hr id=\"hr-toc\" \/>\n<h3 id=\"%E4%B8%80%E3%80%81ELK%E5%B9%B3%E5%8F%B0%E4%BB%8B%E7%BB%8D\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">\u4e00\u3001ELK\u5e73\u53f0\u4ecb\u7ecd<\/h3>\n<h4 id=\"1.ELK%E6%A6%82%E8%BF%B0\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">1.ELK\u6982\u8ff0<\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u65e5\u5fd7\u4e3b\u8981\u5305\u62ec\u7cfb\u7edf\u65e5\u5fd7\u3001\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u548c\u5b89\u5168\u65e5\u5fd7<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u65e5\u5fd7\u88ab\u5206\u6563\u7684\u5b58\u50a8\u5728\u4e0d\u540c\u7684\u8bbe\u5907\u4e0a<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">c.\u96c6\u4e2d\u7ba1\u7406\u65e5\u5fd7\u540e&#xff0c;\u65e5\u5fd7\u7684\u7edf\u8ba1\u548c\u68c0\u7d22\u5229\u7528grep\u3001awk\u3001wc\u5b9e\u73b0<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">d.ELK\u7684\u7ec4\u6210<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">Elasticsearch<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">Logstash<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">Kibana<\/p>\n<h4 id=\"2.Elasticsearch\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">2.Elasticsearch<\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u6982\u8ff0<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u662f\u4e00\u4e2a\u57fa\u4e8eLucene\u7684\u641c\u7d22\u670d\u52a1\u5668<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5206\u5206\u5e03\u5f0f\u591a\u7528\u6237\u80fd\u529b\u7684\u5168\u6587\u641c\u7d22\u5f15\u64ce&#xff0c;\u57fa\u4e8eRESTful web\u63a5\u53e3<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">&#8211; \u80fd\u591f\u8fbe\u5230\u5b9e\u65f6\u641c\u7d22\u3001\u7a33\u5b9a\u3001\u53ef\u9760\u3001\u5feb\u901f\u3001\u5b89\u88c5\u4f7f\u7528\u65b9\u4fbf<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u6838\u5fc3\u6982\u5ff5<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u63a5\u8fd1\u5b9e\u65f6&#xff08;NRT&#xff09;&#xff1a;\u610f\u5473\u7740\u6570\u636e\u4ece\u88ab\u7d22\u5f15\u5230\u53ef\u88ab\u641c\u7d22\u4e4b\u95f4\u5b58\u5728\u6781\u77ed\u7684\u5ef6\u8fdf&#xff08;\u901a\u5e381\u79d2\u5185&#xff09;\u3002\u8fd9\u662f\u7531\u4e8e Lucene \u7684\u5012\u6392\u7d22\u5f15\u673a\u5236\u548c Elasticsearch \u7684\u5237\u65b0&#xff08;refresh&#xff09;\u673a\u5236\u51b3\u5b9a\u7684&#xff0c;\u9ed8\u8ba4\u6bcf1\u79d2\u5237\u65b0\u4e00\u6b21&#xff0c;\u4f7f\u65b0\u6570\u636e\u53ef\u89c1<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u96c6\u7fa4&#xff08;Cluster&#xff09;&#xff1a;\u662f\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u8282\u70b9&#xff08;Node&#xff09;\u7ec4\u6210\u7684\u96c6\u5408&#xff0c;\u5171\u540c\u5b58\u50a8\u6570\u636e\u5e76\u63d0\u4f9b\u8054\u5408\u7d22\u5f15\u548c\u641c\u7d22\u80fd\u529b\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u8282\u70b9&#xff08;node&#xff09;&#xff1a;\u662f\u96c6\u7fa4\u4e2d\u7684\u4e00\u4e2a\u72ec\u7acb\u670d\u52a1\u5668&#xff0c;\u5b58\u50a8\u6570\u636e\u5e76\u53c2\u4e0e\u7d22\u5f15\u548c\u641c\u7d22<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u7d22\u5f15&#xff08;index&#xff09;&#xff1a;\u662f\u7c7b\u4f3c\u6570\u636e\u5e93\u4e2d\u7684\u201c\u8868\u201d&#xff0c;\u7528\u4e8e\u5b58\u50a8\u5177\u6709\u76f8\u4f3c\u7ed3\u6784\u7684\u6587\u6863&#xff08;Documents&#xff09;<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u7c7b\u578b&#xff08;type&#xff09;&#xff1a;\u7528\u4e8e\u903b\u8f91\u5212\u5206\u7d22\u5f15\u4e2d\u7684\u4e0d\u540c\u6570\u636e\u7ed3\u6784&#xff08;\u7c7b\u4f3c\u6570\u636e\u5e93\u7684\u201c\u8868\u201d&#xff09;\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u6587\u6863&#xff08;document&#xff09;&#xff1a;\u662f Elasticsearch \u4e2d\u7684\u57fa\u672c\u6570\u636e\u5355\u5143&#xff0c;\u4ee5 JSON \u683c\u5f0f\u5b58\u50a8\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u5206\u7247\u548c\u590d\u5236&#xff08;shards &amp; replicas&#xff09;&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u5206\u7247&#xff08;Shards&#xff09;&#xff1a;\u7d22\u5f15\u53ef\u4ee5\u88ab\u62c6\u5206\u4e3a\u591a\u4e2a\u5206\u7247&#xff0c;\u63d0\u9ad8\u5e76\u884c\u5904\u7406\u80fd\u529b\u3002\u5206\u7247\u662f\u72ec\u7acb\u7d22\u5f15\u5355\u5143&#xff0c;\u53ef\u5206\u5e03\u5728\u4e0d\u540c\u8282\u70b9\u4e0a\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u526f\u672c&#xff08;Replicas&#xff09;&#xff1a;<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u6bcf\u4e2a\u5206\u7247\u53ef\u4ee5\u6709\u591a\u4e2a\u526f\u672c&#xff0c;\u63d0\u4f9b\u9ad8\u53ef\u7528\u6027&#xff08;\u8282\u70b9\u6545\u969c\u65f6\u6570\u636e\u4e0d\u4e22\u5931&#xff09;\u548c\u8d1f\u8f7d\u5747\u8861&#xff08;\u67e5\u8be2\u53ef\u5e76\u884c\u6267\u884c&#xff09;\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;ES \u4e3a\u6bcf\u4e2a\u7d22\u5f15\u521b\u5efa1\u4e2a\u4e3b\u5206\u7247 &#043; 1\u4e2a\u526f\u672c&#xff08;\u53ef\u5728\u7d22\u5f15\u6a21\u677f\u4e2d\u8c03\u6574&#xff09;<\/p>\n<h4 id=\"3.Logstash\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">3.Logstash<\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u4ecb\u7ecd<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u7531JRsuby\u8bed\u8a00\u7f16\u5199&#xff0c;\u8fd0\u884c\u5728Java\u865a\u62df\u673a\u4e0a&#xff0c;\u662f\u4e00\u6b3e\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u5de5\u5177<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u53ef\u4ee5\u5b9e\u73b0\u6570\u636e\u4f20\u8f93\u3001\u683c\u5f0f\u5904\u7406\u3001\u683c\u5f0f\u5316\u8f93\u51fa<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u8bbe\u8ba1\u7406\u5ff5&#xff1a;\u6570\u636e\u8f93\u5165\u3001\u6570\u636e\u52a0\u5de5\u3001\u6570\u636e\u8f93\u51fa<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u5de5\u4f5c\u7684\u4e09\u4e2a\u9636\u6bb5<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">input\u6570\u636e\u8f93\u5165\u7aef&#xff0c;\u53ef\u4ee5\u63a5\u6536\u6765\u81ea\u4efb\u4f55\u5730\u65b9\u7684\u6e90\u6570\u636e<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">Filter\u6570\u636e\u4e2d\u8f6c\u5c42&#xff0c;\u4e3b\u8981\u8fdb\u884c\u683c\u5f0f\u5904\u7406&#xff0c;\u6570\u636e\u7c7b\u578b\u8f6c\u6362&#xff0c;\u6570\u636e\u8fc7\u6ee4&#xff0c;\u5b57\u6bb5\u6dfb\u52a0\u3001\u4fee\u6539\u7b49<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">Output\u662flogstash\u5de5\u4f5c\u7684\u6700\u540e\u4e00\u4e2a\u9636\u6bb5&#xff0c;\u8d1f\u8d23\u5c06\u4e66\u7c4d\u8f93\u51fa\u5230\u6307\u5b9a\u4f4d\u7f6e&#xff0c;\u517c\u5bb9\u5927\u591a\u6570\u5e94\u7528<\/p>\n<h4 id=\"4.Kibana\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">4.Kibana<\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u4ecb\u7ecd<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u662f\u4e00\u4e2a\u8bbe\u8ba1\u4f7f\u7528\u548cElasticsearch\u914d\u7f6e\u5de5\u4f5c\u7684\u5f00\u6e90\u5206\u6790\u548c\u53ef\u89c6\u5316\u5e73\u53f0<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u53ef\u4ee5\u7528\u5b83\u8fdb\u884c\u641c\u7d22\u3001\u67e5\u770b\u3001\u96c6\u6210Elasticserach\u4e2d\u7684\u6570\u636e\u7d22\u5f15<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u53ef\u4ee5\u5229\u7528\u5404\u79cd\u56fe\u6807\u3001\u62a5\u8868\u3001\u5730\u56fe\u7ec4\u4ef6\u8f7b\u677e\u7684\u5bf9\u6570\u636e\u8fdb\u884c\u53ef\u89c6\u5316\u5206\u6790<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u4e3b\u8981\u529f\u80fd<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">Elasticsearch\u65e0\u7f1d\u96c6\u6210&#xff1a;\u652f\u6301\u76f4\u63a5\u67e5\u8be2\u3001\u8fc7\u6ee4\u548c\u805a\u5408 ES \u7d22\u5f15\u4e2d\u7684\u6570\u636e<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u6574\u5408\u6570\u636e&#xff1a;\u652f\u6301\u4ece\u591a\u4e2a Elasticsearch \u7d22\u5f15\u3001Logstash \u7ba1\u9053\u6216 Beats \u91c7\u96c6\u7684\u6570\u636e\u8fdb\u884c\u7edf\u4e00\u5206\u6790\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u590d\u6742\u6570\u636e\u5206\u6790&#xff1a;\u652f\u6301 \u805a\u5408&#xff08;Aggregations&#xff09; \u64cd\u4f5c&#xff0c;\u5982 terms&#xff08;\u5206\u7ec4\u7edf\u8ba1&#xff09;\u3001date_histogram&#xff08;\u65f6\u95f4\u5e8f\u5217\u5206\u6790&#xff09;\u3001avg&#xff08;\u5e73\u5747\u503c\u8ba1\u7b97&#xff09;\u7b49<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u8ba9\u66f4\u591a\u7684\u56e2\u961f\u6210\u5458\u6536\u76ca&#xff1a;\u63d0\u4f9b Dashboard&#xff08;\u4eea\u8868\u76d8&#xff09; \u529f\u80fd&#xff0c;\u53ef\u5c06\u591a\u4e2a\u53ef\u89c6\u5316\u56fe\u8868\u7ec4\u5408&#xff0c;\u5e76\u652f\u6301\u5171\u4eab\u94fe\u63a5\u6216\u5d4c\u5165\u5230\u5176\u4ed6\u7cfb\u7edf&#xff08;\u5982 Confluence\u3001Web \u5e94\u7528<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u63a5\u53e3\u7075\u6d3b&#xff1a;\u63d0\u4f9b REST API&#xff0c;\u5141\u8bb8\u5f00\u53d1\u8005\u4ee5\u7f16\u7a0b\u65b9\u5f0f\u7ba1\u7406 Kibana \u5bf9\u8c61<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u914d\u7f6e\u7b80\u5355&#xff1a;\u901a\u8fc7 Management \u6a21\u5757\u53ef\u8f7b\u677e\u7ba1\u7406\u7d22\u5f15\u6a21\u5f0f\u3001\u7528\u6237\u6743\u9650\u3001\u8b66\u62a5\u89c4\u5219\u7b49<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u53ef\u89c6\u5316\u591a\u6570\u636e\u6e90&#xff1a;\u652f\u6301\u591a\u79cd\u56fe\u8868\u7c7b\u578b&#xff08;\u67f1\u72b6\u56fe\u3001\u6298\u7ebf\u56fe\u3001\u997c\u56fe\u3001\u70ed\u529b\u56fe\u7b49&#xff09;&#xff0c;\u5e76\u53ef\u7ed3\u5408 Maps \u63d2\u4ef6\u5c55\u793a\u5730\u7406\u6570\u636e\u3002<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\u7b80\u5355\u6570\u636e\u5bfc\u51fa&#xff1a;\u652f\u6301\u5c06\u67e5\u8be2\u7ed3\u679c\u6216\u56fe\u8868\u5bfc\u51fa\u4e3a CSV\u3001PDF\u3001PNG \u683c\u5f0f&#xff0c;\u65b9\u4fbf\u5206\u4eab\u6216\u8fdb\u4e00\u6b65\u5206\u6790\u3002<\/p>\n<h3 id=\"%E4%BA%8C%E3%80%81%E9%83%A8%E7%BD%B2ES%E7%BE%A4%E9%9B%86\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">\u4e8c\u3001\u90e8\u7f72ES\u7fa4\u96c6<\/h3>\n<h4 id=\"1.%E8%B5%84%E6%BA%90%E6%B8%85%E5%8D%95\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">1.\u8d44\u6e90\u6e05\u5355<\/h4>\n<table>\n<tbody>\n<tr>\n<td>\n<p style=\"text-align:center\">\u64cd\u4f5c\u7cfb\u7edf<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">IP\u5730\u5740<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">\u4e3b\u673a\u540d<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">\u8f6f\u4ef6\u5305<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align:center\">OpenEuler 24.03<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">192.168.16.142<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">elk1<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">Elasticsearch\u3001logstash\u3001kibana<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align:center\">OpenEuler 24.03<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">192.168.16.143<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">elk2<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">Elasticsearch\u3001filebeat\u3001httpd<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p style=\"text-align:center\">OpenEuler 24.03<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">192.168.16.144<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">elk3<\/p>\n<\/td>\n<td>\n<p style=\"text-align:center\">Elasticsearch\u3001<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"2.%E5%9F%BA%E6%9C%AC%E9%85%8D%E7%BD%AE\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">2.\u57fa\u672c\u914d\u7f6e<\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u8bbe\u7f6e\u4e3b\u673a\u540d<\/p>\n<p>hostnamectl set-hostname elk1<br \/>\nhostnamectl set-hostname elk2<br \/>\nhostnamectl set-hostname elk3 <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u5728ES\u4e3b\u673a\u4e0a\u8bbe\u7f6eHost\u6587\u4ef6<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a\u3001elk2\u4e0a\u3001elk3\u4e0a&#xff09;<\/span><\/p>\n<p>vi \/etc\/hosts<br \/>\n192.168.16.142  elk1<br \/>\n192.168.16.143  elk2<br \/>\n192.168.16.144  elk3 <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">c.\u521b\u5efaes\u8fd0\u884c\u7528\u6237<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a\u3001elk2\u4e0a\u3001elk3\u4e0a&#xff09;<\/span><\/p>\n<p> useradd es <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">d.\u5b89\u88c5java\u73af\u5883<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a\u3001elk2\u4e0a\u3001elk3\u4e0a&#xff09;<\/span><\/p>\n<p>dnf -y install java-11 tar<br \/>\njava -version <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">e.\u8bbe\u7f6e\u8bbf\u95ee\u9650\u5236<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a\u3001elk2\u4e0a\u3001elk3\u4e0a&#xff09;<\/span><\/p>\n<p>vi \/etc\/security\/limits.conf<\/p>\n<p>es soft nofile 65535<br \/>\nes hard nofile 65535<br \/>\nes soft nproc 65535<br \/>\nes hard nproc 65535<br \/>\nes soft memlock unlimited<br \/>\nes hard memlock unlimited<\/p>\n<p>vi \/etc\/sysctl.conf<br \/>\nvm.max_map_count&#061;655360<\/p>\n<p>sysctl -p <\/p>\n<h4 id=\"3.%E5%AE%89%E8%A3%85Elasticsearch%EF%BC%88elk1%E4%B8%8A%E3%80%81elk2%E4%B8%8A%E3%80%81elk3%E4%B8%8A%EF%BC%89\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">3.\u5b89\u88c5Elasticsearch<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a\u3001elk2\u4e0a\u3001elk3\u4e0a&#xff09;<\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u5b89\u88c5Elasticsearch<\/p>\n<p>tar zxf elasticsearch-7.10.0-linux-x86_64.tar.gz<br \/>\nmv elasticsearch-7.10.0 \/usr\/local\/elasticsearch<br \/>\nvi \/usr\/local\/elasticsearch\/config\/jvm.options<\/p>\n<p>-Xmx2g        #22<br \/>\n-Xmx2g <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u66f4\u6539Elasticsearch\u4e3b\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>#\u7b2c\u4e00\u53f0\u66f4\u6539<br \/>\nvi \/usr\/local\/elasticsearch\/config\/elasticsearch.yml<\/p>\n<p>cluster.name: kgc-elk-cluster   #17\u884c&#xff0c;\u7fa4\u96c6\u540d\u79f0<br \/>\nnode.name: elk1    #23\u884c&#xff0c;\u672c\u8282\u70b9\u4e3b\u673a\u540d<br \/>\npath.data: \/elk\/data    #33\u884c&#xff0c;\u6570\u636e\u6587\u4ef6\u8def\u5f84<br \/>\npath.logs: \/elk\/logs    #37\u884c&#xff0c;\u65e5\u5fd7\u6587\u4ef6\u8def\u5f84<br \/>\nbootstrap.memory_lock: false    #43\u884c&#xff0c;\u9501\u5b9a\u7269\u7406\u5185\u5b58<br \/>\nnetwork.host: 0.0.0.0    #55\u884c&#xff0c;\u76d1\u542c\u5730\u5740<br \/>\nhttp.port: 9200    #59\u884c&#xff0c;\u76d1\u542c\u7aef\u53e3<br \/>\ndiscovery.seed_hosts: [&#034;elk1&#034;, &#034;elk2&#034;,&#034;elk3&#034;]    #68\u884c&#xff0c;\u7fa4\u96c6\u4e2d\u7684\u4e3b\u673a\u5217\u8868<br \/>\ncluster.initial_master_nodes: [&#034;elk1&#034;]    #72\u884c&#xff0c;master\u4e3b\u673a\u540d\u79f0<\/p>\n<p>#\u63a8\u9001\u914d\u7f6e\u6587\u4ef6\u5230\u7b2c\u4e8c\u53f0<br \/>\nscp \/usr\/local\/elasticsearch\/config\/elasticsearch.yml elk2:\/usr\/local\/elasticsearch\/config\/elasticsearch.yml<\/p>\n<p>#\u63a8\u9001\u914d\u7f6e\u6587\u4ef6\u5230\u7b2c\u4e09\u53f0<br \/>\nscp \/usr\/local\/elasticsearch\/config\/elasticsearch.yml elk3:\/usr\/local\/elasticsearch\/config\/elasticsearch.yml<\/p>\n<p>#\u7b2c\u4e8c\u53f0\u66f4\u6539<br \/>\nvi \/usr\/local\/elasticsearch\/config\/elasticsearch.yml<br \/>\nnode.name: elk2    #23\u884c&#xff0c;\u672c\u8282\u70b9\u4e3b\u673a\u540d<\/p>\n<p>#\u7b2c\u4e09\u53f0\u66f4\u6539<br \/>\nvi \/usr\/local\/elasticsearch\/config\/elasticsearch.yml<br \/>\nnode.name: elk3    #23\u884c&#xff0c;\u672c\u8282\u70b9\u4e3b\u673a\u540d <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">c.\u521b\u5efa\u6570\u636e\u5b58\u653e\u8def\u5f84\u5e76\u6388\u6743<\/p>\n<p>mkdir -p \/elk\/data<br \/>\nmkdir -p \/elk\/logs<br \/>\nchown -R es:es \/elk\/<br \/>\nchown -R es:es \/usr\/local\/elasticsearch <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">d.\u542f\u52a8es<\/p>\n<p>su &#8211; es<\/p>\n<p>nohup \/usr\/local\/elasticsearch\/bin\/elasticsearch &amp;<br \/>\nexit <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">e.\u67e5\u770b\u8282\u70b9\u4fe1\u606f<\/p>\n<p>ss -nlpt | grep 9200<br \/>\nLISTEN 0      4096               *:9200            *:*    users:((&#034;java&#034;,pid&#061;3136,fd&#061;253)) <\/p>\n<h4 id=\"4.%E5%AE%89%E8%A3%85logstash%EF%BC%88elk1%E4%B8%8A%EF%BC%89\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">4.\u5b89\u88c5logstash<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a&#xff09;<\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u5728logstash\u670d\u52a1\u5668\u4e0a\u5b89\u88c5logstash<\/p>\n<p>#\u5b89\u88c5<br \/>\ntar zxf logstash-7.10.0-linux-x86_64.tar.gz<br \/>\nmv logstash-7.10.0 \/usr\/local\/logstash<br \/>\nchmod -R 777 \/usr\/local\/logstash\/data<\/p>\n<p>#\u6dfb\u52a0\u670d\u52a1<br \/>\nvi \/usr\/local\/logstash\/system.conf<\/p>\n<p>input {<br \/>\nfile{<br \/>\npath &#061;&gt;&#034;\/var\/log\/messages&#034;<br \/>\ntype &#061;&gt;&#034;system&#034;<br \/>\nstart_position &#061;&gt;&#034;beginning&#034;<br \/>\n}<br \/>\n}<br \/>\noutput {<br \/>\nelasticsearch {<br \/>\nhosts &#061;&gt; [&#034;192.168.16.142:9200&#034;]<br \/>\nindex &#061;&gt;&#034;system-%{&#043;YYYY.MM.dd}&#034;<br \/>\n}<br \/>\n}<\/p>\n<p>#\u6dfb\u52a0\u8bfb\u6743\u9650<br \/>\nchmod &#043;r \/var\/log\/messages <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u6d4b\u8bd5\u5b89\u88c5\u7ed3\u679c<\/p>\n<p>#\u91c7\u96c6\u65e5\u5fd7&#xff08;\u542f\u52a8&#xff09;<br \/>\n\/usr\/local\/logstash\/bin\/logstash -f \/usr\/local\/logstash\/system.conf<br \/>\n#\u8bbf\u95ee\u9a8c\u8bc1&#xff08;elk3\u4e0a&#xff09;<br \/>\ncurl -XGET &#034;http:\/\/localhost:9200\/_cat\/indices&#034;<br \/>\n#green open system-2025.05.20 xnX0OgCxTmGZ6Msy5A1aXA 1 1 14184 0 5.8mb 2.8mb <\/p>\n<h4 id=\"5.Filebeat\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">5.Filebeat<\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u5728\u4ea7\u751f\u65e5\u5fd7\u7684\u5ba2\u6237\u7aef\u4e0a\u5b89\u88c5Filebeat<span style=\"color:#fe2c24\">&#xff08;elk2\u4e0a&#xff09;<\/span><\/p>\n<p>dnf install -y httpd<br \/>\nsystemctl start httpd <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u5b89\u88c5filebeat<span style=\"color:#fe2c24\">&#xff08;elk2\u4e0a&#xff09;<\/span><\/p>\n<p>tar zxf filebeat-7.10.0-linux-x86_64.tar.gz<br \/>\nmv filebeat-7.10.0-linux-x86_64 \/usr\/local\/filebeat <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">c.\u914d\u7f6eweb01\u670d\u52a1\u5668filebeat\u7684\u8f93\u51fa<span style=\"color:#fe2c24\">&#xff08;elk2\u4e0a&#xff09;<\/span><\/p>\n<p> vi \/usr\/local\/filebeat\/filebeat.yml<\/p>\n<p> filebeat.inputs:<br \/>\n&#8211; type: log<br \/>\n  paths:<br \/>\n    &#8211; \/var\/log\/httpd\/access_log<\/p>\n<p>output.logstash:<br \/>\n  hosts: [&#034;192.168.16.142:5044&#034;] <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">d.\u4fee\u6539logstash\u7684\u914d\u7f6e\u6587\u4ef6<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a&#xff09;<\/span><\/p>\n<p>vi \/usr\/local\/logstash\/config\/beats.conf<\/p>\n<p>input {<br \/>\n  beats {<br \/>\n    port &#061;&gt; &#034;5044&#034;<br \/>\n    codec &#061;&gt; &#034;json&#034;<br \/>\n }<br \/>\n}<br \/>\nseccomp:<br \/>\n  enabled: false<br \/>\noutput{<br \/>\n       elasticsearch {<br \/>\n          hosts &#061;&gt; [&#034;192.168.16.142:9200&#034;]<br \/>\n          index &#061;&gt; &#034;weblog-beat-%{&#043;YYYY.MM.dd}&#034;<br \/>\n    }<br \/>\n} <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">e.\u8fd0\u884clogstash\u5e76\u9a8c\u8bc1<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a&#xff09;<\/span><\/p>\n<p>\/usr\/local\/logstash\/bin\/logstash -f \/usr\/local\/logstash\/config\/beats.conf &#8211;path.data&#061;\/usr\/local\/logstash\/config.d\/web01 &amp;&gt; \/tmp\/logstash.log &amp; <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">f.\u542f\u52a8<span style=\"color:#fe2c24\">&#xff08;elk2\u4e0a&#xff09;<\/span><\/p>\n<p>\/usr\/local\/filebeat\/filebeat -c \/usr\/local\/filebeat\/filebeat.yml <\/p>\n<h4 id=\"6.%E5%AE%89%E8%A3%85Kibana%EF%BC%88elk1%E4%B8%8A%EF%BC%89\" style=\"margin-left:0px;margin-right:0px;text-align:justify\">6.\u5b89\u88c5Kibana<span style=\"color:#fe2c24\">&#xff08;elk1\u4e0a&#xff09;<\/span><\/h4>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">a.\u5728elk1\u4e0a\u5b89\u88c5Kibana<\/p>\n<p>tar zxf kibana-7.10.0-linux-x86_64.tar.gz<br \/>\nmv kibana-7.10.0-linux-x86_64 \/usr\/local\/kibana <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">b.\u4fee\u6539Kibana\u4e3b\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>vi \/usr\/local\/kibana\/config\/kibana.yml<\/p>\n<p>server.port: 5601    #2\u884c<br \/>\nserver.host: &#034;0.0.0.0&#034;    #7\u884c<br \/>\nelasticsearch.hosts: [&#034;http:\/\/192.168.16.142:9200&#034;]    #28\u884c<br \/>\nkibana.index: &#034;.kibana&#034;    #32\u884c<\/p>\n<p>chown -R es:es \/usr\/local\/kibana <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">c.\u542f\u52a8Kibana\u670d\u52a1<\/p>\n<p>su &#8211; es<br \/>\nnohup \/usr\/local\/kibana\/bin\/kibana &amp;nohup \/usr\/local\/kibana\/bin\/kibana &amp; <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">d.\u9a8c\u8bc1Kibana<\/p>\n<p>http:\/\/192.168.16.142:5601\/ <\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1040\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152725-683f145d8f2a9.png\" width=\"1920\" \/><\/p>\n<p>\u00a0e.\u5c06elk1\u4e3b\u673a\u7684\u7cfb\u7edf\u65e5\u5fd7\u6dfb\u52a0\u5230kinnba<\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1016\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152726-683f145e31093.png\" width=\"1237\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1031\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152726-683f145e96f3c.png\" width=\"1203\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1040\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152727-683f145f0a711.png\" width=\"1920\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1040\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152727-683f145fa41e1.png\" width=\"1920\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1217\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152728-683f14604e1f0.png\" width=\"1461\" \/><\/p>\n<p style=\"margin-left:0;margin-right:0;text-align:justify\">\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e33\u6b21\uff0c\u6536\u85cf20\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86ELK\uff08Elasticsearch\u3001Logstash\u3001Kibana\uff09\u65e5\u5fd7\u7ba1\u7406\u5e73\u53f0\u7684\u90e8\u7f72\u4e0e\u914d\u7f6e\u3002ELK\u5e73\u53f0\u7528\u4e8e\u96c6\u4e2d\u7ba1\u7406\u5206\u6563\u5b58\u50a8\u7684\u7cfb\u7edf\u65e5\u5fd7\u3001\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u548c\u5b89\u5168\u65e5\u5fd7\uff0c\u63d0\u4f9b\u5f3a\u5927\u7684\u641c\u7d22\u548c\u53ef\u89c6\u5316\u529f\u80fd_\u65e5\u5fd7\u7528elk<\/p>\n","protected":false},"author":2,"featured_media":41585,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2296,3825,664],"topic":[],"class_list":["post-41591","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-elk","tag-3825","tag-664"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/41591.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e33\u6b21\uff0c\u6536\u85cf20\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86ELK\uff08Elasticsearch\u3001Logstash\u3001Kibana\uff09\u65e5\u5fd7\u7ba1\u7406\u5e73\u53f0\u7684\u90e8\u7f72\u4e0e\u914d\u7f6e\u3002ELK\u5e73\u53f0\u7528\u4e8e\u96c6\u4e2d\u7ba1\u7406\u5206\u6563\u5b58\u50a8\u7684\u7cfb\u7edf\u65e5\u5fd7\u3001\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u548c\u5b89\u5168\u65e5\u5fd7\uff0c\u63d0\u4f9b\u5f3a\u5927\u7684\u641c\u7d22\u548c\u53ef\u89c6\u5316\u529f\u80fd_\u65e5\u5fd7\u7528elk\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/41591.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-03T15:27:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152725-683f145d8f2a9.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/41591.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/41591.html\",\"name\":\"\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-03T15:27:29+00:00\",\"dateModified\":\"2025-06-03T15:27:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/41591.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/41591.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/41591.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/41591.html","og_locale":"zh_CN","og_type":"article","og_title":"\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e33\u6b21\uff0c\u6536\u85cf20\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86ELK\uff08Elasticsearch\u3001Logstash\u3001Kibana\uff09\u65e5\u5fd7\u7ba1\u7406\u5e73\u53f0\u7684\u90e8\u7f72\u4e0e\u914d\u7f6e\u3002ELK\u5e73\u53f0\u7528\u4e8e\u96c6\u4e2d\u7ba1\u7406\u5206\u6563\u5b58\u50a8\u7684\u7cfb\u7edf\u65e5\u5fd7\u3001\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u548c\u5b89\u5168\u65e5\u5fd7\uff0c\u63d0\u4f9b\u5f3a\u5927\u7684\u641c\u7d22\u548c\u53ef\u89c6\u5316\u529f\u80fd_\u65e5\u5fd7\u7528elk","og_url":"https:\/\/www.wsisp.com\/helps\/41591.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-03T15:27:29+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250603152725-683f145d8f2a9.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/41591.html","url":"https:\/\/www.wsisp.com\/helps\/41591.html","name":"\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-03T15:27:29+00:00","dateModified":"2025-06-03T15:27:29+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/41591.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/41591.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/41591.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u57fa\u4e8eELK\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u7cfb\u7edf\u8bbe\u8ba1"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/41591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=41591"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/41591\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/41585"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=41591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=41591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=41591"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=41591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}