{"id":31625,"date":"2025-04-21T23:10:57","date_gmt":"2025-04-21T15:10:57","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/31625.html"},"modified":"2025-04-21T23:10:57","modified_gmt":"2025-04-21T15:10:57","slug":"%e5%9f%ba%e4%ba%8e%e6%97%a5%e5%bf%97%e3%80%81%e9%94%99%e8%af%af%e5%91%8a%e8%ad%a6%e3%80%81%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%8a%b6%e6%80%81%e7%ad%89%e5%9c%ba%e6%99%af%e5%8c%96%e7%9a%84-%e6%a0%b9","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/31625.html","title":{"rendered":"\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316"},"content":{"rendered":"<h2>\u5e8f\u8a00<\/h2>\n<p>\u4ee5\u524d\u3002\u3002\u3002\u5f88\u4e45\u4ee5\u524d\uff08\u6709\u591a\u4e45\u3002\u3002\u3002\uff09\u3002\u3002\u3002\u5c313\u5e74\u524d\u800c\u5df2\u3002\u3002\u3002\uff08\u5618\u58f0\u4e00\u7247\u3002\u3002\u3002\uff09<\/p>\n<p>\u4ee5\u524d\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d\u5206\u6790\u7684\u65b9\u6848\u662f\u957f\u8fd9\u6837\u7684\uff1a<\/p>\n<h2>\u4ee5\u524d\u7684\u201c\u6839\u56e0\u201d\u5206\u6790\u662f\u957f\u4ec0\u4e48\u6837\u5b50\u7684\uff1f<\/h2>\n<hr>\n<h3>\u65b9\u6848\u4e00\uff1a\u57fa\u4e8e ELK Stack \u7684\u8f7b\u91cf\u7ea7\u6839\u56e0\u5206\u6790\u65b9\u6848<\/h3>\n<p>1. \u65b9\u6848\u6982\u8ff0:<\/p>\n<p>\u672c\u65b9\u6848\u91c7\u7528 Elasticsearch + Logstash + Kibana (ELK Stack) \u8fd9\u4e00\u7ecf\u5178\u7ec4\u5408\uff0c\u6784\u5efa\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u6839\u56e0\u5206\u6790\u7cfb\u7edf\u3002Logstash \u8d1f\u8d23\u6536\u96c6\u3001\u89e3\u6790\u548c\u8f6c\u6362\u6765\u81ea\u4e0d\u540c\u6765\u6e90\u7684\u65e5\u5fd7\u3001\u544a\u8b66\u548c\u670d\u52a1\u5668\u72b6\u6001\u6570\u636e\u3002Elasticsearch \u8d1f\u8d23\u5b58\u50a8\u548c\u7d22\u5f15\u8fd9\u4e9b\u6570\u636e\uff0c\u63d0\u4f9b\u5feb\u901f\u7684\u5168\u6587\u641c\u7d22\u548c\u805a\u5408\u5206\u6790\u80fd\u529b\u3002Kibana \u63d0\u4f9b\u6570\u636e\u53ef\u89c6\u5316\u548c\u4eea\u8868\u76d8\u529f\u80fd\uff0c\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u53d1\u73b0\u5f02\u5e38\u548c\u5b9a\u4f4d\u6839\u56e0\u3002<\/p>\n<p>2. \u6280\u672f\u6808\u9700\u6c42\u5206\u6790:<\/p>\n<ul>\n<li>Elasticsearch: 7.x \u6216 8.x \u7248\u672c (\u5efa\u8bae 8.x\uff0c\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u548c\u5b89\u5168\u6027)\u3002<\/li>\n<li>Logstash: 7.x \u6216 8.x \u7248\u672c (\u4e0e Elasticsearch \u7248\u672c\u4fdd\u6301\u4e00\u81f4)\u3002<\/li>\n<li>Kibana: 7.x \u6216 8.x \u7248\u672c (\u4e0e Elasticsearch \u7248\u672c\u4fdd\u6301\u4e00\u81f4)\u3002<\/li>\n<li>Filebeat\/Metricbeat (\u53ef\u9009): 7.x \u6216 8.x \u7248\u672c (\u7528\u4e8e\u8f7b\u91cf\u7ea7\u65e5\u5fd7\u548c\u6307\u6807\u6536\u96c6\uff0c\u53ef\u66ff\u4ee3 Logstash \u7684\u90e8\u5206\u529f\u80fd)\u3002<\/li>\n<li>\u64cd\u4f5c\u7cfb\u7edf: Linux (\u63a8\u8350 CentOS\u3001Ubuntu \u7b49\u4e3b\u6d41\u53d1\u884c\u7248)\u3002<\/li>\n<li>Java: OpenJDK 8 \u6216 11 (Elasticsearch \u548c Logstash \u9700\u8981 Java \u8fd0\u884c\u73af\u5883)\u3002<\/li>\n<li>Python (\u53ef\u9009): \u7528\u4e8e\u7f16\u5199\u81ea\u5b9a\u4e49\u811a\u672c\uff0c\u4f8b\u5982\u6570\u636e\u9884\u5904\u7406\u3001\u544a\u8b66\u901a\u77e5\u7b49\u3002<\/li>\n<\/ul>\n<p>3. \u673a\u5668\u914d\u7f6e\u5efa\u8bae\u4e0e\u8303\u56f4:<\/p>\n<ul>\n<li>\u5c0f\u578b\u573a\u666f (\u65e5\u5904\u7406GB\u7ea7\u6570\u636e):\n<ul>\n<li>CPU: 4 \u6838+<\/li>\n<li>\u5185\u5b58: 8GB+<\/li>\n<li>\u5b58\u50a8: 500GB+ SSD (\u5efa\u8bae\u4f7f\u7528 SSD\uff0c\u63d0\u9ad8 Elasticsearch \u7684\u7d22\u5f15\u548c\u641c\u7d22\u6027\u80fd)<\/li>\n<li>\u7f51\u7edc: \u5343\u5146\u4ee5\u592a\u7f51<\/li>\n<\/ul>\n<\/li>\n<li>\u4e2d\u578b\u573a\u666f (\u65e5\u5904\u7406TB\u7ea7\u6570\u636e):\n<ul>\n<li>CPU: 8 \u6838+<\/li>\n<li>\u5185\u5b58: 16GB+<\/li>\n<li>\u5b58\u50a8: 1TB+ SSD<\/li>\n<li>\u7f51\u7edc: \u4e07\u5146\u4ee5\u592a\u7f51<\/li>\n<\/ul>\n<\/li>\n<li>\u5927\u578b\u573a\u666f (\u65e5\u5904\u7406PB\u7ea7\u6570\u636e):\n<ul>\n<li>\u91c7\u7528 Elasticsearch \u96c6\u7fa4\u90e8\u7f72\uff0c\u591a\u8282\u70b9\u5206\u644a\u8d1f\u8f7d\u3002<\/li>\n<li>\u6bcf\u4e2a\u8282\u70b9\u914d\u7f6e:\n<ul>\n<li>CPU: 16 \u6838+<\/li>\n<li>\u5185\u5b58: 32GB+<\/li>\n<li>\u5b58\u50a8: 2TB+ SSD<\/li>\n<li>\u7f51\u7edc: \u4e07\u5146\u4ee5\u592a\u7f51<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u6ce8\u610f: Elasticsearch \u5bf9\u5185\u5b58\u548c\u5b58\u50a8 I\/O \u6027\u80fd\u8981\u6c42\u8f83\u9ad8\uff0c\u5efa\u8bae\u4f7f\u7528 SSD \u5b58\u50a8\u3002<\/p>\n<p>4. \u6781\u5176\u8be6\u7ec6\u7684\u90e8\u7f72\u6b65\u9aa4 (\u5305\u542b\u53ef\u8fd0\u884c\u7684\u793a\u4f8b\u4ee3\u7801):<\/p>\n<p>(1) \u73af\u5883\u51c6\u5907:<\/p>\n<p><span class=\"token comment\"># \u4ee5 CentOS 7 \u4e3a\u4f8b<\/span><br \/>\n<span class=\"token comment\"># \u5b89\u88c5 Java<\/span><br \/>\n<span class=\"token function\">sudo<\/span> yum <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-y<\/span> java-1.8.0-openjdk-devel<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e JAVA_HOME \u73af\u5883\u53d8\u91cf<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">\\&#8221;export JAVA_HOME=\/usr\/lib\/jvm\/java-1.8.0-openjdk\\&#8221;<\/span> <span class=\"token operator\">&gt;&gt;<\/span> ~\/.bashrc<br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">\\&#8221;export PATH=<span class=\"token variable\">$JAVA_HOME<\/span>\/bin:<span class=\"token environment constant\">$PATH<\/span>\\&#8221;<\/span> <span class=\"token operator\">&gt;&gt;<\/span> ~\/.bashrc<br \/>\n<span class=\"token builtin class-name\">source<\/span> ~\/.bashrc<\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1 Java \u5b89\u88c5<\/span><br \/>\n<span class=\"token function\">java<\/span> <span class=\"token parameter variable\">-version<\/span><\/p>\n<p>(2) Elasticsearch \u5b89\u88c5\u548c\u914d\u7f6e:<\/p>\n<p><span class=\"token comment\"># \u4e0b\u8f7d Elasticsearch \u5b89\u88c5\u5305 (\u4ee5 8.x \u7248\u672c\u4e3a\u4f8b)<\/span><br \/>\n<span class=\"token function\">wget<\/span> https:\/\/artifacts.elastic.co\/downloads\/elasticsearch\/elasticsearch-8.x.x-linux-x86_64.tar.gz<\/p>\n<p><span class=\"token comment\"># \u89e3\u538b\u5b89\u88c5\u5305<\/span><br \/>\n<span class=\"token function\">tar<\/span> <span class=\"token parameter variable\">-xzf<\/span> elasticsearch-8.x.x-linux-x86_64.tar.gz<br \/>\n<span class=\"token builtin class-name\">cd<\/span> elasticsearch-8.x.x<\/p>\n<p><span class=\"token comment\"># \u4fee\u6539\u914d\u7f6e\u6587\u4ef6 (config\/elasticsearch.yml)<\/span><br \/>\n<span class=\"token comment\"># \u5173\u952e\u914d\u7f6e\u53c2\u6570\u89e3\u91ca:<\/span><br \/>\n<span class=\"token comment\"># cluster.name: my-cluster  # \u96c6\u7fa4\u540d\u79f0<\/span><br \/>\n<span class=\"token comment\"># node.name: node-1        # \u8282\u70b9\u540d\u79f0<\/span><br \/>\n<span class=\"token comment\"># network.host: 0.0.0.0     # \u76d1\u542c\u5730\u5740 (0.0.0.0 \u8868\u793a\u76d1\u542c\u6240\u6709\u63a5\u53e3)<\/span><br \/>\n<span class=\"token comment\"># http.port: 9200           # HTTP \u7aef\u53e3<\/span><br \/>\n<span class=\"token comment\"># discovery.seed_hosts: [\\&#8221;host1\\&#8221;, \\&#8221;host2\\&#8221;]  # \u96c6\u7fa4\u53d1\u73b0 (\u591a\u8282\u70b9\u90e8\u7f72\u65f6\u914d\u7f6e)<\/span><br \/>\n<span class=\"token comment\"># cluster.initial_master_nodes: [\\&#8221;node-1\\&#8221;]  # \u521d\u59cb\u4e3b\u8282\u70b9 (\u591a\u8282\u70b9\u90e8\u7f72\u65f6\u914d\u7f6e)<\/span><\/p>\n<p><span class=\"token comment\"># \u542f\u52a8 Elasticsearch<\/span><br \/>\n.\/bin\/elasticsearch<br \/>\n<span class=\"token comment\">#elasticsearch -d \u540e\u53f0\u8fd0\u884c<\/span><\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1 Elasticsearch \u542f\u52a8<\/span><br \/>\n<span class=\"token function\">curl<\/span> http:\/\/localhost:9200<\/p>\n<p>(3) Logstash \u5b89\u88c5\u548c\u914d\u7f6e:<\/p>\n<p><span class=\"token comment\"># \u4e0b\u8f7d Logstash \u5b89\u88c5\u5305 (\u4ee5 8.x \u7248\u672c\u4e3a\u4f8b)<\/span><br \/>\n<span class=\"token function\">wget<\/span> https:\/\/artifacts.elastic.co\/downloads\/logstash\/logstash-8.x.x-linux-x86_64.tar.gz<\/p>\n<p><span class=\"token comment\"># \u89e3\u538b\u5b89\u88c5\u5305<\/span><br \/>\n<span class=\"token function\">tar<\/span> <span class=\"token parameter variable\">-xzf<\/span> logstash-8.x.x-linux-x86_64.tar.gz<br \/>\n<span class=\"token builtin class-name\">cd<\/span> logstash-8.x.x<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa Logstash \u914d\u7f6e\u6587\u4ef6 (config\/logstash.conf)<\/span><br \/>\n<span class=\"token comment\"># \u793a\u4f8b\u914d\u7f6e\u6587\u4ef6 (\u4ece\u6807\u51c6\u8f93\u5165\u8bfb\u53d6\u6570\u636e\uff0c\u8f93\u51fa\u5230 Elasticsearch):<\/span><br \/>\ninput <span class=\"token punctuation\">{<br \/>\n   <\/span><br \/>\n  stdin <span class=\"token punctuation\">{<br \/>\n   <\/span> <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>filter <span class=\"token punctuation\">{<br \/>\n   <\/span><br \/>\n  <span class=\"token comment\"># \u5728\u8fd9\u91cc\u6dfb\u52a0\u6570\u636e\u89e3\u6790\u548c\u8f6c\u6362\u89c4\u5219 (\u4f8b\u5982\uff0c\u4f7f\u7528 grok \u63d2\u4ef6\u89e3\u6790\u65e5\u5fd7)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>output <span class=\"token punctuation\">{<br \/>\n   <\/span><br \/>\n  elasticsearch <span class=\"token punctuation\">{<br \/>\n   <\/span><br \/>\n    hosts <span class=\"token operator\">=<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">\\&#8221;http:\/\/localhost:9200\\&#8221;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    index <span class=\"token operator\">=<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token string\">\\&#8221;my-index-%{+YYYY.MM.dd}\\&#8221;<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u542f\u52a8 Logstash<\/span><br \/>\n.\/bin\/logstash <span class=\"token parameter variable\">-f<\/span> config\/logstash.conf<\/p>\n<p>(4) Kibana \u5b89\u88c5\u548c\u914d\u7f6e:<\/p>\n<p><span class=\"token comment\"># \u4e0b\u8f7d Kibana \u5b89\u88c5\u5305 (\u4ee5 8.x \u7248\u672c\u4e3a\u4f8b)<\/span><br \/>\n<span class=\"token function\">wget<\/span> https:\/\/artifacts.elastic.co\/downloads\/kibana\/kibana-8.x.x-linux-x86_64.tar.gz<\/p>\n<p><span class=\"token comment\"># \u89e3\u538b\u5b89\u88c5\u5305<\/span><br \/>\n<span class=\"token function\">tar<\/span> <span class=\"token parameter variable\">-xzf<\/span> kibana-8.x.x-linux-x86_64.tar.gz<br \/>\n<span class=\"token builtin class-name\">cd<\/span> kibana-8.x.x<\/p>\n<p><span class=\"token comment\"># \u4fee\u6539\u914d\u7f6e\u6587\u4ef6 (config\/kibana.yml)<\/span><br \/>\n<span class=\"token comment\"># \u5173\u952e\u914d\u7f6e\u53c2\u6570\u89e3\u91ca:<\/span><br \/>\n<span class=\"token comment\"># server.port: 5601         # Kibana \u76d1\u542c\u7aef\u53e3<\/span><br \/>\n<span class=\"token comment\"># server.host: \\&#8221;0.0.0.0\\&#8221;     # \u76d1\u542c\u5730\u5740 (0.0.0.0 \u8868\u793a\u76d1\u542c\u6240\u6709\u63a5\u53e3)<\/span><br \/>\n<span class=\"token comment\"># elasticsearch.hosts: [\\&#8221;http:\/\/localhost:9200\\&#8221;]  # Elasticsearch \u5730\u5740<\/span><\/p>\n<p><span class=\"token comment\"># \u542f\u52a8 Kibana<\/span><br \/>\n.\/bin\/kibana<\/p>\n<p><span class=\"token comment\"># \u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee Kibana (http:\/\/&lt;\u670d\u52a1\u5668IP&gt;:5601)<\/span><\/p>\n<p>(5) \u6570\u636e\u6536\u96c6\u3001\u89e3\u6790\u548c\u7d22\u5f15:<\/p>\n<ul>\n<li>\u65e5\u5fd7\u6536\u96c6:\n<ul>\n<li>\u4f7f\u7528 Logstash \u7684 file input \u63d2\u4ef6\u8bfb\u53d6\u65e5\u5fd7\u6587\u4ef6\u3002<\/li>\n<li>\u4f7f\u7528 Filebeat \u8f7b\u91cf\u7ea7\u4ee3\u7406\u6536\u96c6\u65e5\u5fd7\u6587\u4ef6\uff0c\u53d1\u9001\u5230 Logstash \u6216 Elasticsearch\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u544a\u8b66\u6536\u96c6:\n<ul>\n<li>\u5bf9\u63a5\u544a\u8b66\u7cfb\u7edf (\u4f8b\u5982 Zabbix\u3001Prometheus) \u7684 API\uff0c\u83b7\u53d6\u544a\u8b66\u6570\u636e\u3002<\/li>\n<li>\u4f7f\u7528 Logstash \u7684 http_poller input \u63d2\u4ef6\u5b9a\u671f\u8f6e\u8be2\u544a\u8b66 API\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u670d\u52a1\u5668\u72b6\u6001\u6536\u96c6:\n<ul>\n<li>\u4f7f\u7528 Metricbeat \u6536\u96c6\u670d\u52a1\u5668\u7684 CPU\u3001\u5185\u5b58\u3001\u78c1\u76d8\u3001\u7f51\u7edc\u7b49\u6307\u6807\u3002<\/li>\n<li>\u4f7f\u7528 Logstash \u7684 beats input \u63d2\u4ef6\u63a5\u6536 Metricbeat \u53d1\u9001\u7684\u6570\u636e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u6570\u636e\u89e3\u6790:\n<ul>\n<li>\u4f7f\u7528 Logstash \u7684 grok \u63d2\u4ef6\u89e3\u6790\u975e\u7ed3\u6784\u5316\u65e5\u5fd7\u3002<\/li>\n<li>\u4f7f\u7528 Logstash \u7684 json \u63d2\u4ef6\u89e3\u6790 JSON \u683c\u5f0f\u7684\u65e5\u5fd7\u3002<\/li>\n<li>\u4f7f\u7528 Logstash \u7684 kv \u63d2\u4ef6\u89e3\u6790\u952e\u503c\u5bf9\u683c\u5f0f\u7684\u65e5\u5fd7\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u6570\u636e\u7d22\u5f15:\n<ul>\n<li>Logstash \u5c06\u89e3\u6790\u540e\u7684\u6570\u636e\u53d1\u9001\u5230 Elasticsearch\uff0c\u6839\u636e\u914d\u7f6e\u7684\u7d22\u5f15\u6a21\u677f\u8fdb\u884c\u7d22\u5f15\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>(6) \u6839\u56e0\u5206\u6790\u793a\u4f8b (Kibana):<\/p>\n<ul>\n<li>\u521b\u5efa\u4eea\u8868\u76d8: \u5728 Kibana \u4e2d\u521b\u5efa\u81ea\u5b9a\u4e49\u4eea\u8868\u76d8\uff0c\u5c06\u5173\u952e\u6307\u6807 (\u4f8b\u5982\u9519\u8bef\u65e5\u5fd7\u6570\u91cf\u3001CPU \u4f7f\u7528\u7387\u3001\u5185\u5b58\u4f7f\u7528\u7387\u7b49) \u4ee5\u56fe\u8868\u5f62\u5f0f\u5c55\u793a\u3002<\/li>\n<li>\u641c\u7d22\u548c\u8fc7\u6ee4: \u4f7f\u7528 Kibana \u7684\u641c\u7d22\u680f\uff0c\u6839\u636e\u5173\u952e\u8bcd\u3001\u65f6\u95f4\u8303\u56f4\u3001\u5b57\u6bb5\u7b49\u6761\u4ef6\u8fc7\u6ee4\u6570\u636e\uff0c\u5feb\u901f\u5b9a\u4f4d\u5f02\u5e38\u4e8b\u4ef6\u3002<\/li>\n<li>\u805a\u5408\u5206\u6790: \u4f7f\u7528 Kibana \u7684\u805a\u5408\u529f\u80fd\uff0c\u5bf9\u6570\u636e\u8fdb\u884c\u7edf\u8ba1\u5206\u6790\uff0c\u4f8b\u5982\u8ba1\u7b97\u9519\u8bef\u65e5\u5fd7\u7684\u5e73\u5747\u53d1\u751f\u9891\u7387\u3001Top N \u9519\u8bef\u7c7b\u578b\u7b49\u3002<\/li>\n<li>\u5173\u8054\u5206\u6790: \u901a\u8fc7 Kibana \u7684\u5173\u8054\u5206\u6790\u529f\u80fd\uff0c\u5c06\u4e0d\u540c\u6765\u6e90\u7684\u6570\u636e (\u4f8b\u5982\u65e5\u5fd7\u3001\u544a\u8b66\u3001\u6307\u6807) \u5173\u8054\u8d77\u6765\uff0c\u5206\u6790\u5b83\u4eec\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u4f8b\u5982\u67d0\u4e2a\u544a\u8b66\u662f\u5426\u4e0e\u67d0\u4e2a\u9519\u8bef\u65e5\u5fd7\u76f8\u5173\u8054\u3002<\/li>\n<li>\u5229\u7528\u673a\u5668\u5b66\u4e60\uff1a Kibana 8 \u5f00\u59cb\u63d0\u4f9b\u673a\u5668\u5b66\u4e60\u7684\u5f02\u5e38\u68c0\u6d4b\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p>5. \u65b9\u6848\u539f\u7406\u5206\u6790:<\/p>\n<ul>\n<li>\u6570\u636e\u6d41: \u65e5\u5fd7\u3001\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u6570\u636e -&gt; Logstash (\u6216 Filebeat\/Metricbeat) -&gt; Elasticsearch -&gt; Kibana\u3002<\/li>\n<li>Logstash: \u8d1f\u8d23\u6570\u636e\u6536\u96c6\u3001\u89e3\u6790\u3001\u8f6c\u6362\u548c\u8f93\u51fa\u3002<\/li>\n<li>Elasticsearch: \u8d1f\u8d23\u6570\u636e\u5b58\u50a8\u3001\u7d22\u5f15\u548c\u641c\u7d22\uff0c\u63d0\u4f9b\u5168\u6587\u641c\u7d22\u548c\u805a\u5408\u5206\u6790\u80fd\u529b\u3002<\/li>\n<li>Kibana: \u8d1f\u8d23\u6570\u636e\u53ef\u89c6\u5316\u548c\u4eea\u8868\u76d8\uff0c\u63d0\u4f9b\u4ea4\u4e92\u5f0f\u6570\u636e\u63a2\u7d22\u548c\u5206\u6790\u754c\u9762\u3002<\/li>\n<\/ul>\n<p>6. \u65b9\u6848\u4f18\u70b9\u5206\u6790:<\/p>\n<ul>\n<li>\u6210\u719f\u7a33\u5b9a: ELK Stack \u662f\u4e1a\u754c\u5e7f\u6cdb\u4f7f\u7528\u7684\u65e5\u5fd7\u5206\u6790\u89e3\u51b3\u65b9\u6848\uff0c\u7ecf\u8fc7\u5927\u91cf\u5b9e\u8df5\u9a8c\u8bc1\uff0c\u6210\u719f\u7a33\u5b9a\u3002<\/li>\n<li>\u5f00\u6e90\u514d\u8d39: ELK Stack \u7684\u6838\u5fc3\u7ec4\u4ef6\u90fd\u662f\u5f00\u6e90\u514d\u8d39\u7684\uff0c\u53ef\u4ee5\u964d\u4f4e\u90e8\u7f72\u6210\u672c\u3002<\/li>\n<li>\u6613\u4e8e\u4e0a\u624b: ELK Stack \u7684\u5b89\u88c5\u914d\u7f6e\u76f8\u5bf9\u7b80\u5355\uff0c\u6709\u4e30\u5bcc\u7684\u6587\u6863\u548c\u793e\u533a\u652f\u6301\u3002<\/li>\n<li>\u53ef\u6269\u5c55\u6027\u597d: Elasticsearch \u652f\u6301\u96c6\u7fa4\u90e8\u7f72\uff0c\u53ef\u4ee5\u6c34\u5e73\u6269\u5c55\uff0c\u5904\u7406\u6d77\u91cf\u6570\u636e\u3002<\/li>\n<li>\u529f\u80fd\u5f3a\u5927: Elasticsearch \u63d0\u4f9b\u5f3a\u5927\u7684\u5168\u6587\u641c\u7d22\u548c\u805a\u5408\u5206\u6790\u80fd\u529b\uff0cKibana \u63d0\u4f9b\u4e30\u5bcc\u7684\u6570\u636e\u53ef\u89c6\u5316\u548c\u4eea\u8868\u76d8\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p>7. \u65b9\u6848\u7f3a\u70b9\u5206\u6790:<\/p>\n<ul>\n<li>\u8d44\u6e90\u6d88\u8017: ELK Stack \u5bf9\u786c\u4ef6\u8d44\u6e90 (\u7279\u522b\u662f\u5185\u5b58\u548c\u5b58\u50a8) \u6709\u4e00\u5b9a\u8981\u6c42\uff0c\u5bf9\u4e8e\u5927\u89c4\u6a21\u6570\u636e\uff0c\u9700\u8981\u8f83\u9ad8\u7684\u786c\u4ef6\u914d\u7f6e\u3002<\/li>\n<li>\u590d\u6742\u6027: \u5bf9\u4e8e\u590d\u6742\u7684\u65e5\u5fd7\u89e3\u6790\u548c\u6570\u636e\u8f6c\u6362\uff0c\u9700\u8981\u7f16\u5199 Logstash \u914d\u7f6e\u6587\u4ef6\uff0c\u6709\u4e00\u5b9a\u7684\u5b66\u4e60\u6210\u672c\u3002<\/li>\n<li>\u5b9e\u65f6\u6027: ELK Stack \u7684\u6570\u636e\u5904\u7406\u901a\u5e38\u662f\u51c6\u5b9e\u65f6\u7684\uff0c\u5bf9\u4e8e\u5b9e\u65f6\u6027\u8981\u6c42\u6781\u9ad8\u7684\u573a\u666f\u53ef\u80fd\u4e0d\u9002\u7528\u3002<\/li>\n<\/ul>\n<p>8. \u5e94\u7528\u573a\u666f\u5206\u6790:<\/p>\n<ul>\n<li>\u9002\u7528\u573a\u666f:\n<ul>\n<li>\u4e2d\u5c0f\u578b\u89c4\u6a21\u7684\u65e5\u5fd7\u5206\u6790\u3001\u544a\u8b66\u5206\u6790\u548c\u670d\u52a1\u5668\u72b6\u6001\u76d1\u63a7\u3002<\/li>\n<li>\u5bf9\u5b9e\u65f6\u6027\u8981\u6c42\u4e0d\u9ad8\u7684\u573a\u666f\u3002<\/li>\n<li>\u9700\u8981\u5feb\u901f\u642d\u5efa\u539f\u578b\u9a8c\u8bc1\u7684\u573a\u666f\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u4e0d\u9002\u7528\u573a\u666f:\n<ul>\n<li>\u8d85\u5927\u89c4\u6a21\u6570\u636e (PB \u7ea7\u4ee5\u4e0a)\uff0c\u9700\u8981\u66f4\u4e13\u4e1a\u7684\u5206\u5e03\u5f0f\u65e5\u5fd7\u7cfb\u7edf\u3002<\/li>\n<li>\u5bf9\u5b9e\u65f6\u6027\u8981\u6c42\u6781\u9ad8\u7684\u573a\u666f (\u4f8b\u5982\u6beb\u79d2\u7ea7\u54cd\u5e94)\u3002<\/li>\n<li>\u9700\u8981\u590d\u6742\u673a\u5668\u5b66\u4e60\u6a21\u578b\u8fdb\u884c\u6839\u56e0\u5206\u6790\u7684\u573a\u666f\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr>\n<h3>\u65b9\u6848\u4e8c\uff1a\u57fa\u4e8e Loki + Grafana + Prometheus \u7684\u8f7b\u91cf\u7ea7\u6839\u56e0\u5206\u6790\u65b9\u6848<\/h3>\n<p>1. \u65b9\u6848\u6982\u8ff0\uff1a<\/p>\n<p>\u672c\u65b9\u6848\u91c7\u7528 Loki\u3001Grafana \u548c Prometheus \u8fd9\u4e09\u4e2a\u5f00\u6e90\u5de5\u5177\u6784\u5efa\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u6839\u56e0\u5206\u6790\u7cfb\u7edf\u3002Prometheus \u8d1f\u8d23\u6536\u96c6\u670d\u52a1\u5668\u548c\u5e94\u7528\u7a0b\u5e8f\u7684\u6307\u6807\u6570\u636e\uff0cGrafana \u8d1f\u8d23\u53ef\u89c6\u5316\u5c55\u793a\uff0cLoki \u8d1f\u8d23\u65e5\u5fd7\u7684\u805a\u5408\u548c\u67e5\u8be2\u3002\u6b64\u65b9\u6848\u7279\u522b\u9002\u5408\u4e8e\u5bb9\u5668\u5316\u73af\u5883\uff08\u5982 Kubernetes\uff09\u7684\u76d1\u63a7\u548c\u65e5\u5fd7\u7ba1\u7406\u3002<\/p>\n<p>2. \u6280\u672f\u6808\u9700\u6c42\u5206\u6790\uff1a<\/p>\n<ul>\n<li>Loki: 2.x \u7248\u672c\u53ca\u4ee5\u4e0a\uff08\u8f7b\u91cf\u7ea7\u65e5\u5fd7\u805a\u5408\u7cfb\u7edf\uff09<\/li>\n<li>Grafana: 7.x \u6216 8.x \u7248\u672c\uff08\u6570\u636e\u53ef\u89c6\u5316\u548c\u4eea\u8868\u76d8\uff09<\/li>\n<li>Prometheus: 2.x \u7248\u672c\u53ca\u4ee5\u4e0a\uff08\u6307\u6807\u76d1\u63a7\u7cfb\u7edf\uff09<\/li>\n<li>Promtail (\u53ef\u9009): 2.x \u7248\u672c\u53ca\u4ee5\u4e0a (Loki \u7684\u65e5\u5fd7\u6536\u96c6\u4ee3\u7406\uff0c\u7c7b\u4f3c\u4e8e Logstash)<\/li>\n<li>\u64cd\u4f5c\u7cfb\u7edf: Linux (\u63a8\u8350 CentOS\u3001Ubuntu \u7b49\u4e3b\u6d41\u53d1\u884c\u7248)<\/li>\n<li>\u5bb9\u5668\u5316\u73af\u5883 (\u53ef\u9009): Docker, Kubernetes<\/li>\n<\/ul>\n<p>3. \u673a\u5668\u914d\u7f6e\u5efa\u8bae\u4e0e\u8303\u56f4\uff1a<\/p>\n<ul>\n<li>\u5c0f\u578b\u573a\u666f (\u65e5\u5904\u7406GB\u7ea7\u6570\u636e):\n<ul>\n<li>CPU: 2 \u6838+<\/li>\n<li>\u5185\u5b58: 4GB+<\/li>\n<li>\u5b58\u50a8: 100GB+ (Loki \u5bf9\u5b58\u50a8\u8981\u6c42\u76f8\u5bf9\u8f83\u4f4e\uff0c\u4f46\u5efa\u8bae\u4f7f\u7528 SSD)<\/li>\n<li>\u7f51\u7edc: \u5343\u5146\u4ee5\u592a\u7f51<\/li>\n<\/ul>\n<\/li>\n<li>\u4e2d\u578b\u573a\u666f (\u65e5\u5904\u7406TB\u7ea7\u6570\u636e):\n<ul>\n<li>CPU: 4 \u6838+<\/li>\n<li>\u5185\u5b58: 8GB+<\/li>\n<li>\u5b58\u50a8: 500GB+ SSD<\/li>\n<li>\u7f51\u7edc: \u4e07\u5146\u4ee5\u592a\u7f51<\/li>\n<\/ul>\n<\/li>\n<li>\u5927\u578b\u573a\u666f (\u65e5\u5904\u7406PB\u7ea7\u6570\u636e):\n<ul>\n<li>\u91c7\u7528 Loki \u548c Prometheus \u7684\u5206\u5e03\u5f0f\u90e8\u7f72\uff0c\u591a\u8282\u70b9\u5206\u644a\u8d1f\u8f7d\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>4. \u6781\u5176\u8be6\u7ec6\u7684\u90e8\u7f72\u6b65\u9aa4 (\u5305\u542b\u53ef\u8fd0\u884c\u7684\u793a\u4f8b\u4ee3\u7801):<\/p>\n<p>(1) \u73af\u5883\u51c6\u5907:<\/p>\n<p><span class=\"token comment\"># \u4ee5 CentOS 7 \u4e3a\u4f8b, \u5047\u8bbe\u5df2\u5b89\u88c5 Docker \u548c Docker Compose<\/span><\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> loki-grafana-prometheus<br \/>\n<span class=\"token builtin class-name\">cd<\/span> loki-grafana-prometheus<\/p>\n<p>(2) Prometheus \u5b89\u88c5\u548c\u914d\u7f6e:<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa prometheus.yml \u914d\u7f6e\u6587\u4ef6<\/span><br \/>\ncat &lt;&lt;EOF <span class=\"token punctuation\">&gt;<\/span> prometheus.yml<br \/>\n<span class=\"token key atrule\">global<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">scrape_interval<\/span><span class=\"token punctuation\">:<\/span>     15s<br \/>\n  <span class=\"token key atrule\">evaluation_interval<\/span><span class=\"token punctuation\">:<\/span> 15s<\/p>\n<p><span class=\"token key atrule\">scrape_configs<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">job_name<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">\\&#8217;prometheus\\&#8217;<\/span><br \/>\n    <span class=\"token key atrule\">static_configs<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">targets<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">\\&#8217;localhost:9090\\&#8217;<\/span><span class=\"token punctuation\">]<\/span><\/p>\n<p>  <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">job_name<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">\\&#8217;node-exporter\\&#8217;<\/span> <span class=\"token comment\"># \u76d1\u63a7\u4e3b\u673a\u6307\u6807<\/span><br \/>\n    <span class=\"token key atrule\">static_configs<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">targets<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">\\'&lt;node-exporter-address&gt;:9100\\&#8217;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token comment\"># \u66ff\u6362\u4e3a node-exporter \u5730\u5740<\/span><\/p>\n<p>  <span class=\"token comment\"># \u53ef\u4ee5\u6dfb\u52a0\u66f4\u591a\u76d1\u63a7\u76ee\u6807, \u6bd4\u5982\u5e94\u7528 metrics<\/span><br \/>\nEOF<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528 Docker \u542f\u52a8 Prometheus<\/span><br \/>\ndocker run <span class=\"token punctuation\">&#8211;<\/span>d <span class=\"token punctuation\">&#8211;<\/span><span class=\"token punctuation\">&#8211;<\/span>name prometheus \\\\<br \/>\n    <span class=\"token punctuation\">&#8211;<\/span>p 9090<span class=\"token punctuation\">:<\/span>9090 \\\\<br \/>\n    <span class=\"token punctuation\">&#8211;<\/span>v $(pwd)\/prometheus.yml<span class=\"token punctuation\">:<\/span>\/etc\/prometheus\/prometheus.yml \\\\<br \/>\n    prom\/prometheus<\/p>\n<p>(3) Loki \u5b89\u88c5\u548c\u914d\u7f6e:<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa loki-config.yaml \u914d\u7f6e\u6587\u4ef6<\/span><br \/>\ncat &lt;&lt;EOF <span class=\"token punctuation\">&gt;<\/span> loki<span class=\"token punctuation\">&#8211;<\/span>config.yaml<br \/>\n<span class=\"token key atrule\">auth_enabled<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">false<\/span><\/p>\n<p><span class=\"token key atrule\">server<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">http_listen_port<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">3100<\/span><\/p>\n<p><span class=\"token key atrule\">ingester<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">lifecycler<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">address<\/span><span class=\"token punctuation\">:<\/span> 127.0.0.1<br \/>\n    <span class=\"token key atrule\">ring<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">kvstore<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">store<\/span><span class=\"token punctuation\">:<\/span> inmemory<br \/>\n      <span class=\"token key atrule\">replication_factor<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">1<\/span><br \/>\n    <span class=\"token key atrule\">final_sleep<\/span><span class=\"token punctuation\">:<\/span> 0s<br \/>\n  <span class=\"token key atrule\">chunk_idle_period<\/span><span class=\"token punctuation\">:<\/span> 5m<br \/>\n  <span class=\"token key atrule\">chunk_retain_period<\/span><span class=\"token punctuation\">:<\/span> 30s<br \/>\n  <span class=\"token key atrule\">max_transfer_retries<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">0<\/span><\/p>\n<p><span class=\"token key atrule\">schema_config<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">configs<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">from<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token datetime number\">2020-05-15<\/span><br \/>\n      <span class=\"token key atrule\">store<\/span><span class=\"token punctuation\">:<\/span> boltdb<br \/>\n      <span class=\"token key atrule\">object_store<\/span><span class=\"token punctuation\">:<\/span> filesystem<br \/>\n      <span class=\"token key atrule\">schema<\/span><span class=\"token punctuation\">:<\/span> v11<br \/>\n      <span class=\"token key atrule\">index<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">prefix<\/span><span class=\"token punctuation\">:<\/span> index_<br \/>\n        <span class=\"token key atrule\">period<\/span><span class=\"token punctuation\">:<\/span> 24h<\/p>\n<p><span class=\"token key atrule\">storage_config<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">boltdb<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">directory<\/span><span class=\"token punctuation\">:<\/span> \/loki\/index<\/p>\n<p>  <span class=\"token key atrule\">filesystem<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">directory<\/span><span class=\"token punctuation\">:<\/span> \/loki\/chunks<\/p>\n<p><span class=\"token key atrule\">limits_config<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">enforce_metric_name<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">false<\/span><br \/>\n  <span class=\"token key atrule\">reject_old_samples<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">true<\/span><br \/>\n  <span class=\"token key atrule\">reject_old_samples_max_age<\/span><span class=\"token punctuation\">:<\/span> 168h<br \/>\nEOF<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528 Docker \u542f\u52a8 Loki<\/span><br \/>\ndocker run <span class=\"token punctuation\">&#8211;<\/span>d <span class=\"token punctuation\">&#8211;<\/span><span class=\"token punctuation\">&#8211;<\/span>name loki \\\\<br \/>\n    <span class=\"token punctuation\">&#8211;<\/span>p 3100<span class=\"token punctuation\">:<\/span>3100 \\\\<br \/>\n    <span class=\"token punctuation\">&#8211;<\/span>v $(pwd)\/loki<span class=\"token punctuation\">&#8211;<\/span>config.yaml<span class=\"token punctuation\">:<\/span>\/etc\/loki\/local<span class=\"token punctuation\">&#8211;<\/span>config.yaml \\\\<br \/>\n    grafana\/loki<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb715\u6b21\uff0c\u70b9\u8d5e12\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316_\u65e5\u5fd7\u6587\u4ef6\u8fdb\u884c\u6839\u56e0\u5206\u6790<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[66,2554,43,224,44,2555],"topic":[],"class_list":["post-31625","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-bert","tag-43","tag-224","tag-44","tag-2555"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316 - \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\/31625.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb715\u6b21\uff0c\u70b9\u8d5e12\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316_\u65e5\u5fd7\u6587\u4ef6\u8fdb\u884c\u6839\u56e0\u5206\u6790\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/31625.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-21T15:10:57+00:00\" \/>\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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/31625.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/31625.html\",\"name\":\"\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-21T15:10:57+00:00\",\"dateModified\":\"2025-04-21T15:10:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/31625.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/31625.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/31625.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316\"}]},{\"@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\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316 - \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\/31625.html","og_locale":"zh_CN","og_type":"article","og_title":"\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb715\u6b21\uff0c\u70b9\u8d5e12\u6b21\uff0c\u6536\u85cf17\u6b21\u3002\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316_\u65e5\u5fd7\u6587\u4ef6\u8fdb\u884c\u6839\u56e0\u5206\u6790","og_url":"https:\/\/www.wsisp.com\/helps\/31625.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-21T15:10:57+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/31625.html","url":"https:\/\/www.wsisp.com\/helps\/31625.html","name":"\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-21T15:10:57+00:00","dateModified":"2025-04-21T15:10:57+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/31625.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/31625.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/31625.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u57fa\u4e8e\u65e5\u5fd7\u3001\u9519\u8bef\u544a\u8b66\u3001\u670d\u52a1\u5668\u72b6\u6001\u7b49\u573a\u666f\u5316\u7684 \u201c\u6839\u56e0\u201d \u5206\u6790\u7684\u8fdb\u5316"}]},{"@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\/31625","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=31625"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/31625\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=31625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=31625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=31625"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=31625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}