{"id":1300,"date":"2021-07-30T15:02:53","date_gmt":"2021-07-30T07:02:53","guid":{"rendered":"https:\/\/egonlin.com\/?p=1300"},"modified":"2021-07-30T15:02:53","modified_gmt":"2021-07-30T07:02:53","slug":"elk%e7%ae%80%e4%bb%8b","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=1300","title":{"rendered":"ELK\u7b80\u4ecb"},"content":{"rendered":"<h1>ELK\u7b80\u4ecb<\/h1>\n<h2>\u4e00\u3001ELK\u8d77\u6e90<\/h2>\n<h3>1\u3001\u65e5\u5e38\u5de5\u4f5c\u4e2d\u4f1a\u9762\u4e34\u5f88\u591a\u95ee\u9898\uff0c\u5904\u7406\u95ee\u9898\u65f6\u5019\u3002\u600e\u4e48\u89e3\u51b3\u95ee\u9898\uff1f<\/h3>\n<pre><code class=\"language-bash\">\u901a\u8fc7\u5de5\u4f5c\u7ecf\u9a8c\uff0c\u8fc5\u901f\u5224\u65ad\u95ee\u9898\u51fa\u5728\u54ea\u3002\n\u901a\u8fc7\u65e5\u5fd7\n\u7cfb\u7edf\u65e5\u5fd7\uff1a\/var\/log \u76ee\u5f55\u4e0b\u7684\u95ee\u9898\u7684\u6587\u4ef6\n\u7a0b\u5e8f\u65e5\u5fd7\uff1a \u4ee3\u7801\u65e5\u5fd7\uff08\u9879\u76ee\u4ee3\u7801\u8f93\u51fa\u7684\u65e5\u5fd7\uff09\n\u670d\u52a1\u5e94\u7528\u65e5\u5fd7\n    nginx\u3001HAproxy\u3001lvs\n    tomcat\u3001php-fpm\n    redis\u3001mysql\u3001mongo\n    RabbitMq\u3001kafka\n    Glusterfs\u3001HDFS\u3001NFS\u7b49\u7b49<\/code><\/pre>\n<p><strong>\u901a\u8fc7\u65e5\u5fd7\u6392\u9664\uff0c\u53d1\u73b0\u95ee\u9898\u6839\u6e90\u89e3\u51b3\u95ee\u9898<\/strong><\/p>\n<h3>2\u3001\u9762\u4e34\u7684\u95ee\u9898<\/h3>\n<blockquote>\n<p>\u200b \u5982\u679c1\u53f0\u6216\u8005\u51e0\u53f0\u670d\u52a1\u5668\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 linux\u547d\u4ee4\uff0c<code>tail\u3001cat\uff0c\u901a\u8fc7grep\u3001awk\u7b49<\/code>\u8fc7\u6ee4\u53bb\u67e5\u8be2\u5b9a\u4f4d\u65e5\u5fd7\u67e5\u95ee\u9898<\/p>\n<p>\u4f46\u662f\u5982\u679c\u51e0\u5341\u53f0\u3001\u751a\u81f3\u51e0\u767e\u53f0\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\u80af\u5b9a\u4e0d\u73b0\u5b9e\u3002<\/p>\n<\/blockquote>\n<h3>3\u3001\u601d\u8def\u63d0\u51fa<\/h3>\n<blockquote>\n<p>\u200b \u4e00\u4e9b\u806a\u660e\u4eba\u5c31\u63d0\u51fa\u4e86\u5efa\u7acb\u4e00\u5957\u96c6\u4e2d\u5f0f\u7684\u65b9\u6cd5\uff0c\u628a\u4e0d\u540c\u6765\u6e90\u7684\u6570\u636e\u96c6\u4e2d\u6574\u5408\u5230\u4e00\u4e2a\u5730\u65b9\u3002<\/p>\n<\/blockquote>\n<p><strong>\u4e00\u4e2a\u5b8c\u6574\u7684\u96c6\u4e2d\u5f0f\u65e5\u5fd7\u7cfb\u7edf\uff0c\u662f\u79bb\u4e0d\u5f00\u4ee5\u4e0b\u51e0\u4e2a\u4e3b\u8981\u7279\u70b9\u7684\u3002<\/strong><\/p>\n<pre><code class=\"language-bash\">\u6536\u96c6\uff0d\u80fd\u591f\u91c7\u96c6\u591a\u79cd\u6765\u6e90\u7684\u65e5\u5fd7\u6570\u636e\n\u4f20\u8f93\uff0d\u80fd\u591f\u7a33\u5b9a\u7684\u628a\u65e5\u5fd7\u6570\u636e\u4f20\u8f93\u5230\u4e2d\u592e\u7cfb\u7edf\n\u5b58\u50a8\uff0d\u5982\u4f55\u5b58\u50a8\u65e5\u5fd7\u6570\u636e\n\u5206\u6790\uff0d\u53ef\u4ee5\u652f\u6301 UI \u5206\u6790\n\u8b66\u544a\uff0d\u80fd\u591f\u63d0\u4f9b\u9519\u8bef\u62a5\u544a\uff0c\u76d1\u63a7\u673a\u5236<\/code><\/pre>\n<h3>4\u3001\u5e02\u573a\u4e0a\u7684\u4ea7\u54c1<\/h3>\n<p><strong>\u57fa\u4e8e\u4e0a\u8ff0\u601d\u8def\uff0c\u4e8e\u662f\u8bb8\u591a\u4ea7\u54c1\u6216\u65b9\u6848\u5c31\u5e94\u8fd0\u800c\u751f\u4e86<\/strong><\/p>\n<h4>1.\u7b80\u5355\u7684<\/h4>\n<blockquote>\n<p>Rsyslog\uff0cSyslog-ng<\/p>\n<\/blockquote>\n<h4>2.\u5546\u4e1a\u5316\u7684<\/h4>\n<blockquote>\n<p>\u5546\u4e1a\u5316\u7684 Splunk<\/p>\n<\/blockquote>\n<h4>3.\u5f00\u6e90\u7684<\/h4>\n<pre><code class=\"language-bash\">FaceBook \u516c\u53f8\u7684 Scribe\uff0c\nApache \u7684 Chukwa\uff0c\nLinkedin \u7684 Kafak\uff0c\nCloudera \u7684 Fluentd\uff0c\nELK<\/code><\/pre>\n<h2>\u4e8c\u3001\u4ec0\u4e48\u662fELK<\/h2>\n<blockquote>\n<p>ELK \u662f\u7531 Elasticsearch\u3001Logstash\u3001Kibana \u4e09\u4e2a\u5f00\u6e90\u8f6f\u4ef6\u7684\u7ec4 \u6210\u7684\u4e00\u4e2a\u7ec4\u5408\u4f53\uff0c\u8fd9\u4e09\u4e2a\u8f6f\u4ef6\u5f53\u4e2d\uff0c\u6bcf\u4e2a\u8f6f\u4ef6\u7528\u4e8e\u5b8c\u6210\u4e0d\u540c\u7684\u529f\u80fd\uff0cELK \u53c8\u79f0 \u4e3a ELK stack\uff0c\u5b98\u65b9\u57df\u540d\u4e3a stactic.co\u3002<\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/1-52.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/1-52.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<h2>\u4e09\u3001ELK\u4f18\u70b9<\/h2>\n<h3>1\u3001\u5904\u7406\u65b9\u5f0f\u7075\u6d3b<\/h3>\n<blockquote>\n<p>elasticsearch \u662f\u5b9e\u65f6\u5168\u6587\u7d22\u5f15\uff0c\u5177\u6709\u5f3a\u5927\u7684\u641c\u7d22\u529f\u80fd <\/p>\n<\/blockquote>\n<h3>2\u3001\u914d\u7f6e\u76f8\u5bf9\u7b80\u5355<\/h3>\n<blockquote>\n<p>elasticsearch \u5168\u90e8\u4f7f\u7528 JSON \u63a5\u53e3\uff0clogstash \u4f7f\u7528\u6a21\u5757\u914d\u7f6e\uff0c kibana \u7684\u914d\u7f6e\u6587\u4ef6\u90e8\u5206\u66f4\u7b80\u5355\u3002<\/p>\n<\/blockquote>\n<h3>3\u3001\u68c0\u7d22\u6027\u80fd\u9ad8\u6548<\/h3>\n<blockquote>\n<p>\u57fa\u4e8e\u4f18\u79c0\u7684\u8bbe\u8ba1\uff0c\u867d\u7136\u6bcf\u6b21\u67e5\u8be2\u90fd\u662f\u5b9e\u65f6\uff0c\u4f46\u662f\u4e5f\u53ef\u4ee5\u8fbe\u5230\u767e\u4ebf\u7ea7\u6570\u636e\u7684\u67e5\u8be2\u79d2\u7ea7\u54cd\u5e94\u3002 <\/p>\n<\/blockquote>\n<h3>4\u3001\u96c6\u7fa4\u7ebf\u6027\u6269\u5c55<\/h3>\n<blockquote>\n<p>elasticsearch \u548c logstash \u90fd\u53ef\u4ee5\u7075\u6d3b\u7ebf\u6027\u6269\u5c55<\/p>\n<\/blockquote>\n<h3>5\u3001\u524d\u7aef\u64cd\u4f5c\u7eda\u4e3d<\/h3>\n<blockquote>\n<p>kibana \u7684\u524d\u7aef\u8bbe\u8ba1\u6bd4\u8f83\u7eda\u4e3d\uff0c\u800c\u4e14\u64cd\u4f5c\u7b80\u5355<\/p>\n<\/blockquote>\n<h2>\u56db\u3001ELK\u7ec4\u4ef6\u4ecb\u7ecd<\/h2>\n<h3>1\u3001Elasticsearch<\/h3>\n<h4>1.\u4ecb\u7ecd<\/h4>\n<blockquote>\n<p>\u200b  <code>Elasticsearch<\/code> \u662f\u4e00\u4e2a\u5b9e\u65f6\u7684\u5206\u5e03\u5f0f\u641c\u7d22\u548c\u5206\u6790\u5f15\u64ce\uff0c\u5b83\u53ef\u4ee5\u7528\u4e8e\u5168\u6587\u641c\u7d22\uff0c\u7ed3\u6784\u5316\u641c\u7d22\u4ee5\u53ca\u5206\u6790\u3002\u5b83\u662f\u4e00\u4e2a\u5efa\u7acb\u5728\u5168\u6587\u641c\u7d22\u5f15\u64ce <code>Apache Lucene<\/code>\u57fa\u7840\u4e0a\u7684\u641c\u7d22\u5f15\u64ce\uff0c\u4f7f\u7528<code>Java<\/code>\u8bed\u8a00\u7f16\u5199<\/p>\n<\/blockquote>\n<h4>2.\u4e3b\u8981\u7279\u70b9<\/h4>\n<blockquote>\n<p><em>\u5b9e\u65f6\u5206\u6790<\/em> \u5206\u5e03\u5f0f\u5b9e\u65f6\u6587\u4ef6\u5b58\u50a8\uff0c\u5e76\u5c06\u6bcf\u4e00\u4e2a\u5b57\u6bb5\u90fd\u7f16\u5165\u7d22\u5f15 <em>\u6587\u6863\u5bfc\u5411\uff0c\u6240\u6709\u7684\u5bf9\u8c61\u5168\u90e8\u662f\u6587\u6863<\/em> \u9ad8\u53ef\u7528\u6027\uff0c\u6613\u6269\u5c55\uff0c\u652f\u6301\u96c6\u7fa4\uff08Cluster\uff09\u3001\u5206\u7247\u548c\u590d\u5236\uff08Shards \u548c Replicas\uff09\u3002\u63a5\u53e3\u53cb\u597d\uff0c\u652f\u6301 JSON<\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/2-48.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/2-48.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><br \/>\n<div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/3-46.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/3-46.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<h3>2\u3001Logstash<\/h3>\n<h4>1.\u4ecb\u7ecd<\/h4>\n<blockquote>\n<p><code>Logstash<\/code> \u662f\u4e00\u4e2a\u5177\u6709\u5b9e\u65f6\u6e20\u9053\u80fd\u529b\u7684\u6570\u636e\u6536\u96c6\u5f15\u64ce\u3002\u4f7f\u7528 JRuby \u8bed\u8a00\u7f16\u5199\u3002\u5176\u4f5c\u8005\u662f\u4e16\u754c\u8457\u540d\u7684\u8fd0\u7ef4\u5de5\u7a0b\u5e08\u4e54\u4e39\u897f\u585e (JordanSissel)<\/p>\n<\/blockquote>\n<h4>2.\u7279\u70b9<\/h4>\n<blockquote>\n<p>\u51e0\u4e4e\u53ef\u4ee5\u8bbf\u95ee\u4efb\u4f55\u6570\u636e<\/p>\n<p>\u53ef\u4ee5\u548c\u591a\u79cd\u5916\u90e8\u5e94\u7528\u7ed3\u5408<\/p>\n<p>\u652f\u6301\u5f39\u6027\u6269\u5c55<\/p>\n<\/blockquote>\n<h4>3.\u7ec4\u6210<\/h4>\n<blockquote>\n<p>Shipper\uff0d\u53d1\u9001\u65e5\u5fd7\u6570\u636e<\/p>\n<p>Broker\uff0d\u6536\u96c6\u6570\u636e<\/p>\n<p>Indexer\uff0d\u6570\u636e\u5199\u5165<\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/4-38.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/4-38.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<h3>3\u3001Kibana<\/h3>\n<blockquote>\n<p>\u200b      <code>Kibana<\/code>\u662f\u4e00\u6b3e\u57fa\u4e8e <code>Apache<\/code>\u5f00\u6e90\u534f\u8bae\uff0c\u4f7f\u7528 <code>JavaScript<\/code>\u8bed\u8a00\u7f16\u5199\uff0c\u4e3a <code>Elasticsearch<\/code>\u63d0\u4f9b\u5206\u6790\u548c\u53ef\u89c6\u5316\u7684 Web \u5e73\u53f0\u3002\u5b83\u53ef\u4ee5\u5728<code>Elasticsearch<\/code>\u7684\u7d22\u5f15\u4e2d\u67e5\u627e\uff0c\u4ea4\u4e92\u6570\u636e\uff0c\u5e76\u751f\u6210\u5404\u79cd\u7ef4\u5ea6\u7684\u8868\u56fe.<\/p>\n<\/blockquote>\n<h3>4\u3001Filebeat<\/h3>\n<blockquote>\n<p>\u200b      <code>ELK<\/code> \u534f\u8bae\u6808\u7684\u65b0\u6210\u5458\uff0c\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u5f00\u6e90\u65e5\u5fd7\u6587\u4ef6\u6570\u636e\u641c\u96c6\u5668\uff0c\u57fa\u4e8e <code>Logstash-Forwarder<\/code>\u6e90\u4ee3\u7801\u5f00\u53d1\uff0c\u662f\u5bf9\u5b83\u7684\u66ff\u4ee3\u3002\u5728\u9700\u8981\u91c7\u96c6\u65e5\u5fd7\u6570\u636e\u7684 <code>server<\/code> \u4e0a\u5b89\u88c5<code>Filebea<\/code>t\uff0c\u5e76\u6307\u5b9a\u65e5\u5fd7\u76ee\u5f55\u6216\u65e5\u5fd7\u6587\u4ef6\u540e\uff0c<code>Filebeat<\/code>\u5c31\u80fd\u8bfb\u53d6\u6570\u636e\uff0c\u8fc5\u901f\u53d1\u9001\u5230<code>Logstash<\/code>\u8fdb\u884c\u89e3\u6790\uff0c\u4ea6\u6216\u76f4\u63a5\u53d1\u9001\u5230 <code>Elasticsearch<\/code>\u8fdb\u884c\u96c6\u4e2d\u5f0f\u5b58\u50a8\u548c\u5206\u6790\u3002<\/p>\n<\/blockquote>\n<h2>\u4e94\u3001ELK \u534f\u8bae\u6808\u4f53\u7cfb\u7ed3\u6784<\/h2>\n<h3>1\u3001\u6700\u7b80\u5355\u67b6\u6784<\/h3>\n<blockquote>\n<p>\u200b      \u5728\u8fd9\u79cd\u67b6\u6784\u4e2d\uff0c\u53ea\u6709\u4e00\u4e2a Logstash\u3001Elasticsearch \u548c Kibana \u5b9e\u4f8b\u3002Logstash \u901a\u8fc7\u8f93\u5165\u63d2\u4ef6\u4ece\u591a\u79cd\u6570\u636e\u6e90\uff08\u6bd4\u5982\u65e5\u5fd7\u6587\u4ef6\u3001\u6807\u51c6\u8f93\u5165 Stdin \u7b49\uff09\u83b7\u53d6\u6570\u636e\uff0c\u518d\u7ecf\u8fc7\u6ee4\u63d2\u4ef6\u52a0\u5de5\u6570\u636e\uff0c\u7136\u540e\u7ecf Elasticsearch \u8f93\u51fa\u63d2\u4ef6\u8f93\u51fa\u5230 Elasticsearch\uff0c\u901a\u8fc7 Kibana \u5c55\u793a<\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/5-37.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/5-37.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<h3>2\u3001Logstash \u4f5c\u4e3a\u65e5\u5fd7\u641c\u96c6\u5668<\/h3>\n<blockquote>\n<p>\u200b     \u8fd9\u79cd\u67b6\u6784\u662f\u5bf9\u4e0a\u9762\u67b6\u6784\u7684\u6269\u5c55\uff0c\u628a\u4e00\u4e2a Logstash \u6570\u636e\u641c\u96c6\u8282\u70b9\u6269\u5c55\u5230\u591a\u4e2a\uff0c\u5206\u5e03\u4e8e\u591a\u53f0\u673a\u5668\uff0c\u5c06\u89e3\u6790\u597d\u7684\u6570\u636e\u53d1\u9001\u5230 Elasticsearch server \u8fdb\u884c\u5b58\u50a8\uff0c\u6700\u540e\u5728 Kibana \u67e5\u8be2\u3001\u751f\u6210\u65e5\u5fd7\u62a5\u8868\u7b49<\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/6-34.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/6-34.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<blockquote>\n<p>\u200b      \u8fd9\u79cd\u7ed3\u6784\u56e0\u4e3a\u9700\u8981\u5728\u5404\u4e2a\u670d\u52a1\u5668\u4e0a\u90e8\u7f72 Logstash\uff0c\u800c\u5b83\u6bd4\u8f83\u6d88\u8017 CPU \u548c\u5185\u5b58\u8d44\u6e90\uff0c\u6240\u4ee5\u6bd4\u8f83\u9002\u5408\u8ba1\u7b97\u8d44\u6e90\u4e30\u5bcc\u7684\u670d\u52a1\u5668\uff0c\u5426\u5219\u5bb9\u6613\u9020\u6210\u670d\u52a1\u5668\u6027\u80fd\u4e0b\u964d\uff0c\u751a\u81f3\u53ef\u80fd\u5bfc\u81f4\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<\/blockquote>\n<h3>3\u3001Beats \u4f5c\u4e3a\u65e5\u5fd7\u641c\u96c6\u5668<\/h3>\n<blockquote>\n<p>\u8fd9\u79cd\u67b6\u6784\u5f15\u5165 <code>Beats<\/code> \u4f5c\u4e3a\u65e5\u5fd7\u641c\u96c6\u5668\u3002\u76ee\u524d <code>Beats<\/code>\u5305\u62ec\u56db\u79cd\uff1a<\/p>\n<\/blockquote>\n<pre><code class=\"language-bash\">Packetbeat\uff08\u641c\u96c6\u7f51\u7edc\u6d41\u91cf\u6570\u636e\uff09\uff1b\nTopbeat\uff08\u641c\u96c6\u7cfb\u7edf\u3001\u8fdb\u7a0b\u548c\u6587\u4ef6\u7cfb\u7edf\u7ea7\u522b\u7684 CPU \u548c\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u7b49\u6570\u636e\uff09\uff1b\nFilebeat\uff08\u641c\u96c6\u6587\u4ef6\u6570\u636e\uff09\uff1b\nWinlogbeat\uff08\u641c\u96c6 Windows \u4e8b\u4ef6\u65e5\u5fd7\u6570\u636e\uff09\u3002<\/code><\/pre>\n<blockquote>\n<p>\u200b  <code>Beats<\/code> \u5c06\u641c\u96c6\u5230\u7684\u6570\u636e\u53d1\u9001\u5230 <code>Logstash<\/code>\uff0c\u7ecf <code>Logstash<\/code> \u89e3\u6790\u3001\u8fc7\u6ee4\u540e\uff0c\u5c06\u5176\u53d1\u9001\u5230 <code>Elasticsearch<\/code>\u5b58\u50a8\uff0c\u5e76\u7531 <code>Kibana<\/code> \u5448\u73b0\u7ed9\u7528\u6237\u3002<\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/7-31.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/7-31.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<blockquote>\n<p>\u200b  \u8fd9\u79cd\u67b6\u6784\u89e3\u51b3\u4e86 <code>Logstash<\/code> \u5728\u5404\u670d\u52a1\u5668\u8282\u70b9\u4e0a\u5360\u7528\u7cfb\u7edf\u8d44\u6e90\u9ad8\u7684\u95ee\u9898\u3002\u76f8\u6bd4 <code>Logstash\uff0cBeats<\/code> \u6240\u5360\u7cfb\u7edf\u7684 <code>CPU<\/code> \u548c\u5185\u5b58\u51e0\u4e4e\u53ef\u4ee5\u5ffd\u7565\u4e0d\u8ba1\u3002\u53e6\u5916\uff0c<code>Beats<\/code> \u548c <code>Logstash<\/code> \u4e4b\u95f4\u652f\u6301 <code>SSL\/TLS<\/code> \u52a0\u5bc6\u4f20\u8f93\uff0c\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u53cc\u5411\u8ba4\u8bc1\uff0c\u4fdd\u8bc1\u4e86\u901a\u4fe1\u5b89\u5168\u3002<\/p>\n<p>\u200b  \u56e0\u6b64\u8fd9\u79cd\u67b6\u6784\u9002\u5408\u5bf9\u6570\u636e\u5b89\u5168\u6027\u8981\u6c42\u8f83\u9ad8\uff0c\u540c\u65f6\u5404\u670d\u52a1\u5668\u6027\u80fd\u6bd4\u8f83\u654f\u611f\u7684\u573a\u666f\u3002<\/p>\n<\/blockquote>\n<h3>4\u3001\u57fa\u4e8e Filebeat \u67b6\u6784\u7684\u914d\u7f6e\u90e8\u7f72\u8be6\u89e3<\/h3>\n<blockquote>\n<p>\u200b \u524d\u9762\u63d0\u5230 Filebeat \u5df2\u7ecf\u5b8c\u5168\u66ff\u4ee3\u4e86 Logstash-Forwarder \u6210\u4e3a\u65b0\u4e00\u4ee3\u7684\u65e5\u5fd7\u91c7\u96c6\u5668\uff0c\u540c\u65f6\u9274\u4e8e\u5b83\u8f7b\u91cf\u3001\u5b89\u5168\u7b49\u7279\u70b9\uff0c\u8d8a\u6765\u8d8a\u591a\u4eba\u5f00\u59cb\u4f7f\u7528\u5b83\u3002<\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/8-26.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/8-26.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<h3>5\u3001\u5f15\u5165\u6d88\u606f\u961f\u5217\u673a\u5236\u7684\u67b6\u6784<\/h3>\n<blockquote>\n<p>\u200b      Beats \u8fd8\u4e0d\u652f\u6301\u8f93\u51fa\u5230\u6d88\u606f\u961f\u5217\uff0c\u6240\u4ee5\u5728\u6d88\u606f\u961f\u5217\u524d\u540e\u4e24\u7aef\u53ea\u80fd\u662f Logstash \u5b9e\u4f8b\u3002\u8fd9\u79cd\u67b6\u6784\u4f7f\u7528 Logstash \u4ece\u5404\u4e2a\u6570\u636e\u6e90\u641c\u96c6\u6570\u636e\uff0c\u7136\u540e\u7ecf\u6d88\u606f\u961f\u5217\u8f93\u51fa\u63d2\u4ef6\u8f93\u51fa\u5230\u6d88\u606f\u961f\u5217\u4e2d\u3002\u76ee\u524d Logstash \u652f\u6301 Kafka\u3001Redis\u3001RabbitMQ \u7b49\u5e38\u89c1\u6d88\u606f\u961f\u5217\u3002\u7136\u540e Logstash \u901a\u8fc7\u6d88\u606f\u961f\u5217\u8f93\u5165\u63d2\u4ef6\u4ece\u961f\u5217\u4e2d\u83b7\u53d6\u6570\u636e\uff0c\u5206\u6790\u8fc7\u6ee4\u540e\u7ecf\u8f93\u51fa\u63d2\u4ef6\u53d1\u9001\u5230 Elasticsearch\uff0c\u6700\u540e\u901a\u8fc7 Kibana \u5c55\u793a\u3002<\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/9-18.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  data-original=\"https:\/\/egonlin.com\/wp-content\/uploads\/2021\/07\/9-18.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" \/><\/div><\/p>\n<blockquote>\n<p>\u200b      \u8fd9\u79cd\u67b6\u6784\u9002\u5408\u4e8e\u65e5\u5fd7\u89c4\u6a21\u6bd4\u8f83\u5e9e\u5927\u7684\u60c5\u51b5\u3002\u4f46\u7531\u4e8e <code>Logstash<\/code> \u65e5\u5fd7\u89e3\u6790\u8282\u70b9\u548c <code>Elasticsearch<\/code> \u7684\u8d1f\u8377\u6bd4\u8f83\u91cd\uff0c\u53ef\u5c06\u4ed6\u4eec\u914d\u7f6e\u4e3a\u96c6\u7fa4\u6a21\u5f0f\uff0c\u4ee5\u5206\u62c5\u8d1f\u8377\u3002\u5f15\u5165\u6d88\u606f\u961f\u5217\uff0c\u5747\u8861\u4e86\u7f51\u7edc\u4f20\u8f93\uff0c\u4ece\u800c\u964d\u4f4e\u4e86\u7f51\u7edc\u95ed\u585e\uff0c\u5c24\u5176\u662f\u4e22\u5931\u6570\u636e\u7684\u53ef\u80fd\u6027\uff0c\u4f46\u4f9d\u7136\u5b58\u5728 <code>Logstash<\/code> \u5360\u7528\u7cfb\u7edf\u8d44\u6e90\u8fc7\u591a\u7684\u95ee\u9898\u3002<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>ELK\u7b80\u4ecb \u4e00\u3001ELK\u8d77\u6e90 1\u3001\u65e5\u5e38\u5de5\u4f5c\u4e2d\u4f1a\u9762\u4e34\u5f88\u591a\u95ee\u9898\uff0c\u5904\u7406\u95ee\u9898\u65f6\u5019\u3002\u600e\u4e48\u89e3\u51b3\u95ee\u9898\uff1f \u901a\u8fc7\u5de5\u4f5c\u7ecf\u9a8c\uff0c\u8fc5\u901f\u5224\u65ad [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1301,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[162],"tags":[21,165,19,22,166,20],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1300"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1300"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1300\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/media\/1301"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}