{"id":89650,"date":"2026-08-03T12:25:07","date_gmt":"2026-08-03T04:25:07","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/89650.html"},"modified":"2026-08-03T12:25:07","modified_gmt":"2026-08-03T04:25:07","slug":"elk-stack%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83%e9%83%a8%e7%bd%b2%e6%8c%87%e5%8d%97%ef%bc%9afilebeat-elasticsearch-logstash-kibana","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/89650.html","title":{"rendered":"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana"},"content":{"rendered":"<h2>ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357<\/h2>\n<h3>1. \u90e8\u7f72\u67b6\u6784\u4e0e\u89c4\u5212<\/h3>\n<p>\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u4e86 ELK \u65e5\u5fd7\u5e73\u53f0\u7684\u6574\u4f53\u67b6\u6784\u53ca\u6838\u5fc3\u7ec4\u4ef6&#xff0c;\u672c\u7bc7\u5f00\u59cb\u8fdb\u5165\u5b9e\u9645\u90e8\u7f72\u9636\u6bb5\u3002<br \/>\n\u672c\u6587\u57fa\u4e8e Docker Compose \u642d\u5efa\u4e00\u5957\u5b8c\u6574\u7684 ELK Stack&#xff0c;\u5305\u62ec Elasticsearch \u96c6\u7fa4\u3001Kibana \u53ef\u89c6\u5316\u5e73\u53f0\u4ee5\u53ca Logstash \u65e5\u5fd7\u5904\u7406\u670d\u52a1&#xff0c;\u9002\u5408\u4f5c\u4e3a\u4e2d\u5c0f\u578b\u751f\u4ea7\u73af\u5883\u6216\u6d4b\u8bd5\u73af\u5883\u7684\u90e8\u7f72\u53c2\u8003\u3002<\/p>\n<h4>1.1 \u67b6\u6784\u9009\u578b<\/h4>\n<p>\u91c7\u7528 FELK \u67b6\u6784&#xff0c;\u5373 Filebeat &#043; Elasticsearch &#043; Logstash &#043; Kibana\u3002Filebeat \u4f5c\u4e3a\u8f7b\u91cf\u7ea7\u65e5\u5fd7\u91c7\u96c6\u5668\u90e8\u7f72\u5728\u5e94\u7528\u670d\u52a1\u5668\u4e0a&#xff0c;\u8d1f\u8d23\u6536\u96c6\u65e5\u5fd7\u5e76\u8f6c\u53d1\u81f3 Logstash&#xff1b;Logstash \u96c6\u4e2d\u90e8\u7f72&#xff0c;\u8d1f\u8d23\u65e5\u5fd7\u7684\u8fc7\u6ee4\u4e0e\u89e3\u6790&#xff1b;Elasticsearch \u96c6\u7fa4\u5b58\u50a8\u5e76\u63d0\u4f9b\u68c0\u7d22\u80fd\u529b&#xff1b;Kibana \u4f5c\u4e3a\u53ef\u89c6\u5316\u524d\u7aef\u3002<\/p>\n<p>\u73af\u5883\u8bf4\u660e&#xff1a;<\/p>\n<ul>\n<li>\u90e8\u7f72\u65b9\u5f0f&#xff1a;Docker Compose<\/li>\n<li>\u955c\u50cf\u7248\u672c&#xff1a;Elasticsearch 7.8.1\u3001Kibana 7.8.1\u3001Logstash 7.8.1<\/li>\n<li>\u96c6\u7fa4\u89c4\u6a21&#xff1a;3\u4e2aElasticsearch\u8282\u70b9 &#043; 1\u4e2aKibana &#043; 1\u4e2aLogstash<\/li>\n<\/ul>\n<p>\u4f7f\u7528docker-compose\u7684\u4f18\u52bf&#xff1a;<br \/>\n1&#xff09;\u73af\u5883\u9694\u79bb&#xff0c;\u907f\u514d\u4f9d\u8d56\u51b2\u7a81 2&#xff09;\u90e8\u7f72\u6d41\u7a0b\u7edf\u4e00&#xff0c;\u4fbf\u4e8e\u8fc1\u79fb 3&#xff09;\u5347\u7ea7\u548c\u56de\u6eda\u66f4\u52a0\u65b9\u4fbf 4&#xff09;\u914d\u7f6e\u6587\u4ef6\u96c6\u4e2d\u7ba1\u7406&#xff0c;\u4fbf\u4e8e\u7ef4\u62a4<\/p>\n<h4>1.2 \u670d\u52a1\u5668\u89c4\u5212<\/h4>\n<table>\n<tr>\u670d\u52a1\u5668IP\u90e8\u7f72\u7ec4\u4ef6\u7aef\u53e3\u6620\u5c04<\/tr>\n<tbody>\n<tr>\n<td>10.1.1.1<\/td>\n<td>Elasticsearch node-1\u3001Kibana<\/td>\n<td>9200\/9300\u30015601<\/td>\n<\/tr>\n<tr>\n<td>10.1.1.2<\/td>\n<td>Elasticsearch node-2<\/td>\n<td>9200\/9300<\/td>\n<\/tr>\n<tr>\n<td>10.1.1.3<\/td>\n<td>Elasticsearch node-3<\/td>\n<td>9200\/9300<\/td>\n<\/tr>\n<tr>\n<td>\u72ec\u7acb\u670d\u52a1\u5668<\/td>\n<td>Logstash<\/td>\n<td>5044\/9600<\/td>\n<\/tr>\n<tr>\n<td>\u5404\u5e94\u7528\u670d\u52a1\u5668<\/td>\n<td>Filebeat<\/td>\n<td>\u65e0&#xff08;\u4e3b\u52a8\u91c7\u96c6&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7f51\u7edc\u89c4\u5212&#xff1a;\u6240\u6709\u5bb9\u5668\u52a0\u5165\u540d\u4e3a elastic \u7684\u5916\u90e8 Docker \u7f51\u7edc&#xff0c;\u5b9e\u73b0\u8de8\u4e3b\u673a\u5bb9\u5668\u901a\u4fe1\u3002<\/p>\n<h4>1.3 \u7248\u672c\u9009\u62e9\u8bf4\u660e<\/h4>\n<p>\u672c\u6587\u4f7f\u7528 Elastic Stack 7.8.1 \u7248\u672c\u8fdb\u884c\u90e8\u7f72\u3002<\/p>\n<p>\u4e4b\u6240\u4ee5\u9009\u62e9\u8be5\u7248\u672c&#xff0c;\u4e3b\u8981\u57fa\u4e8e\u4ee5\u4e0b\u51e0\u4e2a\u539f\u56e0&#xff1a;<\/p>\n<ul>\n<li>7.x \u7cfb\u5217\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u8f83\u4e3a\u6210\u719f&#xff0c;\u7a33\u5b9a\u6027\u8f83\u597d\u3002<\/li>\n<li>\u4e0e Filebeat\u3001Logstash\u3001Kibana \u4fdd\u6301\u7248\u672c\u4e00\u81f4&#xff0c;\u517c\u5bb9\u6027\u8f83\u597d\u3002<\/li>\n<li>\u76f8\u6bd4 8.x \u7248\u672c&#xff0c;\u9ed8\u8ba4\u672a\u5f00\u542f\u5b89\u5168\u8ba4\u8bc1&#xff0c;\u90e8\u7f72\u53ca\u5b66\u4e60\u6210\u672c\u66f4\u4f4e\u3002<\/li>\n<li>\u76ee\u524d\u4ecd\u6709\u8f83\u591a\u4f01\u4e1a\u751f\u4ea7\u73af\u5883\u8fd0\u884c\u5728 7.x \u7cfb\u5217&#xff0c;\u5177\u6709\u4e00\u5b9a\u53c2\u8003\u4ef7\u503c\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u65b0\u5efa\u751f\u4ea7\u73af\u5883\u4e14\u5bf9\u5b89\u5168\u8981\u6c42\u8f83\u9ad8&#xff0c;\u4e5f\u53ef\u4ee5\u76f4\u63a5\u90e8\u7f72 8.x \u7248\u672c&#xff0c;\u4f46\u9700\u8981\u989d\u5916\u914d\u7f6e xpack \u5b89\u5168\u8ba4\u8bc1\u53ca HTTPS \u901a\u4fe1\u3002<\/p>\n<h3>2. Elasticsearch \u96c6\u7fa4\u90e8\u7f72<\/h3>\n<p>\u672c\u6587\u9ed8\u8ba4\u8bfb\u8005\u5df2\u7ecf\u5b8c\u6210 Docker \u4e0e Docker Compose \u7684\u5b89\u88c5&#xff0c;\u56e0\u6b64\u4e0d\u518d\u4ecb\u7ecd\u57fa\u7840\u73af\u5883\u642d\u5efa&#xff0c;\u4e0b\u9762\u76f4\u63a5\u8fdb\u5165 ELK \u96c6\u7fa4\u90e8\u7f72\u6d41\u7a0b\u3002<\/p>\n<h4>2.1 \u670d\u52a1\u51c6\u5907<\/h4>\n<p>\u5f00\u59cb\u90e8\u7f72\u524d&#xff0c;\u5efa\u8bae\u63d0\u524d\u5b8c\u6210\u4ee5\u4e0b\u73af\u5883\u51c6\u5907\u5de5\u4f5c&#xff1a;<\/p>\n<ul>\n<li>Docker 20.x \u53ca\u4ee5\u4e0a\u7248\u672c<\/li>\n<li>Docker Compose&#xff08;\u6216 Docker Compose Plugin&#xff09;<\/li>\n<li>\u4e09\u53f0 Linux \u670d\u52a1\u5668&#xff08;CentOS\u3001Ubuntu\u3001openEuler \u7b49\u5747\u53ef&#xff09;<\/li>\n<li>\u4e09\u53f0\u670d\u52a1\u5668\u7f51\u7edc\u4e92\u901a<\/li>\n<li>\u6bcf\u53f0\u670d\u52a1\u5668\u5efa\u8bae\u81f3\u5c11 2 \u6838 CPU\u30014GB \u5185\u5b58&#xff08;\u751f\u4ea7\u73af\u5883\u5efa\u8bae\u66f4\u9ad8&#xff09;<\/li>\n<\/ul>\n<p>\u5728\u4e0d\u540c\u7684\u670d\u52a1\u5668\u4e0a\u5bf9\u5e94\u7684\/data\/project-es \u521b\u5efa\u76ee\u5f55&#xff0c;\u7f16\u8f91compose\u7684yml\u6587\u4ef6&#xff0c;\u4f7f\u7528docker compose up\u4e4b\u540e\u76f8\u5173\u7684\u6587\u4ef6\u4f1a\u81ea\u52a8\u521b\u5efa<\/p>\n<p>\/data\/project-es\/<br \/>\n\u251c\u2500\u2500 docker-compose.yml<br \/>\n\u251c\u2500\u2500 es\/<br \/>\n\u2502   \u251c\u2500\u2500 config\/<br \/>\n\u2502   \u2502   \u2514\u2500\u2500 elasticsearch.yml<br \/>\n\u2502   \u251c\u2500\u2500 data\/<br \/>\n\u2502   \u251c\u2500\u2500 log\/<br \/>\n\u2502   \u2514\u2500\u2500 plugins\/<br \/>\n\u2514\u2500\u2500 kibana\/<br \/>\n    \u2514\u2500\u2500 config\/<br \/>\n        \u2514\u2500\u2500 kibana.yml<\/p>\n<h4>2.2 ES compose\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>compose \u7684\u914d\u7f6e\u6587\u4ef6\u53c2\u8003\u5982\u4e0b&#xff0c;\u53ef\u4ee5\u53ea\u7528\u5176\u4e2d\u4e00\u4e2a\u8282\u70b9\u90e8\u7f72kibana&#xff0c;\u5176\u4ed6\u7684\u8282\u70b9\u53ea\u9700\u8981\u914d\u7f6ees\u65e2\u53ef\u4ee5<\/p>\n<p>version: &#039;3.8&#039;<br \/>\nservices:<br \/>\n  es:<br \/>\n    container_name: es-node1<br \/>\n    image: library\/elasticsearch:7.8.1<br \/>\n    restart: always<br \/>\n    environment:<br \/>\n      &#8211; &#034;ES_JAVA_OPTS&#061;-Xms1024m -Xmx1024m&#034;<br \/>\n      &#8211; &#034;TZ&#061;Asia\/Shanghai&#034;<br \/>\n    ulimits:<br \/>\n      memlock:<br \/>\n        soft: -1<br \/>\n        hard: -1<br \/>\n      nofile:<br \/>\n        soft: 65536<br \/>\n        hard: 65536<br \/>\n    ports:<br \/>\n      &#8211; &#034;9200:9200&#034;<br \/>\n      &#8211; &#034;9300:9300&#034;<br \/>\n    logging:<br \/>\n      driver: &#034;json-file&#034;<br \/>\n      options:<br \/>\n        max-size: &#034;50m&#034;<br \/>\n    volumes:<br \/>\n      &#8211; .\/es\/config\/elasticsearch.yml:\/usr\/share\/elasticsearch\/config\/elasticsearch.yml<br \/>\n      &#8211; .\/es\/plugins:\/usr\/share\/elasticsearch\/plugins<br \/>\n      &#8211; .\/es\/data:\/usr\/share\/elasticsearch\/data<br \/>\n      &#8211; .\/es\/log:\/usr\/share\/elasticsearch\/log<br \/>\n    networks:<br \/>\n      &#8211; elastic<\/p>\n<p>  kibana:<br \/>\n    container_name: kibana<br \/>\n    image: library\/kibana:7.8.1<br \/>\n    restart: always<br \/>\n    environment:<br \/>\n      &#8211; &#034;TZ&#061;Asia\/Shanghai&#034;<br \/>\n      &#8211; &#034;I18N_LOCALE&#061;zh-CN&#034;<br \/>\n    ports:<br \/>\n      &#8211; &#034;5601:5601&#034;<br \/>\n    volumes:<br \/>\n      &#8211; .\/kibana\/config\/kibana.yml:\/usr\/share\/kibana\/config\/kibana.yml<br \/>\n    depends_on:<br \/>\n      &#8211; es<br \/>\n    networks:<br \/>\n      &#8211; elastic<\/p>\n<p>networks:<br \/>\n  elastic:<br \/>\n    external: true<\/p>\n<p>\u5176\u4ed6es\u96c6\u7fa4\u8282\u70b9&#xff0c;\u53ea\u9700\u8981\u90e8\u7f72es\u5373\u53ef<\/p>\n<p>version: &#039;3.8&#039;<br \/>\nservices:<br \/>\n  es:<br \/>\n    container_name: es-node2<br \/>\n    image: library\/elasticsearch:7.8.1<br \/>\n    restart: always<br \/>\n    environment:<br \/>\n      &#8211; &#034;ES_JAVA_OPTS&#061;-Xms1024m -Xmx1024m&#034;<br \/>\n      &#8211; &#034;TZ&#061;Asia\/Shanghai&#034;<br \/>\n    ulimits:<br \/>\n      memlock:<br \/>\n        soft: -1<br \/>\n        hard: -1<br \/>\n      nofile:<br \/>\n        soft: 65536<br \/>\n        hard: 65536<br \/>\n    ports:<br \/>\n      &#8211; &#034;9200:9200&#034;<br \/>\n      &#8211; &#034;9300:9300&#034;<br \/>\n    logging:<br \/>\n      driver: &#034;json-file&#034;<br \/>\n      options:<br \/>\n        max-size: &#034;50m&#034;<br \/>\n    volumes:<br \/>\n      &#8211; .\/es\/config\/elasticsearch.yml:\/usr\/share\/elasticsearch\/config\/elasticsearch.yml<br \/>\n      &#8211; .\/es\/plugins:\/usr\/share\/elasticsearch\/plugins<br \/>\n      &#8211; .\/es\/data:\/usr\/share\/elasticsearch\/data<br \/>\n      &#8211; .\/es\/log:\/usr\/share\/elasticsearch\/log<\/p>\n<p>\u7f16\u8f91\u5b8c\u6210\u4e4b\u540e,\u542f\u52a8\u5bf9\u5e94\u7684\u670d\u52a1&#xff0c;\u786e\u5b9a\u670d\u52a1\u6b63\u5e38\u8fd0\u884c<\/p>\n<p>docker compose up -d<br \/>\ndocker ps -a<\/p>\n<h4>2.3 ES \u914d\u7f6e\u6587\u4ef6\u8be6\u89e3<\/h4>\n<p>\u5728\u6267\u884ccompose\u547d\u4ee4\u540e&#xff0c;\u4f1a\u5728\u672c\u5730\u76ee\u5f55\u6302\u8f7dyml\u6587\u4ef6&#xff0c;\u6211\u4eec\u9700\u8981\u4fee\u6539\u76f8\u5173\u7684\u914d\u7f6e\u4f7f\u670d\u52a1\u6309\u7167\u6211\u4eec\u7684\u9700\u8981\u8fd0\u884c&#xff0c;\u914d\u7f6e\u6587\u4ef6\u5728\/data\/project-es\/es\/config\/elasticsearch.yml&#xff0c;&#xff08;node-2\u3001node-3 \u9700\u76f8\u5e94\u8c03\u6574 node.name \u548c network.publish_host&#xff09;<\/p>\n<p># \u96c6\u7fa4\u540d\u79f0<br \/>\ncluster.name: elastic<br \/>\n# \u5f53\u524d\u8be5\u8282\u70b9\u7684\u540d\u79f0<br \/>\nnode.name: node-1<br \/>\n# \u662f\u5426\u6709\u8d44\u683c\u7ade\u9009\u4e3b\u8282\u70b9<br \/>\nnode.master: true<br \/>\n# \u662f\u5426\u5b58\u50a8\u6570\u636e<br \/>\nnode.data: true<br \/>\n# \u6700\u5927\u96c6\u7fa4\u8282\u70b9\u6570<br \/>\nnode.max_local_storage_nodes: 3<br \/>\n# \u6570\u636e\u5b58\u6863\u4f4d\u7f6e<br \/>\npath.data: \/usr\/share\/elasticsearch\/data<br \/>\n# \u65e5\u5fd7\u5b58\u653e\u4f4d\u7f6e<br \/>\npath.logs: \/usr\/share\/elasticsearch\/log<br \/>\n# \u76d1\u542c\u5730\u5740&#xff08;0.0.0.0 \u8868\u793a\u76d1\u542c\u6240\u6709\u7f51\u5361&#xff09;<br \/>\nnetwork.bind_host: 0.0.0.0<br \/>\n# \u53d1\u5e03\u5730\u5740&#xff08;\u4f9b\u5176\u4ed6\u8282\u70b9\u8bbf\u95ee&#xff09;<br \/>\nnetwork.publish_host: 10.1.1.1<br \/>\n# HTTP \u7aef\u53e3<br \/>\nhttp.port: 9200<br \/>\n# \u5185\u90e8\u8282\u70b9\u4e4b\u95f4\u6c9f\u901a\u7aef\u53e3<br \/>\ntransport.tcp.port: 9300<br \/>\n# \u5019\u9009\u4e3b\u8282\u70b9\u5730\u5740\u5217\u8868<br \/>\ndiscovery.seed_hosts: [&#034;10.1.1.1:9300&#034;,&#034;10.1.1.2:9300&#034;,&#034;10.1.1.3:9300&#034;]<br \/>\n# \u96c6\u7fa4\u542f\u52a8\u65f6\u53c2\u4e0e\u9009\u4e3b\u7684\u8282\u70b9\u5217\u8868<br \/>\ncluster.initial_master_nodes: [&#034;10.1.1.1:9300&#034;,&#034;10.1.1.2:9300&#034;,&#034;10.1.1.3:9300&#034;]<br \/>\n# \u96c6\u7fa4\u81f3\u5c11\u6062\u590d 1 \u4e2a\u8282\u70b9\u540e\u63d0\u4f9b\u670d\u52a1<br \/>\ngateway.recover_after_nodes: 1<br \/>\n# \u7981\u7528\u5b89\u5168\u914d\u7f6e<br \/>\nxpack.security.enabled: false<\/p>\n<table>\n<tr>\u914d\u7f6e\u9879\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>cluster.name<\/td>\n<td>\u96c6\u7fa4\u540d\u79f0&#xff0c;\u6240\u6709\u8282\u70b9\u5fc5\u987b\u4e00\u81f4<\/td>\n<\/tr>\n<tr>\n<td>node.name<\/td>\n<td>\u8282\u70b9\u552f\u4e00\u6807\u8bc6&#xff0c;\u6bcf\u4e2a\u8282\u70b9\u4e0d\u540c<\/td>\n<\/tr>\n<tr>\n<td>node.master<\/td>\n<td>\u662f\u5426\u5177\u5907\u4e3b\u8282\u70b9\u9009\u4e3e\u8d44\u683c<\/td>\n<\/tr>\n<tr>\n<td>node.data<\/td>\n<td>\u662f\u5426\u5b58\u50a8\u7d22\u5f15\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>discovery.seed_hosts<\/td>\n<td>\u96c6\u7fa4\u53d1\u73b0\u673a\u5236&#xff0c;\u7528\u4e8e\u8282\u70b9\u4e92\u76f8\u53d1\u73b0<\/td>\n<\/tr>\n<tr>\n<td>cluster.initial_master_nodes<\/td>\n<td>\u96c6\u7fa4\u521d\u59cb\u5316\u65f6\u7684\u5019\u9009\u4e3b\u8282\u70b9\u5217\u8868<\/td>\n<\/tr>\n<tr>\n<td>gateway.recover_after_nodes<\/td>\n<td>\u96c6\u7fa4\u6062\u590d\u65f6\u81f3\u5c11\u591a\u5c11\u8282\u70b9\u5728\u7ebf\u624d\u63d0\u4f9b\u670d\u52a1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9664\u4e86\u4e0a\u8ff0\u914d\u7f6e\u5916&#xff0c;Elasticsearch \u8fd8\u63d0\u4f9b\u5927\u91cf\u53ef\u8c03\u53c2\u6570\u3002<br \/>\n\u672c\u6587\u4ec5\u4ecb\u7ecd\u96c6\u7fa4\u90e8\u7f72\u8fc7\u7a0b\u4e2d\u5fc5\u987b\u914d\u7f6e\u7684\u5185\u5bb9&#xff0c;\u5176\u4f59\u53c2\u6570\u4fdd\u6301\u9ed8\u8ba4\u5373\u53ef&#xff0c;\u540e\u7eed\u53ef\u6839\u636e\u4e1a\u52a1\u89c4\u6a21\u548c\u6027\u80fd\u9700\u6c42\u9010\u6b65\u4f18\u5316\u3002<\/p>\n<h4>2.4 \u542f\u52a8\u96c6\u7fa4\u670d\u52a1<\/h4>\n<p>\u4f9d\u6b21\u4fee\u6539\u6bcf\u4e2a\u96c6\u7fa4\u670d\u52a1\u7684\u914d\u7f6e\u6587\u4ef6&#xff0c;\u786e\u5b9a\u5bf9\u5e94\u7684\u914d\u7f6e&#xff0c;\u7136\u540e\u91cd\u542f\u670d\u52a1<\/p>\n<p># \u521b\u5efa\u5916\u90e8\u7f51\u7edc&#xff08;\u4ec5\u9996\u6b21\u6267\u884c&#xff09;<br \/>\ndocker network create elastic<\/p>\n<p># \u542f\u52a8\u6240\u6709\u8282\u70b9&#xff08;\u5206\u522b\u5728\u5bf9\u5e94\u670d\u52a1\u5668\u6267\u884c&#xff09;<br \/>\ncd \/data\/project-es<br \/>\n# \u542f\u52a8\u670d\u52a1<br \/>\ndocker compose up -d<br \/>\n# \u91cd\u542f\u670d\u52a1<br \/>\ndocker compose restart<br \/>\n# \u9a8c\u8bc1\u96c6\u7fa4\u72b6\u6001 \u8bbf\u95ee\u7ad9\u70b9<br \/>\nhttp:\/\/10.1.1.1:9200\/_cluster\/health?pretty<\/p>\n<h3>3.Kibana \u670d\u52a1\u90e8\u7f72<\/h3>\n<h4>3.1 Kibana\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>\u4fee\u6539\u5bf9\u5e94\u7684\/data\/project-es\/kibana\/config\/kibana.yml\u914d\u7f6e\u6587\u4ef6&#xff0c;\u914d\u7f6e\u6309\u7167\u5b9e\u9645\u7684\u9700\u6c42\u8c03\u6574&#xff0c;\u6211\u6b64\u5904\u6ca1\u6709\u8bbe\u7f6expack\u7684\u5b89\u5168\u8bbe\u7f6e&#xff0c;\u5982\u6709\u9700\u8981\u53ef\u4ee5\u81ea\u884c\u5f00\u542f&#xff0c;\u4f7f\u7528\u8d26\u53f7\u5bc6\u7801\u8bbf\u95ee<\/p>\n<p># \u670d\u52a1\u76d1\u542c\u7aef\u53e3<br \/>\n# server.port: 5601<\/p>\n<p># \u76d1\u542c\u5730\u5740&#xff0c;0 \u8868\u793a\u6240\u6709\u7f51\u5361&#xff08;\u5141\u8bb8\u8fdc\u7a0b\u8bbf\u95ee&#xff09;<br \/>\nserver.host: &#034;0&#034;<\/p>\n<p># \u6700\u5927\u8bf7\u6c42\u4f53\u5927\u5c0f&#xff08;CSV\u5bfc\u51fa\u7b49\u573a\u666f\u9700\u8981\u8c03\u5927&#xff09;<br \/>\nserver.maxPayloadBytes: 524288000<\/p>\n<p># Kibana \u670d\u52a1\u540d\u79f0<br \/>\nserver.name: &#034;kibana&#034;<\/p>\n<p># Elasticsearch \u96c6\u7fa4\u5730\u5740\u5217\u8868<br \/>\nelasticsearch.hosts: [ &#034;http:\/\/10.1.1.1:9200&#034;,&#034;http:\/\/10.1.1.2:9200&#034;,&#034;http:\/\/10.1.1.3:9200&#034; ]<\/p>\n<p># CSV\u5bfc\u51fa\u6587\u4ef6\u5927\u5c0f\u4e0a\u9650&#xff08;200MB&#xff0c;\u9ed8\u8ba410MB&#xff09;<br \/>\nxpack.reporting.csv.maxSizeBytes: 209715200<\/p>\n<p># \u5bfc\u51fa\u4efb\u52a1\u8d85\u65f6\u65f6\u95f4&#xff08;30\u5206\u949f&#xff0c;\u9ed8\u8ba42\u5206\u949f&#xff09;<br \/>\nxpack.reporting.queue.timeout: 1800000<\/p>\n<p># \u754c\u9762\u8bed\u8a00&#xff08;\u4e2d\u6587&#xff09;<br \/>\ni18n.locale: &#034;zh-CN&#034;<\/p>\n<table>\n<tr>\u914d\u7f6e\u9879\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>server.host<\/td>\n<td>\u8bbe\u4e3a &#034;0&#034; \u8868\u793a\u76d1\u542c\u6240\u6709\u7f51\u7edc\u63a5\u53e3&#xff0c;\u5141\u8bb8\u8fdc\u7a0b\u8bbf\u95ee<\/td>\n<\/tr>\n<tr>\n<td>server.maxPayloadBytes<\/td>\n<td>\u8c03\u5927\u4ee5\u652f\u6301\u5927\u65e5\u5fd7\u5bfc\u51fa<\/td>\n<\/tr>\n<tr>\n<td>elasticsearch.hosts<\/td>\n<td>\u914d\u7f6eES\u96c6\u7fa4\u6240\u6709\u8282\u70b9\u5730\u5740&#xff0c;\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861<\/td>\n<\/tr>\n<tr>\n<td>xpack.reporting.csv.maxSizeBytes<\/td>\n<td>\u5bfc\u51faCSV\u6587\u4ef6\u5927\u5c0f\u4e0a\u9650&#xff0c;\u6839\u636e\u9700\u6c42\u8c03\u6574<\/td>\n<\/tr>\n<tr>\n<td>xpack.reporting.queue.timeout<\/td>\n<td>\u5bfc\u51fa\u4efb\u52a1\u8d85\u65f6\u65f6\u95f4&#xff0c;\u5927\u65e5\u5fd7\u5bfc\u51fa\u9700\u8981\u8c03\u5927<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>3.2 Kibana\u670d\u52a1\u542f\u52a8<\/h4>\n<p>cd \/data\/project-es<br \/>\n# \u542f\u52a8\u5bb9\u5668<br \/>\ndocker compose up -d kibana<br \/>\n# \u91cd\u542f\u670d\u52a1<br \/>\ndocker restart kibana<\/p>\n<h3>4. Logstash\u670d\u52a1\u90e8\u7f72<\/h3>\n<h4>4.1 \u670d\u52a1\u51c6\u5907<\/h4>\n<p>\u6b64\u5904\u7684\u4e24\u4e2a\u914d\u7f6e\u6587\u4ef6\u662f\u9700\u8981\u4fee\u6539\u7684&#xff0c;\u4f7f\u7528compose\u542f\u52a8\u4e4b\u540e\u4f1a\u81ea\u52a8\u521b\u5efa<\/p>\n<p>\/data\/project-logstash\/<br \/>\n\u251c\u2500\u2500 docker-compose.yml<br \/>\n\u2514\u2500\u2500 logstash\/<br \/>\n    \u251c\u2500\u2500 config\/<br \/>\n    \u2502   \u2514\u2500\u2500 logstash.yml<br \/>\n    \u2514\u2500\u2500 pipeline\/<br \/>\n        \u2514\u2500\u2500 logstash.conf<\/p>\n<h4>4.2 logstash compose<\/h4>\n<p>\u5728\u6307\u5b9a\u8def\u5f84\u4e0b\u7f16\u8f91docker-compose.yml\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>version: &#034;3.8&#034;<br \/>\nservices:<br \/>\n  logstash:<br \/>\n    container_name: logstash<br \/>\n    image: library\/logstash:7.8.1<br \/>\n    restart: always<br \/>\n    environment:<br \/>\n      &#8211; &#034;TZ&#061;Asia\/Shanghai&#034;<br \/>\n    volumes:<br \/>\n      &#8211; .\/logstash\/config\/:\/usr\/share\/logstash\/config<br \/>\n      &#8211; .\/logstash\/pipeline\/:\/usr\/share\/logstash\/pipeline<br \/>\n    ports:<br \/>\n      &#8211; 5044:5044<br \/>\n      &#8211; 9600:9600<\/p>\n<p>\u4fdd\u5b58\u540e\u542f\u52a8\u670d\u52a1<\/p>\n<p>cd \/data\/project-logstash<br \/>\ndocker compose up -d<\/p>\n<h4>4.3 logstash\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>logstash.yml \u5bf9\u63a5\u7684ES\u96c6\u7fa4&#xff0c;\u9009\u62e9\u4e00\u4e2a\u8282\u70b9\u5373\u53ef<\/p>\n<p>http.host: &#034;0.0.0.0&#034;<br \/>\nxpack.monitoring.elasticsearch.hosts: [ &#034;http:\/\/10.1.1.1:9200&#034; ]<\/p>\n<p>\u4f7f\u7528\u7684\u670d\u52a1\u5668IP\u4ee5\u53ca\u5bf9\u63a5\u7684ES\u670d\u52a1\u5668\u8282\u70b9<\/p>\n<p>input {<br \/>\n  beats {<br \/>\n    port &#061;&gt; 5044<br \/>\n  }<br \/>\n}<br \/>\noutput {<br \/>\n  elasticsearch {<br \/>\n    hosts &#061;&gt; [&#034;http:\/\/10.1.1.1:9200&#034;]<br \/>\n    index &#061;&gt; &#034;logs-write&#034;<br \/>\n  }<br \/>\n  stdout {<br \/>\n    codec &#061;&gt; rubydebug<br \/>\n  }<br \/>\n}<\/p>\n<table>\n<tr>\u914d\u7f6e\u9879\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>input.beats.port<\/td>\n<td>Filebeat \u8fde\u63a5\u7aef\u53e3&#xff08;\u9ed8\u8ba45044&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>output.elasticsearch.hosts<\/td>\n<td>ES\u96c6\u7fa4\u5730\u5740&#xff08;\u53ef\u914d\u7f6e\u591a\u4e2a&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>output.elasticsearch.index<\/td>\n<td>\u5199\u5165\u7684\u7d22\u5f15\u540d\u79f0&#xff0c;\u53ef\u6309\u4e1a\u52a1\u81ea\u5b9a\u4e49<\/td>\n<\/tr>\n<tr>\n<td>output.stdout<\/td>\n<td>\u63a7\u5236\u53f0\u8f93\u51fa&#xff0c;\u65b9\u4fbf\u8c03\u8bd5&#xff08;\u751f\u4ea7\u73af\u5883\u53ef\u79fb\u9664&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u751f\u4ea7\u73af\u5883\u5efa\u8bae&#xff1a;\u5728 filter \u6bb5\u6dfb\u52a0\u65e5\u5fd7\u89e3\u6790\u89c4\u5219&#xff08;\u5982 json \u6216 grok&#xff09;&#xff0c;\u5c06\u975e\u7ed3\u6784\u5316\u65e5\u5fd7\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u5b57\u6bb5&#xff0c;\u63d0\u5347\u68c0\u7d22\u6548\u7387\u3002<br \/>\n\u4f8b\u5982\u89e3\u6790 JSON \u65e5\u5fd7&#xff1a;<\/p>\n<p>filter <span class=\"token punctuation\">{<\/span><br \/>\n  json <span class=\"token punctuation\">{<\/span><br \/>\n    source <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token string-literal\"><span class=\"token string\">&#034;message&#034;<\/span><\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5982\u679c\u65e5\u5fd7\u4e3a\u666e\u901a\u6587\u672c\u683c\u5f0f&#xff0c;\u4e5f\u53ef\u4ee5\u4f7f\u7528 grok \u63d2\u4ef6\u63d0\u53d6\u5b57\u6bb5&#xff0c;\u5c06\u65e5\u5fd7\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u6570\u636e\u540e\u5199\u5165 Elasticsearch&#xff0c;\u65b9\u4fbf\u540e\u7eed\u6309\u5b57\u6bb5\u8fdb\u884c\u67e5\u8be2\u548c\u7edf\u8ba1\u3002<\/p>\n<p># \u91cd\u542f\u670d\u52a1<br \/>\ndocker restart logstash<\/p>\n<h3>5. \u670d\u52a1\u9a8c\u8bc1\u53ca\u95ee\u9898\u6392\u67e5<\/h3>\n<h4>5.1\u751f\u4ea7\u73af\u5883\u4f18\u5316\u5efa\u8bae<\/h4>\n<p>\u4e3a\u4e86\u4fdd\u8bc1\u65e5\u5fd7\u5e73\u53f0\u957f\u671f\u7a33\u5b9a\u8fd0\u884c&#xff0c;\u5efa\u8bae\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u8fdb\u884c\u4ee5\u4e0b\u4f18\u5316&#xff1a;<\/p>\n<ul>\n<li>Elasticsearch \u5806\u5185\u5b58\u5efa\u8bae\u8bbe\u7f6e\u4e3a\u7269\u7406\u5185\u5b58\u7684 50%&#xff0c;\u6700\u5927\u4e0d\u8d85\u8fc7 32GB\u3002<\/li>\n<li>\u5efa\u8bae\u542f\u7528 ILM&#xff08;Index Lifecycle Management&#xff09;\u81ea\u52a8\u7ba1\u7406\u65e5\u5fd7\u751f\u547d\u5468\u671f\u3002<\/li>\n<li>\u5b9a\u671f\u6e05\u7406\u65e0\u7528\u7d22\u5f15&#xff0c;\u907f\u514d\u78c1\u76d8\u5360\u6ee1\u3002<\/li>\n<li>Filebeat \u5efa\u8bae\u76f4\u63a5\u91c7\u96c6\u4e1a\u52a1\u65e5\u5fd7&#xff0c;\u4e0d\u5efa\u8bae\u91c7\u96c6\u4e34\u65f6\u6587\u4ef6\u3002<\/li>\n<li>Logstash \u5c3d\u91cf\u4fdd\u6301\u8fc7\u6ee4\u903b\u8f91\u7b80\u5355&#xff0c;\u590d\u6742\u89e3\u6790\u5efa\u8bae\u5728\u5e94\u7528\u4fa7\u5b8c\u6210\u3002<\/li>\n<li>Elasticsearch \u5efa\u8bae\u81f3\u5c11\u90e8\u7f72 3 \u4e2a\u8282\u70b9&#xff0c;\u907f\u514d\u5355\u70b9\u6545\u969c\u3002<\/li>\n<\/ul>\n<h4>5.2\u670d\u52a1\u9a8c\u8bc1<\/h4>\n<p>\u4f9d\u6b21\u8fdb\u884c\u8bbf\u95ee\u9a8c\u8bc1<\/p>\n<ul>\n<li>\n<p>\u9a8c\u8bc1 Elasticsearch \u96c6\u7fa4&#xff1a;\u8bbf\u95ee http:\/\/10.1.1.1:9200\/_cluster\/health?pretty&#xff0c;\u786e\u8ba4\u8282\u70b9\u6570\u4e3a3<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260803042506-6a701822013c0.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<\/li>\n<li>\n<p>\u9a8c\u8bc1 Kibana&#xff1a;\u8bbf\u95ee http:\/\/10.1.1.1:5601&#xff0c;\u786e\u8ba4\u80fd\u6b63\u5e38\u6253\u5f00<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260803042506-6a70182227010.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<\/li>\n<li>\n<p>\u9a8c\u8bc1 Logstash&#xff1a;docker logs logstash \u68c0\u67e5\u662f\u5426\u6709\u62a5\u9519<\/p>\n<\/li>\n<\/ul>\n<h4>5.3 \u95ee\u9898\u6392\u67e5<\/h4>\n<table>\n<tr>\u95ee\u9898\u73b0\u8c61\u53ef\u80fd\u539f\u56e0\u89e3\u51b3\u65b9\u6848<\/tr>\n<tbody>\n<tr>\n<td>ES\u8282\u70b9\u65e0\u6cd5\u52a0\u5165\u96c6\u7fa4<\/td>\n<td>discovery.seed_hosts \u914d\u7f6e\u4e0d\u6b63\u786e<\/td>\n<td>\u68c0\u67e5IP\u548c\u7aef\u53e3\u662f\u5426\u6b63\u786e&#xff0c;\u786e\u4fdd\u7f51\u7edc\u4e92\u901a<\/td>\n<\/tr>\n<tr>\n<td>Kibana\u65e0\u6cd5\u8fde\u63a5ES<\/td>\n<td>ES\u672a\u542f\u52a8\u6216\u5730\u5740\u914d\u7f6e\u9519\u8bef<\/td>\n<td>\u68c0\u67e5 elasticsearch.hosts \u914d\u7f6e&#xff0c;\u786e\u8ba4ES\u5df2\u542f\u52a8<\/td>\n<\/tr>\n<tr>\n<td>Logstash\u65e0\u6cd5\u63a5\u6536\u6570\u636e<\/td>\n<td>5044\u7aef\u53e3\u672a\u5f00\u653e<\/td>\n<td>\u68c0\u67e5\u9632\u706b\u5899\u548c ports \u6620\u5c04\u914d\u7f6e<\/td>\n<\/tr>\n<tr>\n<td>Kibana CSV\u5bfc\u51fa\u5931\u8d25<\/td>\n<td>\u8d85\u65f6\u65f6\u95f4\u6216\u6587\u4ef6\u5927\u5c0f\u9650\u5236<\/td>\n<td>\u8c03\u5927 xpack.reporting.queue.timeout \u548c maxSizeBytes<\/td>\n<\/tr>\n<tr>\n<td>ES\u5185\u5b58\u6ea2\u51fa<\/td>\n<td>\u5806\u5185\u5b58\u8fc7\u5927\u6216\u67e5\u8be2\u8fc7\u91cd<\/td>\n<td>\u8c03\u6574 ES_JAVA_OPTS&#xff0c;\u5efa\u8bae\u4e0d\u8d85\u8fc7\u7269\u7406\u5185\u5b58\u768450%<\/td>\n<\/tr>\n<tr>\n<td>\u5bb9\u5668\u65f6\u533a\u4e0d\u6b63\u786e<\/td>\n<td>\u672a\u8bbe\u7f6e TZ \u73af\u5883\u53d8\u91cf<\/td>\n<td>\u6dfb\u52a0 &#8211; &#034;TZ&#061;Asia\/Shanghai&#034; \u73af\u5883\u53d8\u91cf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>6. \u603b\u7ed3<\/h3>\n<p>\u81f3\u6b64&#xff0c;\u4e00\u4e2a\u57fa\u7840\u7684 ELK \u65e5\u5fd7\u5e73\u53f0\u5df2\u7ecf\u5b8c\u6210\u90e8\u7f72\u3002<\/p>\n<p>\u672c\u6587\u4e3b\u8981\u4ecb\u7ecd\u4e86 Elasticsearch \u96c6\u7fa4\u3001Kibana \u4ee5\u53ca Logstash \u7684\u90e8\u7f72\u8fc7\u7a0b&#xff0c;\u5e76\u7ed3\u5408\u751f\u4ea7\u73af\u5883\u914d\u7f6e\u8bf4\u660e\u4e86\u5404\u7ec4\u4ef6\u7684\u4f5c\u7528\u53ca\u76f8\u5173\u53c2\u6570\u914d\u7f6e\u3002<\/p>\n<p>\u4e0b\u4e00\u7bc7\u5c06\u4ecb\u7ecd Filebeat \u7684\u65e5\u5fd7\u91c7\u96c6\u914d\u7f6e&#xff0c;\u5305\u62ec\u65e5\u5fd7\u76ee\u5f55\u76d1\u63a7\u3001\u5b57\u6bb5\u8fc7\u6ee4\u3001\u591a\u4e1a\u52a1\u65e5\u5fd7\u5206\u7c7b\u4ee5\u53ca\u63a5\u5165 ELK \u5e73\u53f0\u7684\u65b9\u6cd5\u3002<\/p>\n<h3>7.\u540e\u7eed\u6587\u6863<\/h3>\n<p>\u672c\u6587\u4ecb\u7ecd\u4e86 ELK \u65e5\u5fd7\u5e73\u53f0\u7684\u5b8c\u6574\u90e8\u7f72\u6d41\u7a0b&#xff0c;\u4e4b\u524d\u6587\u6863\u5df2\u7ecf\u5b8c\u6210\u4e86ELK\u6574\u4f53\u67b6\u6784\u7684\u5185\u5bb9\u4ecb\u7ecd<\/p>\n<p>\u540e\u7eed\u6587\u6863\u5305\u62ec&#xff1a;<\/p>\n<table>\n<tr>\u6587\u6863\u5185\u5bb9<\/tr>\n<tbody>\n<tr>\n<td>\u65e5\u5fd7\u63a5\u5165\u6307\u5357<\/td>\n<td>Filebeat \u914d\u7f6e\u3001\u65e5\u5fd7\u63a5\u5165\u6d41\u7a0b<\/td>\n<\/tr>\n<tr>\n<td>\u65e5\u5fd7\u67e5\u8be2\u6307\u5357<\/td>\n<td>Elasticsearch API\u3001Kibana \u67e5\u8be2\u65b9\u6cd5<\/td>\n<\/tr>\n<tr>\n<td>ES Log Viewer \u5f00\u6e90\u9879\u76ee\u4f7f\u7528\u8bf4\u660e<\/td>\n<td>\u4f01\u4e1a\u5185\u90e8\u65e5\u5fd7\u67e5\u8be2\u5e73\u53f0\u4f7f\u7528\u65b9\u6cd5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5efa\u8bae\u6309\u7167\u4e0a\u8ff0\u987a\u5e8f\u9605\u8bfb&#xff0c;\u4ee5\u4fbf\u5b8c\u6574\u4e86\u89e3\u65e5\u5fd7\u5e73\u53f0\u7684\u90e8\u7f72\u53ca\u4f7f\u7528\u6d41\u7a0b\u3002<\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357<br \/>\n1. \u90e8\u7f72\u67b6\u6784\u4e0e\u89c4\u5212<br \/>\n\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u4e86 ELK \u65e5\u5fd7\u5e73\u53f0\u7684\u6574\u4f53\u67b6\u6784\u53ca\u6838\u5fc3\u7ec4\u4ef6&#xff0c;\u672c\u7bc7\u5f00\u59cb\u8fdb\u5165\u5b9e\u9645\u90e8\u7f72\u9636\u6bb5\u3002<br \/>\n\u672c\u6587\u57fa\u4e8e Docker Compose \u642d\u5efa\u4e00\u5957\u5b8c\u6574\u7684 ELK Stack&#xff0c;\u5305\u62ec Elasticsearch \u96c6\u7fa4\u3001Kibana \u53ef\u89c6\u5316\u5e73\u53f0\u4ee5\u53ca Logstash \u65e5\u5fd7\u5904\u7406\u670d\u52a1&#xff0c;\u9002\u5408\u4f5c\u4e3a\u4e2d\u5c0f\u578b\u751f\u4ea7\u73af\u5883\u6216\u6d4b\u8bd5\u73af\u5883\u7684\u90e8\u7f72\u53c2\u8003\u3002<br \/>\n1.1 \u67b6\u6784\u9009\u578b<br \/>\n\u91c7\u7528 FELK \u67b6\u6784&#xff0c;\u5373 Filebea<\/p>\n","protected":false},"author":2,"featured_media":89648,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1299,2296],"topic":[],"class_list":["post-89650","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-elasticsearch","tag-elk"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana - \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\/89650.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357 1. \u90e8\u7f72\u67b6\u6784\u4e0e\u89c4\u5212 \u4e0a\u4e00\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u4e86 ELK \u65e5\u5fd7\u5e73\u53f0\u7684\u6574\u4f53\u67b6\u6784\u53ca\u6838\u5fc3\u7ec4\u4ef6&#xff0c;\u672c\u7bc7\u5f00\u59cb\u8fdb\u5165\u5b9e\u9645\u90e8\u7f72\u9636\u6bb5\u3002 \u672c\u6587\u57fa\u4e8e Docker Compose \u642d\u5efa\u4e00\u5957\u5b8c\u6574\u7684 ELK Stack&#xff0c;\u5305\u62ec Elasticsearch \u96c6\u7fa4\u3001Kibana \u53ef\u89c6\u5316\u5e73\u53f0\u4ee5\u53ca Logstash \u65e5\u5fd7\u5904\u7406\u670d\u52a1&#xff0c;\u9002\u5408\u4f5c\u4e3a\u4e2d\u5c0f\u578b\u751f\u4ea7\u73af\u5883\u6216\u6d4b\u8bd5\u73af\u5883\u7684\u90e8\u7f72\u53c2\u8003\u3002 1.1 \u67b6\u6784\u9009\u578b \u91c7\u7528 FELK \u67b6\u6784&#xff0c;\u5373 Filebea\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/89650.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-03T04:25:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260803042506-6a701822013c0.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\/89650.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/89650.html\",\"name\":\"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-03T04:25:07+00:00\",\"dateModified\":\"2026-08-03T04:25:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/89650.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/89650.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/89650.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana\"}]},{\"@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":"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana - \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\/89650.html","og_locale":"zh_CN","og_type":"article","og_title":"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357 1. \u90e8\u7f72\u67b6\u6784\u4e0e\u89c4\u5212 \u4e0a\u4e00\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u4e86 ELK \u65e5\u5fd7\u5e73\u53f0\u7684\u6574\u4f53\u67b6\u6784\u53ca\u6838\u5fc3\u7ec4\u4ef6&#xff0c;\u672c\u7bc7\u5f00\u59cb\u8fdb\u5165\u5b9e\u9645\u90e8\u7f72\u9636\u6bb5\u3002 \u672c\u6587\u57fa\u4e8e Docker Compose \u642d\u5efa\u4e00\u5957\u5b8c\u6574\u7684 ELK Stack&#xff0c;\u5305\u62ec Elasticsearch \u96c6\u7fa4\u3001Kibana \u53ef\u89c6\u5316\u5e73\u53f0\u4ee5\u53ca Logstash \u65e5\u5fd7\u5904\u7406\u670d\u52a1&#xff0c;\u9002\u5408\u4f5c\u4e3a\u4e2d\u5c0f\u578b\u751f\u4ea7\u73af\u5883\u6216\u6d4b\u8bd5\u73af\u5883\u7684\u90e8\u7f72\u53c2\u8003\u3002 1.1 \u67b6\u6784\u9009\u578b \u91c7\u7528 FELK \u67b6\u6784&#xff0c;\u5373 Filebea","og_url":"https:\/\/www.wsisp.com\/helps\/89650.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-03T04:25:07+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260803042506-6a701822013c0.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\/89650.html","url":"https:\/\/www.wsisp.com\/helps\/89650.html","name":"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-03T04:25:07+00:00","dateModified":"2026-08-03T04:25:07+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/89650.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/89650.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/89650.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"ELK Stack\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6307\u5357\uff1aFilebeat + Elasticsearch + Logstash + Kibana"}]},{"@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\/89650","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=89650"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/89650\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/89648"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=89650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=89650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=89650"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=89650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}