{"id":13528,"date":"2025-04-18T20:32:12","date_gmt":"2025-04-18T12:32:12","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/13528.html"},"modified":"2025-04-18T20:32:12","modified_gmt":"2025-04-18T12:32:12","slug":"%e4%bd%bf%e7%94%a8rsyslog%e8%bd%ac%e5%8f%91%e8%87%aa%e5%ae%9a%e4%b9%89%e6%97%a5%e5%bf%97%e5%88%b0%e6%8c%87%e5%ae%9a%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/13528.html","title":{"rendered":"\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668"},"content":{"rendered":"<h2>rsyslog\u7b80\u4ecb<\/h2>\n<p>\u00a0 \u00a0 rsyslog \u662f\u4e00\u4e2a\u9ad8\u5ea6\u53ef\u914d\u7f6e\u7684\u3001\u529f\u80fd\u5f3a\u5927\u7684\u7cfb\u7edf\u65e5\u5fd7\u5b88\u62a4\u8fdb\u7a0b&#xff0c;\u5e7f\u6cdb\u7528\u4e8e UNIX \u548c Linux \u7cfb\u7edf\u4e2d\u3002\u5b83\u662f syslog \u7684\u4e00\u4e2a\u6269\u5c55\u7248\u672c&#xff0c;\u63d0\u4f9b\u4e86\u8bb8\u591a\u989d\u5916\u7684\u529f\u80fd\u548c\u6539\u8fdb\u3002\u80fd\u591f\u6536\u96c6\u3001\u8fc7\u6ee4\u3001\u5b58\u50a8\u548c\u8f6c\u53d1\u65e5\u5fd7\u6570\u636e\u3002\u5b83\u7684\u7075\u6d3b\u6027\u548c\u6269\u5c55\u6027\u4f7f\u5176\u6210\u4e3a\u73b0\u4ee3 Linux \u7cfb\u7edf\u4e2d\u65e5\u5fd7\u7ba1\u7406\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\u3002<\/p>\n<h4>\u4e3b\u8981\u529f\u80fd<\/h4>\n<li>\n<p>\u65e5\u5fd7\u6536\u96c6&#xff1a;<\/p>\n<li>rsyslog \u80fd\u591f\u6536\u96c6\u6765\u81ea\u7cfb\u7edf\u3001\u5e94\u7528\u7a0b\u5e8f\u548c\u7f51\u7edc\u8bbe\u5907\u7684\u65e5\u5fd7\u4fe1\u606f\u3002<\/li>\n<li>\u652f\u6301\u591a\u79cd\u8f93\u5165\u6765\u6e90&#xff0c;\u5305\u62ec\u672c\u5730\u6587\u4ef6\u3001\u7f51\u7edc\u5957\u63a5\u5b57\u548c\u8fdc\u7a0b\u65e5\u5fd7\u4f20\u8f93\u3002<\/li>\n<\/li>\n<li>\n<p>\u65e5\u5fd7\u8fc7\u6ee4&#xff1a;<\/p>\n<ul>\n<li>\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u89c4\u5219&#xff0c;\u53ef\u4ee5\u5bf9\u65e5\u5fd7\u8fdb\u884c\u8fc7\u6ee4\u3001\u5206\u7c7b\u548c\u5904\u7406\u3002<\/li>\n<li>\u652f\u6301\u6309\u8bbe\u65bd\u3001\u4e25\u91cd\u6027\u3001\u5185\u5bb9\u7b49\u6761\u4ef6\u8fdb\u884c\u65e5\u5fd7\u9009\u62e9\u548c\u5904\u7406\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u65e5\u5fd7\u8f6c\u53d1&#xff1a;<\/p>\n<ul>\n<li>\u652f\u6301\u5c06\u65e5\u5fd7\u8f6c\u53d1\u5230\u5176\u4ed6 rsyslog \u5b9e\u4f8b\u6216\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\u3002<\/li>\n<li>\u53ef\u4ee5\u901a\u8fc7 UDP\u3001TCP \u6216 RELP \u534f\u8bae\u8fdb\u884c\u8fdc\u7a0b\u65e5\u5fd7\u4f20\u8f93\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u65e5\u5fd7\u5b58\u50a8&#xff1a;<\/p>\n<ul>\n<li>\u53ef\u4ee5\u5c06\u65e5\u5fd7\u6d88\u606f\u5b58\u50a8\u5230\u6587\u4ef6\u3001\u6570\u636e\u5e93\u6216\u5176\u4ed6\u5b58\u50a8\u540e\u7aef\u3002<\/li>\n<li>\u652f\u6301\u65e5\u5fd7\u8f6e\u8f6c\u548c\u5f52\u6863\u529f\u80fd&#xff0c;\u4ee5\u7ba1\u7406\u65e5\u5fd7\u6587\u4ef6\u7684\u5927\u5c0f\u548c\u5b58\u50a8\u671f\u9650\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u65e5\u5fd7\u683c\u5f0f\u5316&#xff1a;<\/p>\n<ul>\n<li>\u652f\u6301\u81ea\u5b9a\u4e49\u65e5\u5fd7\u683c\u5f0f&#xff0c;\u901a\u8fc7\u6a21\u677f\u5c06\u65e5\u5fd7\u6d88\u606f\u683c\u5f0f\u5316\u4e3a\u6240\u9700\u7684\u7ed3\u6784\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u6a21\u5757\u5316\u8bbe\u8ba1&#xff1a;<\/p>\n<ul>\n<li>rsyslog \u91c7\u7528\u6a21\u5757\u5316\u67b6\u6784&#xff0c;\u652f\u6301\u52a0\u8f7d\u548c\u5378\u8f7d\u5404\u79cd\u63d2\u4ef6\u548c\u6a21\u5757\u3002<\/li>\n<li>\u5e38\u7528\u6a21\u5757\u5305\u62ec\u8f93\u5165\u6a21\u5757&#xff08;imfile\u3001imudp\u3001imtcp&#xff09;\u3001\u8f93\u51fa\u6a21\u5757&#xff08;omfile\u3001omrelp\u3001ommysql&#xff09;\u7b49\u3002<\/li>\n<\/ul>\n<\/li>\n<h4>\u4e3b\u8981\u7ec4\u4ef6<\/h4>\n<li>\n<p>\u8f93\u5165\u6a21\u5757&#xff08;Input Modules&#xff09;&#xff1a;<\/p>\n<p> \u7528\u4e8e\u63a5\u6536\u65e5\u5fd7\u6570\u636e\u3002\u5305\u62ec\u4ece\u6587\u4ef6\u3001\u7f51\u7edc\u3001\u7cfb\u7edf\u65e5\u5fd7\u7b49\u6765\u6e90\u63a5\u6536\u65e5\u5fd7\u3002<\/li>\n<li>\n<p>\u8fc7\u6ee4\u5668&#xff08;Filters&#xff09;&#xff1a;<\/p>\n<p> \u7528\u4e8e\u6839\u636e\u89c4\u5219\u7b5b\u9009\u548c\u5904\u7406\u65e5\u5fd7\u6d88\u606f\u3002\u4f8b\u5982&#xff0c;\u8fc7\u6ee4\u6389\u4e0d\u9700\u8981\u7684\u65e5\u5fd7\u3001\u5c06\u65e5\u5fd7\u91cd\u5b9a\u5411\u5230\u7279\u5b9a\u6587\u4ef6\u7b49\u3002<\/li>\n<li>\n<p>\u8f93\u51fa\u6a21\u5757&#xff08;Output Modules&#xff09;&#xff1a;<\/p>\n<p> \u7528\u4e8e\u5c06\u65e5\u5fd7\u6570\u636e\u8f93\u51fa\u5230\u76ee\u6807\u4f4d\u7f6e&#xff0c;\u5982\u6587\u4ef6\u3001\u6570\u636e\u5e93\u6216\u8fdc\u7a0b\u670d\u52a1\u5668\u3002<\/li>\n<li>\n<p>\u6a21\u677f&#xff08;Templates&#xff09;&#xff1a;<\/p>\n<p> \u7528\u4e8e\u81ea\u5b9a\u4e49\u65e5\u5fd7\u6d88\u606f\u7684\u683c\u5f0f\u3002\u53ef\u4ee5\u5b9a\u4e49\u6d88\u606f\u7684\u7ed3\u6784\u3001\u5185\u5bb9\u548c\u683c\u5f0f&#xff0c;\u4ee5\u6ee1\u8db3\u7279\u5b9a\u7684\u9700\u6c42\u3002<\/li>\n<h4>\u4f7f\u7528\u573a\u666f<\/h4>\n<ul>\n<li>\u7cfb\u7edf\u76d1\u63a7&#xff1a;\u76d1\u63a7\u7cfb\u7edf\u8fd0\u884c\u72b6\u51b5\u3001\u9519\u8bef\u548c\u8b66\u544a\u4fe1\u606f\u3002<\/li>\n<li>\u5b89\u5168\u5ba1\u8ba1&#xff1a;\u8bb0\u5f55\u548c\u5206\u6790\u5b89\u5168\u4e8b\u4ef6&#xff0c;\u5982\u767b\u5f55\u5c1d\u8bd5\u548c\u7cfb\u7edf\u8bbf\u95ee\u3002<\/li>\n<li>\u96c6\u4e2d\u65e5\u5fd7\u7ba1\u7406&#xff1a;\u5c06\u65e5\u5fd7\u4ece\u591a\u4e2a\u7cfb\u7edf\u96c6\u4e2d\u5230\u4e00\u4e2a\u4f4d\u7f6e&#xff0c;\u4ee5\u4fbf\u4e8e\u7ba1\u7406\u548c\u5206\u6790\u3002<\/li>\n<li>\u6545\u969c\u6392\u9664&#xff1a;\u5206\u6790\u548c\u6392\u67e5\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u6545\u969c\u7684\u6839\u672c\u539f\u56e0\u3002<\/li>\n<\/ul>\n<h3><\/h3>\n<h2>\u914d\u7f6e\u65b9\u6cd5<\/h2>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6bd4\u5982\u6709\u4e2a\u573a\u666f&#xff0c;\u9700\u8981\u628a\u670d\u52a1\u5668A\u4e0a\u7684\u67d0\u4e2aapp\u7684\u65e5\u5fd7\u8f6c\u53d1\u5230\u670d\u52a1\u5668B\u4e0a&#xff0c;\u8fd9\u91cc\u7684A\u548cB\u4e0a\u9ed8\u8ba4\u90fd\u5b89\u88c5\u4e86rsyslog\u3002\u90a3\u4e48&#xff0c;\u6211\u4eec\u53ef\u4ee5\u79f0A\u4e3a\u5ba2\u6237\u7aef&#xff0c;B\u4e3a\u670d\u52a1\u7aef\u3002<\/p>\n<h4>\u914d\u7f6e\u670d\u52a1\u7aef<\/h4>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 rsyslog\u7684\u914d\u7f6e\u6587\u4ef6\u9ed8\u8ba4\u5728\/etc\/\u4e0b&#xff0c;\u540d\u4e3arsyslog.conf\u3002\u9664\u4e86rsyslog.conf&#xff0c;\u8fd8\u6709\u4e00\u4e2arsyslog.d\u76ee\u5f55&#xff0c;\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u4fdd\u5b58\u7684\u662f\u81ea\u5b9a\u4e49\u6587\u4ef6\u3002<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123210-6802464add067.png\" \/><\/p>\n<h5>1. \u7f16\u8f91\u914d\u7f6e\u6587\u4ef6 \/etc\/rsyslog.conf\u00a0<\/h5>\n<ul>\n<li>\n<h6>\u542f\u7528 UDP \u6216 TCP \u76d1\u542c&#xff1a;<\/h6>\n<\/li>\n<\/ul>\n<p># \u76d1\u542c UDP 514 \u7aef\u53e3&#xff1a;<br \/>\n$ModLoad imudp<br \/>\n$UDPServerRun 514<\/p>\n<p># \u6216\u8005\u76d1\u542c TCP 514 \u7aef\u53e3&#xff1a;<br \/>\n$ModLoad imtcp<br \/>\n$InputTCPServerRun 514 <\/p>\n<ul>\n<li>\n<h6>\u8bbe\u7f6e\u65e5\u5fd7\u63a5\u6536\u89c4\u5219<\/h6>\n<\/li>\n<\/ul>\n<p>\u6307\u5b9a\u5982\u4f55\u5904\u7406\u63a5\u6536\u5230\u7684\u65e5\u5fd7&#xff0c;\u4f8b\u5982&#xff0c;\u5c06\u63a5\u6536\u5230\u7684\u65e5\u5fd7\u5199\u5165\u6307\u5b9a\u7684\u6587\u4ef6\u5939&#xff1a;<\/p>\n<p>if $fromhost-ip &#061;&#061; &#039;client-ip&#039; then \/var\/log\/remote_logs.log<br \/>\n&amp; stop <\/p>\n<p>\u5c06 client-ip \u66ff\u6362\u4e3a\u5ba2\u6237\u7aef\u673a\u5668\u7684 IP \u5730\u5740&#xff0c;\u6ce8\u610f\u00a0&amp; stop \u5355\u72ec\u653e\u5728\u4e00\u884c\u3002<\/p>\n<h5>2. \u6821\u9a8crsyslog \u914d\u7f6e<\/h5>\n<p>\u4e3a\u4e86\u786e\u4fdd\u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5\u6b63\u786e&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5 rsyslog \u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>rsyslogd -N1 <\/p>\n<p>\u53c2\u6570\u8bf4\u660e&#xff1a;<\/p>\n<ul>\n<li>-N: \u8868\u793a\u8fdb\u884c\u914d\u7f6e\u6587\u4ef6\u7684\u8bed\u6cd5\u68c0\u67e5\u3002<\/li>\n<li>-1: \u8868\u793a\u9a8c\u8bc1\u7ea7\u522b\u4e3a 1&#xff0c;\u8fdb\u884c\u57fa\u672c\u7684\u8bed\u6cd5\u68c0\u67e5&#xff0c;\u4e0d\u5305\u62ec\u66f4\u8be6\u7ec6\u7684\u9519\u8bef\u68c0\u67e5\u3002<\/li>\n<\/ul>\n<h5>3. \u91cd\u542f rsyslog \u670d\u52a1<\/h5>\n<p>systemctl restart rsyslog <\/p>\n<h5 style=\"background-color:transparent\">4. \u68c0\u67e5\u9632\u706b\u5899\u8bbe\u7f6e<\/h5>\n<p>\u68c0\u67e5\u9632\u706b\u5899\u6216\u8005iptables\u7684\u914d\u7f6e&#xff0c;\u786e\u4fdd\u5f00\u653e\u4e86 514 \u7aef\u53e3&#xff0c;\u5e76\u4e14\u6ce8\u610f\u662f\u4f7f\u7528\u7684\u00a0UDP \u8fd8\u662f TCP \u534f\u8bae\u3002<\/p>\n<h3><\/h3>\n<h4>\u914d\u7f6e\u5ba2\u6237\u7aef<\/h4>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u56e0\u4e3a\u6211\u4eec\u60f3\u8981\u5b9e\u73b0\u7684\u662f\u8f6c\u53d1\u6307\u5b9aapp\u7684\u65e5\u5fd7&#xff0c;\u5047\u8bbe\u6211\u4eec\u7684app\u65e5\u5fd7\u6587\u4ef6\u5b58\u50a8\u5728 \/var\/log\/myapp.log \u4e2d\u3002<\/p>\n<h5>1. \u7f16\u8f91 rsyslog \u914d\u7f6e\u6587\u4ef6<\/h5>\n<p>\u65e2\u7136\u662f\u81ea\u5b9a\u4e49app\u65e5\u5fd7&#xff0c;\u6240\u4ee5\u5efa\u8bae\u5728\/etc\/rsyslog.d\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3amyapp.conf\u7684\u6587\u4ef6\u914d\u7f6e\u6587\u4ef6\u3002\u5f53\u7136&#xff0c;\u4f60\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\/etc\/rsyslog.conf\u00a0\u3002\u597d\u4e86&#xff0c;\u73b0\u5728\u6253\u5f00 \/etc\/rsyslog.conf \u6216 \/etc\/rsyslog.d\/myapp.conf\u3002<\/p>\n<h6>a.\u6dfb\u52a0imfile\u6a21\u5757\u7684\u914d\u7f6e&#xff1a;<\/h6>\n<p># \u8bfb\u53d6\u81ea\u5b9a\u4e49\u65e5\u5fd7\u6587\u4ef6<br \/>\n$InputFileName \/var\/log\/myapp.log<br \/>\n$InputFileTag myapp-log:<br \/>\n$InputFileStateFile stat-myapp<br \/>\n$InputFileSeverity info<br \/>\n$InputFileFacility local0<br \/>\n$InputRunFileMonitor <\/p>\n<p>\u8fd9\u4e9b\u53c2\u6570\u662f rsyslog \u7684\u6587\u4ef6\u8f93\u5165\u6a21\u5757 imfile \u7684\u914d\u7f6e&#xff0c;\u7528\u4e8e\u76d1\u63a7\u81ea\u5b9a\u4e49\u65e5\u5fd7\u6587\u4ef6&#xff0c;\u5e76\u5c06\u65e5\u5fd7\u5185\u5bb9\u8f6c\u53d1\u6216\u5904\u7406\u3002\u4ee5\u4e0b\u662f\u6bcf\u4e2a\u53c2\u6570\u7684\u8be6\u7ec6\u89e3\u91ca&#xff1a;<\/p>\n<p>$InputFileName<\/p>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u6307\u5b9a\u9700\u8981\u76d1\u63a7\u7684\u81ea\u5b9a\u4e49\u65e5\u5fd7\u6587\u4ef6\u7684\u8def\u5f84\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;$InputFileName \/var\/log\/myapp.log\n<ul>\n<li>\u8fd9\u610f\u5473\u7740 rsyslog \u5c06\u76d1\u63a7 \/var\/log\/myapp.log \u6587\u4ef6&#xff0c;\u6355\u83b7\u8be5\u6587\u4ef6\u4e2d\u7684\u65e5\u5fd7\u6761\u76ee\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>$InputFileTag<\/p>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u4e3a\u76d1\u63a7\u7684\u65e5\u5fd7\u6587\u4ef6\u751f\u6210\u4e00\u4e2a\u6807\u8bc6\u6807\u7b7e&#xff0c;\u6807\u8bc6\u65e5\u5fd7\u7684\u6765\u6e90\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;$InputFileTag myapp-log:\n<ul>\n<li>\u8fd9\u4e3a\u4ece \/var\/log\/myapp.log \u6587\u4ef6\u4e2d\u8bfb\u53d6\u7684\u6bcf\u6761\u65e5\u5fd7\u8bb0\u5f55\u6dfb\u52a0\u4e86 myapp-log: \u8fd9\u4e2a\u6807\u7b7e\u3002\u8fd9\u4e2a\u6807\u7b7e\u53ef\u4ee5\u5728 rsyslog \u89c4\u5219\u4e2d\u7528\u6765\u5339\u914d\u3001\u8fc7\u6ee4\u6216\u8f6c\u53d1\u7279\u5b9a\u65e5\u5fd7\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>$InputFileStateFile<\/p>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u6307\u5b9a\u4e00\u4e2a\u72b6\u6001\u6587\u4ef6&#xff0c;\u7528\u6765\u4fdd\u5b58\u6587\u4ef6\u7684\u8bfb\u53d6\u72b6\u6001&#xff08;\u4f8b\u5982\u6587\u4ef6\u4e0a\u6b21\u8bfb\u53d6\u5230\u7684\u4f4d\u7f6e&#xff09;\u3002\u5b83\u7528\u4e8e\u5728 rsyslog \u91cd\u542f\u540e&#xff0c;\u7ee7\u7eed\u4ece\u4e0a\u6b21\u4e2d\u65ad\u7684\u5730\u65b9\u8bfb\u53d6\u65e5\u5fd7\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;$InputFileStateFile stat-myapp\n<ul>\n<li>\n<p>\u8fd9\u4e2a\u72b6\u6001\u6587\u4ef6 stat-myapp \u4f1a\u4fdd\u5b58\u5728 \/var\/spool\/rsyslog\/ \u76ee\u5f55\u4e0b&#xff0c;\u8bb0\u5f55\u4e86 \/var\/log\/myapp.log \u6587\u4ef6\u7684\u8bfb\u53d6\u8fdb\u5ea6\u3002<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u4e0d\u6307\u5b9a\u72b6\u6001\u6587\u4ef6&#xff0c;rsyslog \u9ed8\u8ba4\u4f1a\u81ea\u52a8\u751f\u6210\u4e00\u4e2a\u57fa\u4e8e\u6587\u4ef6\u540d\u7684\u72b6\u6001\u6587\u4ef6\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>$InputFileSeverity<\/p>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u6307\u5b9a\u4ece\u8be5\u65e5\u5fd7\u6587\u4ef6\u8bfb\u53d6\u7684\u65e5\u5fd7\u7684\u4e25\u91cd\u6027\u7ea7\u522b&#xff08;Severity&#xff09;\u3002\u4e25\u91cd\u6027\u7ea7\u522b\u7528\u4e8e\u5bf9\u65e5\u5fd7\u8fdb\u884c\u5206\u7c7b&#xff0c;\u6bd4\u5982 info\u3001error\u3001warning \u7b49\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;$InputFileSeverity info\n<ul>\n<li>\u8fd9\u8868\u793a\u5c06\u65e5\u5fd7\u7684\u4e25\u91cd\u6027\u8bbe\u7f6e\u4e3a info \u7ea7\u522b&#xff0c;\u610f\u5473\u7740\u8fd9\u4e9b\u65e5\u5fd7\u4fe1\u606f\u901a\u5e38\u662f\u5e38\u89c4\u64cd\u4f5c\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<p>\u5e38\u89c1\u7684\u4e25\u91cd\u6027\u7ea7\u522b&#xff1a; <\/p>\n<ul>\n<li>emerg: \u7cfb\u7edf\u4e0d\u53ef\u7528<\/li>\n<li>alert: \u5fc5\u987b\u7acb\u5373\u91c7\u53d6\u884c\u52a8<\/li>\n<li>crit: \u4e25\u91cd\u60c5\u51b5<\/li>\n<li>err: \u9519\u8bef<\/li>\n<li>warning: \u8b66\u544a<\/li>\n<li>notice: \u6b63\u5e38\u4f46\u91cd\u8981\u7684\u4fe1\u606f<\/li>\n<li>info: \u4fe1\u606f\u6027\u6d88\u606f<\/li>\n<li>debug: \u8c03\u8bd5\u6d88\u606f<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>$InputFileFacility<\/p>\n<ul>\n<li>\n<p>\u4f5c\u7528&#xff1a;\u6307\u5b9a\u65e5\u5fd7\u7684\u8bbe\u65bd&#xff08;Facility&#xff09;\u3002\u8bbe\u65bd\u5b9a\u4e49\u4e86\u65e5\u5fd7\u6d88\u606f\u7684\u6765\u6e90\u7c7b\u522b&#xff0c;\u7528\u4e8e\u5c06\u4e0d\u540c\u6765\u6e90\u7684\u65e5\u5fd7\u5206\u5f00\u3002<\/p>\n<\/li>\n<li>\n<p>\u793a\u4f8b&#xff1a;$InputFileFacility local0<\/p>\n<ul>\n<li>\u8fd9\u610f\u5473\u7740\u65e5\u5fd7\u6765\u6e90\u7c7b\u522b\u4e3a local0&#xff0c;\u8fd9\u662f\u53ef\u4f9b\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u65e5\u5fd7\u8bbe\u65bd\u4e4b\u4e00\u3002local0 \u5230 local7 \u662f\u4e3a\u7528\u6237\u5b9a\u4e49\u7684\u65e5\u5fd7\u8bbe\u65bd&#xff0c;\u5e38\u7528\u4e8e\u81ea\u5b9a\u4e49\u5e94\u7528\u7a0b\u5e8f\u65e5\u5fd7\u3002<\/li>\n<\/ul>\n<p>\u5e38\u89c1\u8bbe\u65bd&#xff1a;<\/p>\n<ul>\n<li>auth: \u8ba4\u8bc1\u7cfb\u7edf\u4f7f\u7528<\/li>\n<li>cron: \u5b9a\u65f6\u4efb\u52a1\u4f7f\u7528<\/li>\n<li>daemon: \u540e\u53f0\u670d\u52a1\u4f7f\u7528<\/li>\n<li>kern: \u5185\u6838\u65e5\u5fd7<\/li>\n<li>local0 \u5230 local7: \u7528\u6237\u81ea\u5b9a\u4e49\u4f7f\u7528<\/li>\n<li>syslog: syslog \u81ea\u8eab\u65e5\u5fd7<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>$InputRunFileMonitor<\/p>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u542f\u52a8\u5bf9\u6307\u5b9a\u6587\u4ef6\u7684\u76d1\u63a7\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;$InputRunFileMonitor\n<ul>\n<li>\u8fd9\u884c\u6307\u4ee4\u544a\u8bc9 rsyslog \u5f00\u59cb\u76d1\u63a7\u4f60\u901a\u8fc7 $InputFileName \u6307\u5b9a\u7684\u6587\u4ef6\u3002\u4e00\u65e6\u6587\u4ef6\u6709\u65b0\u65e5\u5fd7\u751f\u6210&#xff0c;rsyslog \u5c31\u4f1a\u7acb\u5373\u8bfb\u53d6\u5e76\u5904\u7406\u8fd9\u4e9b\u65e5\u5fd7\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h6>b. \u914d\u7f6e\u8f6c\u53d1\u89c4\u5219<\/h6>\n<p>\u5728\u540c\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d&#xff0c;\u6dfb\u52a0\u89c4\u5219\u5c06\u8fd9\u4e9b\u81ea\u5b9a\u4e49\u65e5\u5fd7\u8f6c\u53d1\u5230\u670d\u52a1\u7aef\u3002\u53ef\u4ee5\u6839\u636e\u9700\u8981\u9009\u62e9 UDP \u6216 TCP \u8fdb\u884c\u8f6c\u53d1&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u4f7f\u7528 UDP \u8f6c\u53d1&#xff1a;<\/p>\n<\/li>\n<\/ul>\n<p>if $syslogtag &#061;&#061; &#039;myapp-log:&#039; then &#064;remote-host:514 <\/p>\n<ul>\n<li>\n<p>\u4f7f\u7528 TCP \u8f6c\u53d1&#xff1a;<\/p>\n<\/li>\n<\/ul>\n<p>if $syslogtag &#061;&#061; &#039;myapp-log:&#039; then &#064;&#064;remote-host:514 <\/p>\n<p>\u5c06remote-host \u66ff\u6362\u4e3a\u670d\u52a1\u7aef\u7684 IP \u5730\u5740\u6216\u4e3b\u673a\u540d&#xff0c;514 \u662fsyslog \u7684\u9ed8\u8ba4\u7aef\u53e3\u3002<\/p>\n<h5 style=\"background-color:transparent\">2. \u6821\u9a8crsyslog \u914d\u7f6e<\/h5>\n<p>\u540c\u524d\u9762\u4e00\u6837&#xff0c;\u4e3a\u4e86\u786e\u4fdd\u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5\u6b63\u786e&#xff0c;\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p>rsyslogd -N1 <\/p>\n<p>\u8fd9\u4e0d&#xff0c;\u521a\u597d\u53d1\u73b0\u4e86\u9519\u8bef&#xff1a;<\/p>\n<p>[root&#064;localhost \/etc]$ rsyslogd -N1 rsyslogd: version 7.4.7, config validation run (level 1), master config \/etc\/rsyslog.conf rsyslogd: invalid or yet-unknown config file command &#039;inputFileName&#039; &#8211; have you forgotten to load a module? [try http:\/\/www.rsyslog.com\/e\/3003 ] rsyslogd: invalid or yet-unknown config file command &#039;InputFileTag&#039; &#8211; have you forgotten to load a module? [try http:\/\/www.rsyslog.com\/e\/3003 ] rsyslogd: invalid or yet-unknown config file command &#039;InputFileStateFile&#039; &#8211; have you forgotten to load a module? [try http:\/\/www.rsyslog.com\/e\/3003 ] rsyslogd: invalid or yet-unknown config file command &#039;InputFileSeverity&#039; &#8211; have you forgotten to load a module? [try http:\/\/www.rsyslog.com\/e\/3003 ] rsyslogd: invalid or yet-unknown config file command &#039;InputFileFacility&#039; &#8211; have you forgotten to load a module? [try http:\/\/www.rsyslog.com\/e\/3003 ] rsyslogd: invalid or yet-unknown config file command &#039;InputRunFileMonitor&#039; &#8211; have you forgotten to load a module? [try http:\/\/www.rsyslog.com\/e\/3003 ] rsyslogd: End of config validation run. Bye. \u00a0<\/p>\n<p>\u4e0a\u9762\u65e5\u5fd7\u8868\u793arsyslog\u7684\u7248\u672c\u662f7.4.7&#xff0c;\u00a0\u65e0\u6cd5\u8bc6\u522b\u914d\u7f6e\u4e2d\u7684\u90a3\u4e9b\u547d\u4ee4\u3002\u770b\u5230\u8fd9\u4e2a&#xff0c;\u90a3\u8bf4\u660e\u662f\u7248\u672c\u7684\u95ee\u9898\u4e86\u3002<\/p>\n<p>\u4ece\u9519\u8bef\u4fe1\u606f\u6765\u770b&#xff0c;\u5f53\u524d\u7684\u00a0rsyslog \u7248\u672c7.4.7&#xff0c;InputFileName\u3001InputFileTag \u7b49\u6307\u4ee4\u5728\u8be5\u7248\u672c\u4e2d\u65e0\u6548\u6216\u672a\u77e5\u3002<\/p>\n<p>\u8fd9\u79cd\u60c5\u51b5&#xff0c;\u8981\u4e48\u5347\u7ea7rsyslog&#xff0c;\u8981\u4e48\u4fee\u6539\u914d\u7f6e\u7684\u547d\u4ee4\u4e3a\u5f53\u524d\u7248\u672c\u3002\u4e3a\u4e86\u7701\u4e8b&#xff0c;\u6211\u9009\u62e9\u540e\u8005&#xff0c;\u4fee\u6539\u914d\u7f6e&#xff1a;<\/p>\n<p># \/etc\/rsyslog.conf \u6216 \/etc\/rsyslog.d\/ \u6587\u4ef6<\/p>\n<p># \u52a0\u8f7d imfile \u6a21\u5757<br \/>\nmodule(load&#061;&#034;imfile&#034;)<\/p>\n<p># \u914d\u7f6e\u6587\u4ef6\u76d1\u63a7<br \/>\ninput(type&#061;&#034;imfile&#034;<br \/>\n      File&#061;&#034;\/var\/log\/myapp.log&#034;<br \/>\n      Tag&#061;&#034;myapp-log:&#034;<br \/>\n      StateFile&#061;&#034;stat-myapp&#034;<br \/>\n      Severity&#061;&#034;info&#034;<br \/>\n      Facility&#061;&#034;local0&#034;)<\/p>\n<p># \u8f6c\u53d1\u65e5\u5fd7\u5230\u670d\u52a1\u7aef<br \/>\nif $programname &#061;&#061; &#039;myapp-log&#039; then &#064;logserver.example.com:514 <\/p>\n<p>\u5728\u4fee\u6539\u914d\u7f6e\u540e&#xff0c;\u91cd\u65b0\u4f7f\u7528rsyslogd -N1\u547d\u4ee4\u68c0\u67e5\u914d\u7f6e\u662f\u5426\u6b63\u786e\u3002<\/p>\n<h5 style=\"background-color:transparent\">3. \u91cd\u542f rsyslog \u670d\u52a1<\/h5>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u91cd\u542f rsyslog \u670d\u52a1\u4ee5\u4f7f\u65b0\u914d\u7f6e\u751f\u6548&#xff1a;<\/p>\n<p>systemctl restart rsyslog <\/p>\n<h5>4. \u68c0\u67e5\u9632\u706b\u5899\u8bbe\u7f6e<\/h5>\n<p>\u68c0\u67e5\u9632\u706b\u5899\u6216\u8005iptables\u7684\u914d\u7f6e&#xff0c;\u786e\u4fdd\u80fdping\u901a\u670d\u52a1\u7aef\u53ca\u5176\u00a0514 \u7aef\u53e3\u3002<\/p>\n<h5 style=\"background-color:transparent\">5. \u9a8c\u8bc1\u65e5\u5fd7\u4f20\u8f93<\/h5>\n<p>\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u914d\u7f6e\u90fd\u4fee\u6539\u5b8c\u6210\u4e86&#xff0c;\u73b0\u5728\u9a8c\u8bc1\u65e5\u5fd7\u662f\u5426\u80fd\u6b63\u786e\u8f6c\u53d1\u548c\u63a5\u6536\u3002<\/p>\n<ul>\n<li>\u5728\u5ba2\u6237\u7aef\u67e5\u770b \/var\/log\/myapp.log \u4e2d\u7684\u65e5\u5fd7\u662f\u5426\u6709\u65b0\u751f\u6210\u7684\u65e5\u5fd7\u3002<\/li>\n<li>\u5728\u670d\u52a1\u7aef\u67e5\u770b \/var\/log\/remote_myapp.log\u00a0\u6587\u4ef6&#xff0c;\u662f\u5426\u6b63\u786e\u8bb0\u5f55\u4e86\u4ece\u5ba2\u6237\u7aef\u8f6c\u53d1\u8fc7\u6765\u7684\u81ea\u5b9a\u4e49\u65e5\u5fd7\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u6ca1\u6709\u65e5\u5fd7&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177\u5982 nc&#xff08;netcat&#xff09;\u8fdb\u884c\u6d4b\u8bd5&#xff1a;<\/p>\n<p>echo &#034;test log&#034; | nc -u logserver.example.com 514 <\/p>\n<p>\u6b63\u5e38\u60c5\u51b5\u4e0b&#xff0c;\u00a0\u670d\u52a1\u7aef\u67e5\u770b \/var\/log\/remote_myapp.log\u00a0\u6587\u4ef6\u4e2d\u4f1a\u51fa\u73b0&#034;test log&#034;\u7684\u65e5\u5fd7\u3002\u5982\u679c\u6ca1\u6709&#xff0c;\u5219\u9700\u8981\u68c0\u67e5\u4e0b\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u548c\u9632\u706b\u5899\u8bbe\u7f6e&#xff0c;\u786e\u4fdd\u6ca1\u6709\u963b\u6b62\u65e5\u5fd7\u8f6c\u53d1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.7k\u6b21\uff0c\u70b9\u8d5e10\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u4f7f\u7528rsyslog\u8f6c\u53d1\u65e5\u5fd7\u7684\u914d\u7f6e\u65b9\u6cd5_rsyslog\u53d1\u9001\u5230\u670d\u52a1\u5668<\/p>\n","protected":false},"author":2,"featured_media":13527,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,816],"topic":[],"class_list":["post-13528","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-rsyslog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668 - \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\/13528.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.7k\u6b21\uff0c\u70b9\u8d5e10\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u4f7f\u7528rsyslog\u8f6c\u53d1\u65e5\u5fd7\u7684\u914d\u7f6e\u65b9\u6cd5_rsyslog\u53d1\u9001\u5230\u670d\u52a1\u5668\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/13528.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-18T12:32:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123210-6802464add067.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=\"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\/13528.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/13528.html\",\"name\":\"\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T12:32:12+00:00\",\"dateModified\":\"2025-04-18T12:32:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/13528.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/13528.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/13528.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668\"}]},{\"@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":"\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668 - \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\/13528.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.7k\u6b21\uff0c\u70b9\u8d5e10\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u4f7f\u7528rsyslog\u8f6c\u53d1\u65e5\u5fd7\u7684\u914d\u7f6e\u65b9\u6cd5_rsyslog\u53d1\u9001\u5230\u670d\u52a1\u5668","og_url":"https:\/\/www.wsisp.com\/helps\/13528.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T12:32:12+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418123210-6802464add067.png"}],"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\/13528.html","url":"https:\/\/www.wsisp.com\/helps\/13528.html","name":"\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T12:32:12+00:00","dateModified":"2025-04-18T12:32:12+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/13528.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/13528.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/13528.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528rsyslog\u8f6c\u53d1\u81ea\u5b9a\u4e49\u65e5\u5fd7\u5230\u6307\u5b9a\u670d\u52a1\u5668"}]},{"@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\/13528","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=13528"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/13528\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/13527"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=13528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=13528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=13528"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=13528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}