{"id":40505,"date":"2023-10-17T16:05:57","date_gmt":"2024-03-07T18:10:36","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/"},"modified":"2024-05-04T04:44:45","modified_gmt":"2024-05-03T20:44:45","slug":"%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/","title":{"rendered":"\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5"},"content":{"rendered":"<h1>1. \u8fdb\u884c Logstash \u7684\u5b89\u88c5\u548c\u57fa\u672c\u8bbe\u7f6e\u3002<\/h1>\n<h3>\u4e0b\u8f7d<\/h3>\n<p>\u8bf7\u4ece\u4ee5\u4e0bURL\u8fdb\u884c\u4e0b\u8f7d\uff1a<br \/>\nhttps:\/\/www.elastic.co\/jp\/downloads\/past-releases\/logstash-7-10-0<\/p>\n<h3>\u89e3\u51cd (ji\u011b &#8211; \u6b63\u5728\u89e3\u51cd ji\u011b -&gt; Defrosting<\/h3>\n<p>\u89e3\u51cd\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nb\">tar<\/span> <span class=\"nt\">-zxvf<\/span> logstash-7.10.0-linux-x86_64.tar.gz\r\n<\/code><\/pre>\n<h3>\u8bbe\u7f6e\u6587\u4ef6\uff08logstash.yml\uff09\u7684\u914d\u7f6e<\/h3>\n<p>\u5982\u679c\u60a8\u6ca1\u6709\u4e3aElasticsearch\u5f15\u5165xpack\uff0c\u90a3\u4e48\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f\u6ca1\u6709\u95ee\u9898\u7684\u3002<\/p>\n<div>\u5982\u679c\u5728Elasticsearch\u4e2d\u5f15\u5165\u4e86xpack\uff0c\u5219\u9700\u8981\u4e0b\u9762\u7684\u8bbe\u7f6e\uff1a<br \/>\nxpack.monitoring.elasticsearch.hosts: [ &#8220;http:\/\/localhost:9200&#8221; ]<br \/>\nxpack.monitoring.elasticsearch.username: logstash_system<br \/>\nxpack.monitoring.elasticsearch.password: password99\u6253\u5f00\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u6dfb\u52a0\u4e0a\u8ff0\u8bbe\u7f6e<br \/>\ncd \/logstash-7.10.0\/config<br \/>\nvi logstash.yml<\/p>\n<\/div>\n<div>\u8bbe\u7f6e\u8ffd\u52a0\u540e\u7684logstash.yml<br \/>\n\uff08\u70b9\u6b64\u67e5\u770b\uff09logstash.yml<br \/>\n# YAML\u683c\u5f0f\u7684\u8bbe\u7f6e\u6587\u4ef6<br \/>\n#<br \/>\n# \u8bbe\u7f6e\u53ef\u4ee5\u4ee5\u5c42\u7ea7\u5f62\u5f0f\u6307\u5b9a\uff0c\u4f8b\u5982\uff1a<br \/>\n#<br \/>\n# pipeline:<br \/>\n# batch:<br \/>\n# size: 125<br \/>\n# delay: 5<br \/>\n#<br \/>\n# \u6216\u8005\u4ee5\u5e73\u9762\u952e\u5f62\u5f0f\u6307\u5b9a\uff0c\u4f8b\u5982\uff1a<br \/>\n#<br \/>\n# pipeline.batch.size: 125<br \/>\n# pipeline.batch.delay: 5<br \/>\n#<br \/>\n# &#8212;&#8212;&#8212;&#8212; \u8282\u70b9\u6807\u8bc6 &#8212;&#8212;&#8212;&#8212;<br \/>\n#<br \/>\n# \u4f7f\u7528\u63cf\u8ff0\u6027\u540d\u79f0\u6307\u5b9a\u8282\u70b9\uff1a<br \/>\n#<br \/>\n# node.name: test<br \/>\n#<br \/>\n# \u5982\u679c\u7701\u7565\uff0c\u5219\u8282\u70b9\u540d\u79f0\u5c06\u9ed8\u8ba4\u4e3a\u8ba1\u7b97\u673a\u7684\u4e3b\u673a\u540d<br \/>\n#<br \/>\n# &#8212;&#8212;&#8212;&#8212; \u6570\u636e\u8def\u5f84 &#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n#<br \/>\n# logstash\u53ca\u5176\u63d2\u4ef6\u5e94\u4f7f\u7528\u7684\u76ee\u5f55\uff0c\u4ee5\u6ee1\u8db3\u4efb\u4f55\u6301\u4e45\u5316\u9700\u6c42\u3002\u9ed8\u8ba4\u4e3aLOGSTASH_HOME\/data<br \/>\n#<br \/>\n# path.data:<br \/>\n#<br \/>\n# &#8212;&#8212;&#8212;&#8212; Pipeline\u8bbe\u7f6e &#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n#<br \/>\n# pipeline\u7684ID\u3002<br \/>\n#<br \/>\n# pipeline.id: main<br \/>\n#<br \/>\n# \u8bbe\u7f6e\u5e76\u884c\u6267\u884c\u7ba1\u9053\u7684\u8fc7\u6ee4\u5668+\u8f93\u51fa\u9636\u6bb5\u7684\u5de5\u4f5c\u8fdb\u7a0b\u6570\u3002<br \/>\n#<br \/>\n# \u8fd9\u9ed8\u8ba4\u4e3a\u4e3b\u673a\u7684CPU\u6838\u5fc3\u6570\u3002<br \/>\n#<br \/>\n# pipeline.workers: 2<br \/>\n#<br \/>\n# \u4ece\u8f93\u5165\u4e2d\u68c0\u7d22\u591a\u5c11\u4e2a\u4e8b\u4ef6\uff0c\u7136\u540e\u53d1\u9001\u5230\u8fc7\u6ee4\u5668+\u5de5\u4f5c\u8fdb\u7a0b<br \/>\n#<br \/>\n# pipeline.batch.size: 125<br \/>\n#<br \/>\n# \u7b49\u5f85\u6beb\u79d2\u6570\uff0c\u7136\u540e\u8f6e\u8be2\u4e0b\u4e00\u4e2a\u4e8b\u4ef6\uff0c\u7136\u540e\u5c06\u5927\u5c0f\u4e0d\u8db3\u7684\u6279\u6b21\u53d1\u9001\u5230\u8fc7\u6ee4\u5668+\u8f93\u51fa<br \/>\n#<br \/>\n# pipeline.batch.delay: 50<br \/>\n#<br \/>\n# \u5728\u5173\u95ed\u671f\u95f4\u5f3a\u5236Logstash\u9000\u51fa\uff0c\u5373\u4f7f\u5185\u5b58\u4e2d\u4ecd\u6709\u672a\u5904\u7406\u7684\u4e8b\u4ef6\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0clogstash\u5c06\u62d2\u7edd\u9000\u51fa\uff0c\u76f4\u5230\u6240\u6709\u5df2\u63a5\u6536\u7684\u4e8b\u4ef6\u90fd\u88ab\u63a8\u9001\u5230\u8f93\u51fa\u3002<br \/>\n#<br \/>\n# \u8b66\u544a\uff1a\u542f\u7528\u6b64\u529f\u80fd\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5173\u95ed\u671f\u95f4\u6570\u636e\u4e22\u5931<br \/>\n#<br \/>\n# pipeline.unsafe_shutdown: false<br \/>\n#<br \/>\n# \u8bbe\u7f6e\u7ba1\u9053\u4e8b\u4ef6\u6392\u5e8f\u3002\u9009\u9879\u4e3a&#8221;auto&#8221;\uff08\u9ed8\u8ba4\u503c\uff09\uff0c&#8221;true&#8221;\u6216&#8221;false&#8221;\u3002<br \/>\n# \u5982\u679c&#8217;pipeline.workers&#8217;\u8bbe\u7f6e\u4e5f\u8bbe\u7f6e\u4e3a&#8217;1&#8217;\uff0c\u5219&#8221;auto&#8221;\u5c06\u81ea\u52a8\u542f\u7528\u6392\u5e8f\u3002<br \/>\n# &#8220;true&#8221;\u4f1a\u5f3a\u5236\u5bf9\u7ba1\u9053\u8fdb\u884c\u6392\u5e8f\uff0c\u5e76\u963b\u6b62logstash\u5728\u5b58\u5728\u591a\u4e2a\u5de5\u4f5c\u8fdb\u7a0b\u65f6\u542f\u52a8\u3002<br \/>\n# &#8220;false&#8221;\u5c06\u7981\u7528\u4e3a\u4fdd\u7559\u987a\u5e8f\u800c\u6267\u884c\u7684\u4efb\u4f55\u989d\u5916\u5904\u7406\u3002<br \/>\n#<br \/>\npipeline.ordered: auto<br \/>\n#<br \/>\n# &#8212;&#8212;&#8212;&#8212; \u7ba1\u9053\u914d\u7f6e\u8bbe\u7f6e &#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n#<br \/>\n# \u4ece\u4e3b\u7ba1\u9053\u83b7\u53d6\u7ba1\u9053\u914d\u7f6e\u7684\u4f4d\u7f6e<br \/>\n#<br \/>\n# path.config:<br \/>\n#<br \/>\n# \u4e3b\u7ba1\u9053\u7684\u7ba1\u9053\u914d\u7f6e\u5b57\u7b26\u4e32<br \/>\n#<br \/>\n# config.string:<br \/>\n#<br \/>\n# \u5728\u542f\u52a8\u65f6\uff0c\u6d4b\u8bd5\u914d\u7f6e\u662f\u5426\u6709\u6548\u5e76\u9000\u51fa\uff08\u6a21\u62df\u8fd0\u884c\uff09<br \/>\n#<br \/>\n# config.test_and_exit: false<br \/>\n#<br \/>\n# \u5b9a\u671f\u68c0\u67e5\u914d\u7f6e\u662f\u5426\u66f4\u6539\u5e76\u91cd\u65b0\u52a0\u8f7d\u7ba1\u9053<br \/>\n# \u8fd9\u4e5f\u53ef\u4ee5\u901a\u8fc7SIGHUP\u4fe1\u53f7\u624b\u52a8\u89e6\u53d1<br \/>\n#<br \/>\n# config.reload.automatic: false<br \/>\n#<br \/>\n# \u68c0\u67e5\u7ba1\u9053\u914d\u7f6e\u662f\u5426\u66f4\u6539\u7684\u9891\u7387\uff08\u4ee5\u79d2\u4e3a\u5355\u4f4d\uff09<br \/>\n# \u6ce8\u610f\uff0c\u5fc5\u987b\u63d0\u4f9b\u5355\u4f4d\u503c\uff08s\uff09\u3002\u6ca1\u6709\u9650\u5b9a\u8bcd\u7684\u503c\uff08\u4f8b\u598260\uff09<br \/>\n# \u5c06\u88ab\u89c6\u4e3a\u7eb3\u79d2\u3002<br \/>\n# \u4e0d\u5efa\u8bae\u4ee5\u8fd9\u79cd\u65b9\u5f0f\u8bbe\u7f6e\u95f4\u9694\uff0c\u4ee5\u514d\u5728\u4ee5\u540e\u7684\u7248\u672c\u4e2d\u53d1\u751f\u66f4\u6539\u3002<br \/>\n#<br \/>\n# config.reload.interval: 3s<br \/>\n#<br \/>\n# \u5728\u8c03\u8bd5\u65e5\u5fd7\u6d88\u606f\u4e2d\u663e\u793a\u5b8c\u5168\u7f16\u8bd1\u7684\u914d\u7f6e<br \/>\n# \u6ce8\u610f\uff1a&#8211;log.level\u5fc5\u987b\u4e3a&#8217;debug&#8217;<br \/>\n#<br \/>\n# config.debug: false<br \/>\n#<br \/>\n# \u542f\u7528\u65f6\uff0c\u5728\u7ba1\u9053\u914d\u7f6e\u6587\u4ef6\u4e2d\u5904\u7406\u8f6c\u4e49\u5b57\u7b26\uff0c\u5982\\n\u548c\\&#8221;\u3002<br \/>\n#<br \/>\n# config.support_escapes: false<br \/>\n#<br \/>\n# &#8212;&#8212;&#8212;&#8212; HTTP API\u8bbe\u7f6e &#8212;&#8212;&#8212;&#8212;-<br \/>\n# \u5728\u8fd9\u91cc\u5b9a\u4e49\u4e0eHTTP API\u6709\u5173\u7684\u8bbe\u7f6e\u3002<br \/>\n#<br \/>\n# HTTP API\u9ed8\u8ba4\u5df2\u542f\u7528\u3002\u53ef\u4ee5\u7981\u7528\u5b83\uff0c\u4f46\u4f9d\u8d56\u5b83\u7684\u529f\u80fd\u5c06\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u3002<br \/>\n# http.enabled: true<br \/>\n#<br \/>\n# \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cHTTP API\u4ec5\u7ed1\u5b9a\u5230\u4e3b\u673a\u7684\u672c\u5730\u56de\u73af\u63a5\u53e3\uff0c<br \/>\n# \u786e\u4fdd\u5b83\u4e0d\u5bf9\u7f51\u7edc\u4e2d\u7684\u5176\u4ed6\u90e8\u5206\u53ef\u8bbf\u95ee\u3002\u56e0\u4e3aAPI<br \/>\n# \u65e2\u6ca1\u6709\u8eab\u4efd\u9a8c\u8bc1\u4e5f\u6ca1\u6709\u6388\u6743\uff0c\u800c\u4e14\u672a\u7ecf\u786c\u5316\u6216<br \/>\n# \u4e3a\u516c\u5f00\u53ef\u8fbe\u7684API\u6d4b\u8bd5\uff0c\u6240\u4ee5\u5e94\u5c3d\u91cf\u907f\u514d\u7ed1\u5b9a\u5230\u516c\u5f00\u53ef\u8bbf\u95ee\u7684IP\u4e0a\u3002<br \/>\n#<br \/>\n# http.host: 127.0.0.1<br \/>\n#<br \/>\n# HTTP API Web\u670d\u52a1\u5668\u5c06\u5728\u7ed9\u5b9a\u8303\u56f4\u4e2d\u7684\u53ef\u7528\u7aef\u53e3\u4e0a\u4fa6\u542c\u3002<br \/>\n# \u503c\u53ef\u4ee5\u6307\u5b9a\u4e3a\u5355\u4e2a\u7aef\u53e3\uff08\u4f8b\u5982`9600`\uff09\u6216\u4e00\u4e2a\u5305\u542b\u8303\u56f4<br \/>\n# \u7aef\u53e3\u7684\u5305\u5bb9\u8303\u56f4\uff08\u4f8b\u5982`9600-9700`\uff09\u3002<br \/>\n#<br \/>\n# http.port: 9600-9700<br \/>\n#<br \/>\n# &#8212;&#8212;&#8212;&#8212; \u6a21\u5757\u8bbe\u7f6e &#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n# \u5728\u8fd9\u91cc\u5b9a\u4e49\u6a21\u5757\u3002\u6a21\u5757\u5b9a\u4e49\u5fc5\u987b\u5b9a\u4e49\u4e3a\u6570\u7ec4\u3002<br \/>\n# \u7b80\u5355\u7684\u65b9\u6cd5\u662f\u5728\u6bcf\u4e2a`name`\u524d\u52a0\u4e0a`-`\uff0c\u5e76\u5c06<br \/>\n# \u6240\u6709\u76f8\u5173\u53d8\u91cf\u4fdd\u7559\u5728\u4e0e\u5176\u5173\u8054\u7684`name`\u4e0b\u65b9\uff0c<br \/>\n# \u5e76\u5728\u4e0b\u4e00\u4e2a`name`\u4e0a\u65b9\uff0c\u4f8b\u5982\uff1a<br \/>\n#<br \/>\n# modules:<br \/>\n# &#8211; name: MODULE_NAME<br \/>\n# var.PLUGINTYPE1.PLUGINNAME1.KEY1: VALUE<br \/>\n# var.PLUGINTYPE1.PLUGINNAME1.KEY2: VALUE<br \/>\n# var.PLUGINTYPE2.PLUGINNAME1.KEY1: VALUE<br \/>\n# var.PLUGINTYPE3.PLUGINNAME3.KEY1: VALUE<br \/>\n#<br \/>\n# \u6a21\u5757\u53d8\u91cf\u540d\u79f0\u5fc5\u987b\u91c7\u7528\u4ee5\u4e0b\u683c\u5f0f<br \/>\n#<br \/>\n# var.PLUGIN_TYPE.PLUGIN_NAME.KEY<br \/>\n#<br \/>\n#<\/p>\n<\/div>\n<h1>2. \u6570\u636e\u534f\u540c<\/h1>\n<h3>2-1. \u5bf9\u4e8eCSV\u6570\u636e\u6765\u8bf4<\/h3>\n<h5>\u51c6\u5907\u7528\u4e8e\u534f\u4f5c\u7684CSV\u6587\u4ef6\u3002<\/h5>\n<p>\u5728\u8fd9\u91cc\u51c6\u5907\u4e24\u4e2a\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>Id,Title,Context,UserId,UpdateDate\r\n0001,This section is Title1.,This section is context1.,1,2023-09-11 10:00:00\r\n0002,This section is Title2.,This section is context2.,1,2023-09-11 11:00:00\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>Id,Title,Context,UserId,UpdateDate\r\n0003,This section is Title3.,This section is context4.,3,2023-09-11 12:00:00\r\n0004,This section is Title4.,This section is context3.,4,2023-09-11 13:00:00\r\n<\/code><\/pre>\n<h4>\u51c6\u5907\u7528\u4e8e\u5bfc\u5165\u7684\u8bbe\u7f6e\u6587\u4ef6\u3002<\/h4>\n<div>\u6587\u4ef6\u540d\u53ef\u4ee5\u4efb\u610f\u6307\u5b9a\uff08\u5728\u8fd9\u91cc\uff0c\u5df2\u7ecf\u5199\u660e\u4e3alogstash_forCSV.conf\uff09<\/div>\n<div>\u7b5b\u9009\u5668 =&gt; columns \u662f\u5c06CSV\u6587\u4ef6\u7684\u5217\u540d\u4e0e\u4e4b\u5339\u914d<br \/>\n\u7b5b\u9009\u5668 {<br \/>\ncsv {<br \/>\ncolumns =&gt; [&#8220;Id&#8221;, &#8220;Title&#8221;, &#8220;Context&#8221;,&#8221;UserId&#8221;,&#8221;UpdateDate&#8221;]<br \/>\nconvert =&gt; {<br \/>\n&#8220;UserId&#8221; =&gt; &#8220;integer&#8221;<br \/>\n}<br \/>\nskip_header =&gt; true<br \/>\n}<br \/>\ndate {<br \/>\nmatch =&gt; [&#8220;UpdateDate&#8221;, &#8220;yyyy-MM-dd HH:mm:ss&#8221;]<br \/>\n}<br \/>\n}<\/div>\n<div>\u8f93\u51fa =&gt; elasticsearch =&gt; \u7528\u6237\u5e94\u6307\u5b9a&#8221;elastic&#8221;<br \/>\n\u8f93\u51fa {<br \/>\nelasticsearch {hosts =&gt; [&#8220;http:\/\/localhost:9200&#8221;]<br \/>\naction =&gt; &#8220;update&#8221;<br \/>\nindex =&gt; &#8220;test&#8221;<br \/>\ndoc_as_upsert =&gt; true<br \/>\ndocument_id =&gt; &#8220;%{doc_id}&#8221;<br \/>\nuser =&gt; &#8220;elastic&#8221;<br \/>\npassword =&gt; &#8220;password99&#8221;<br \/>\n}<br \/>\nstdout {<br \/>\ncodec =&gt; rubydebug<br \/>\n}<br \/>\n}<\/p>\n<\/div>\n<div>\u5982\u679c\u60f3\u6307\u5b9a_id\uff0c\u8bbe\u7f6e\u4ee5\u4e0b\u4e09\u4e2a\u9879\u76ee\uff1a<br \/>\naction =&gt; &#8220;update&#8221;<br \/>\ndoc_as_upsert =&gt; true<br \/>\ndocument_id =&gt; &#8220;%{doc_id}&#8221;<\/div>\n<div>\u65e5\u5fd7\u8bb0\u5f55\u914d\u7f6e\u6587\u4ef6logstash_forCsv.conf<br \/>\ninput {<br \/>\nfile {<br \/>\nmode =&gt; &#8220;tail&#8221;<br \/>\npath =&gt; [&#8220;\/home\/hoge\/work\/testData\/*_test.csv&#8221;]<br \/>\nsincedb_path =&gt; &#8220;\/home\/hoge\/local_dev\/logstash-7.10.0\/log\/sincedb&#8221;<br \/>\nstart_position =&gt; &#8220;beginning&#8221;<br \/>\ncodec =&gt; plain {<br \/>\ncharset =&gt; &#8220;UTF-8&#8221;<br \/>\n}<br \/>\n}<br \/>\n}filter {<br \/>\ncsv {<br \/>\ncolumns =&gt; [&#8220;Id&#8221;, &#8220;Title&#8221;, &#8220;Context&#8221;,&#8221;UserId&#8221;,&#8221;UpdateDate&#8221;]<br \/>\nconvert =&gt; {<br \/>\n&#8220;UserId&#8221; =&gt; &#8220;integer&#8221;<br \/>\n}<br \/>\nskip_header =&gt; true<br \/>\n}<br \/>\ndate {<br \/>\nmatch =&gt; [&#8220;UpdateDate&#8221;, &#8220;yyyy-MM-dd HH:mm:ss&#8221;]<br \/>\n}<br \/>\n}<\/p>\n<p>output {<br \/>\nelasticsearch {<br \/>\nhosts =&gt; [&#8220;http:\/\/localhost:9200&#8221;]<br \/>\naction =&gt; &#8220;update&#8221;<br \/>\nindex =&gt; &#8220;test&#8221;<br \/>\ndoc_as_upsert =&gt; true<br \/>\ndocument_id =&gt; &#8220;%{doc_id}&#8221;<br \/>\nuser =&gt; &#8220;elastic&#8221;<br \/>\npassword =&gt; &#8220;password99&#8221;<br \/>\n}<br \/>\nstdout {<br \/>\ncodec =&gt; rubydebug<br \/>\n}<br \/>\n}<\/p>\n<\/div>\n<h3>\u5728PostgreSQL\u7684\u60c5\u51b5\u4e0b<\/h3>\n<h5>\u51c6\u5907\u7528\u4e8ePostgreSQL\u7684JDBC\u3002<\/h5>\n<p>\u8bf7\u70b9\u51fb\u6b64\u94fe\u63a5\u4e0b\u8f7d PostgreSQL JDBC \u9a71\u52a8\uff1ahttps:\/\/jdbc.postgresql.org\/download\/\u3002<\/p>\n<h4>\u51c6\u5907\u7528\u4e8e\u5bfc\u5165\u7684\u8bbe\u7f6e\u6587\u4ef6\u3002<\/h4>\n<div>\u6587\u4ef6\u540d\u53ef\u4ee5\u4efb\u610f\u6307\u5b9a\uff08\u6b64\u5904\u4f7f\u7528logstash_postgres.conf\u4e2d\u6307\u5b9a\u7684\u6587\u4ef6\u540d\uff09<\/div>\n<div>\u4f7f\u7528jdbc\u8fde\u63a5pg\u6570\u636e\u5e93\uff0c\u8bbe\u7f6e\u8fde\u63a5\u4fe1\u606f\u548cSQL\u8bed\u53e5\u3002<br \/>\n\u8f93\u5165 {<br \/>\njdbc {<br \/>\njdbc_driver_library =&gt; [&#8220;\/home\/hogehoge\/logstash-7.10.0\/lib\/postgreJDBC\/42.6.0\/postgresql-42.6.0.jar&#8221;]<br \/>\njdbc_driver_class =&gt; &#8220;org.postgresql.Driver&#8221;<br \/>\njdbc_connection_string =&gt; &#8220;jdbc:postgresql:\/\/localhost:5432\/dbname&#8221;<br \/>\njdbc_user =&gt; &#8220;user&#8221;<br \/>\njdbc_password =&gt; &#8220;password&#8221;tracking_column =&gt; &#8220;updated_at&#8221;<br \/>\nuse_column_value =&gt; true<br \/>\ntracking_column_type =&gt; &#8220;timestamp&#8221;<br \/>\nschedule =&gt; &#8220;*\/10 * * * * *&#8221;<\/p>\n<p>statement =&gt; &#8221;<br \/>\nSELECT col_uk, col1,col2,col3<br \/>\nFROM test_table<br \/>\n&#8221;<br \/>\n}<br \/>\n}<\/p>\n<\/div>\n<div>\u8f93\u51fa =&gt; elasticsearch =&gt; \u7528\u6237\u5e94\u6307\u5b9a&#8221;elastic&#8221;\u3002<br \/>\n\u5982\u679c\u60f3\u8981\u6307\u5b9adocument_id\uff0c\u53ef\u4ee5\u4f7f\u7528%{\u5217\u540d}\u8fdb\u884c\u8bbe\u7f6e\u3002<br \/>\noutput {<br \/>\nelasticsearch {hosts =&gt; [&#8220;http:\/\/localhost:9200&#8221;]<br \/>\naction =&gt; &#8220;update&#8221;<br \/>\nindex =&gt; &#8220;test_index&#8221;<br \/>\ndoc_as_upsert =&gt; true<br \/>\ndocument_id =&gt; &#8220;%{col_uk}&#8221;<br \/>\nuser =&gt; &#8220;elastic&#8221;<br \/>\npassword =&gt; &#8220;password99&#8221;<\/p>\n<p>}<br \/>\nstdout {<br \/>\ncodec =&gt; rubydebug<br \/>\n}<br \/>\n}<\/p>\n<\/div>\n<div>\n<p>\u6837\u672c\uff1a\u7528\u4e8ePostgre\u8054\u7ed3\u7684\u914d\u7f6e\u6587\u4ef6 logstash_postgre.conf\uff08\u70b9\u51fb\u8fd9\u91cc\u6253\u5f00\uff09<\/p>\n<p>logstash_postgre.conf<br \/>\n\u8f93\u5165 {<br \/>\njdbc {<br \/>\njdbc_driver_library =&gt; [&#8220;\/home\/hogehoge\/logstash-7.10.0\/lib\/postgreJDBC\/42.6.0\/postgresql-42.6.0.jar&#8221;]<br \/>\njdbc_driver_class =&gt; &#8220;org.postgresql.Driver&#8221;<br \/>\njdbc_connection_string =&gt; &#8220;jdbc:postgresql:\/\/localhost:5432\/dbname&#8221;<br \/>\njdbc_user =&gt; &#8220;user&#8221;<br \/>\njdbc_password =&gt; &#8220;password&#8221;<\/p>\n<p>tracking_column =&gt; &#8220;updated_at&#8221;<br \/>\nuse_column_value =&gt; true<br \/>\ntracking_column_type =&gt; &#8220;timestamp&#8221;<br \/>\nschedule =&gt; &#8220;*\/10 * * * * *&#8221;<\/p>\n<p>statement =&gt; &#8221;<br \/>\nSELECT col_uk, col1,col2,col3<br \/>\nFROM test_table<br \/>\n&#8221;<br \/>\n}<br \/>\n}<br \/>\n\u8fc7\u6ee4\u5668 {<br \/>\n}<\/p>\n<p>\u8f93\u51fa {<br \/>\nelasticsearch {<\/p>\n<p>hosts =&gt; [&#8220;http:\/\/localhost:9200&#8221;]<br \/>\naction =&gt; &#8220;update&#8221;<br \/>\nindex =&gt; &#8220;test_index&#8221;<br \/>\ndoc_as_upsert =&gt; true<br \/>\ndocument_id =&gt; &#8220;%{col_uk}&#8221;<br \/>\nuser =&gt; &#8220;elastic&#8221;<br \/>\npassword =&gt; &#8220;password99&#8221;<\/p>\n<p>}<br \/>\nstdout {<br \/>\ncodec =&gt; rubydebug<br \/>\n}<br \/>\n}<\/p>\n<\/div>\n<h1>3. \u6267\u884c<\/h1>\n<p>\u5728logstash\u7684\u76ee\u5f55\u4e2d\u6267\u884c\uff08\u5c06\u8981\u6267\u884c\u7684\u914d\u7f6e\u6587\u4ef6\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code>bin\/logstash <span class=\"nt\">-f<\/span> config\/logstash_postgre.conf\r\n<\/code><\/pre>\n<h1>4.\u786e\u8ba4\u7684\u65b9\u5f0f<\/h1>\n<p>\u4f7f\u7528kibana\u542f\u52a8<br \/>\nhttp:\/\/(kibana\u7f51\u5740):5601\/app\/home#\/<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d411b37434c4406c94bd9\/35-0.png\" alt=\"image.png\" \/><\/div>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d411b37434c4406c94bd9\/36-0.png\" alt=\"image.png\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. \u8fdb\u884c Logstash \u7684\u5b89\u88c5\u548c\u57fa\u672c\u8bbe\u7f6e\u3002 \u4e0b\u8f7d \u8bf7\u4ece\u4ee5\u4e0bURL\u8fdb\u884c\u4e0b\u8f7d\uff1a https:\/\/www.el [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-40505","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5 - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/\u3010logstash\u3011\u7684\u5b89\u88c5\uff08linux\uff09\u548c\u4e0epostgresql\u7684\u8fde\u63a5\u3001csv\u5bfc\u5165\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"1. \u8fdb\u884c Logstash \u7684\u5b89\u88c5\u548c\u57fa\u672c\u8bbe\u7f6e\u3002 \u4e0b\u8f7d \u8bf7\u4ece\u4ee5\u4e0bURL\u8fdb\u884c\u4e0b\u8f7d\uff1a https:\/\/www.el [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010logstash\u3011\u7684\u5b89\u88c5\uff08linux\uff09\u548c\u4e0epostgresql\u7684\u8fde\u63a5\u3001csv\u5bfc\u5165\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-07T18:10:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-03T20:44:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d411b37434c4406c94bd9\/35-0.png\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\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.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/\",\"name\":\"\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-03-07T18:10:36+00:00\",\"dateModified\":\"2024-05-03T20:44:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5 - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/\u3010logstash\u3011\u7684\u5b89\u88c5\uff08linux\uff09\u548c\u4e0epostgresql\u7684\u8fde\u63a5\u3001csv\u5bfc\u5165\u65b9\u6cd5\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5","og_description":"1. \u8fdb\u884c Logstash \u7684\u5b89\u88c5\u548c\u57fa\u672c\u8bbe\u7f6e\u3002 \u4e0b\u8f7d \u8bf7\u4ece\u4ee5\u4e0bURL\u8fdb\u884c\u4e0b\u8f7d\uff1a https:\/\/www.el [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010logstash\u3011\u7684\u5b89\u88c5\uff08linux\uff09\u548c\u4e0epostgresql\u7684\u8fde\u63a5\u3001csv\u5bfc\u5165\u65b9\u6cd5\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-03-07T18:10:36+00:00","article_modified_time":"2024-05-03T20:44:45+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d411b37434c4406c94bd9\/35-0.png"}],"author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/","name":"\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-03-07T18:10:36+00:00","dateModified":"2024-05-03T20:44:45+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Logstash\u3011\u7684\u5b89\u88c5\uff08Linux\uff09\u548c\u4e0ePostgreSQL\u7684\u8fde\u63a5\u3001CSV\u5bfc\u5165\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90logstash%e3%80%91%e7%9a%84%e5%ae%89%e8%a3%85%ef%bc%88linux%ef%bc%89%e5%92%8c%e4%b8%8epostgresql%e7%9a%84%e8%bf%9e%e6%8e%a5%e3%80%81csv%e5%af%bc%e5%85%a5%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=40505"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40505\/revisions"}],"predecessor-version":[{"id":96189,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40505\/revisions\/96189"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=40505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=40505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=40505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}