{"id":45220,"date":"2025-06-23T06:46:16","date_gmt":"2025-06-22T22:46:16","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/45220.html"},"modified":"2025-06-23T06:46:16","modified_gmt":"2025-06-22T22:46:16","slug":"rsyslog%e6%97%a5%e5%bf%97-%e5%a6%82%e4%bd%95%e6%8a%8a-%e6%af%94%e5%a6%82%e4%ba%a4%e6%8d%a2%e6%9c%ba%ef%bc%8c%e8%b7%af%e7%94%b1%e5%99%a8%e8%bf%99%e7%b1%bb%e7%9a%84-%e4%bb%a5%e5%8f%8a%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/45220.html","title":{"rendered":"rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066"},"content":{"rendered":"<p>\u8981\u5c06\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u548c\u670d\u52a1\u5668\u65e5\u5fd7\u96c6\u4e2d\u5b58\u50a8\u5230\u4e13\u7528\u65e5\u5fd7\u670d\u52a1\u5668&#xff0c;\u540c\u65f6\u786e\u4fdd\u6e90\u8bbe\u5907&#xff08;\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u3001\u670d\u52a1\u5668&#xff09;\u7684\u672c\u5730\u5b58\u50a8\u7a7a\u95f4\u4e0d\u88ab\u5360\u6ee1&#xff0c;\u9700\u91c7\u7528 \u667a\u80fd\u65e5\u5fd7\u8f6c\u53d1&#043;\u672c\u5730\u8f6e\u8f6c \u7b56\u7565\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u5b9e\u65bd\u65b9\u6848&#xff1a;<\/p>\n<hr \/>\n<h4>\u4e00\u3001\u6838\u5fc3\u8bbe\u8ba1\u539f\u5219<\/h4>\n<li>\n<p>\u6e90\u8bbe\u5907&#xff1a;\u53ea\u4fdd\u7559\u77ed\u671f\u65e5\u5fd7&#xff08;\u59827\u5929&#xff09;&#xff0c;\u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7<\/p>\n<\/li>\n<li>\n<p>\u65e5\u5fd7\u670d\u52a1\u5668&#xff1a;\u957f\u671f\u5b58\u50a8\u539f\u59cb\u65e5\u5fd7&#xff08;\u59821\u5e74&#xff09;&#043; \u5206\u6790\u5f52\u6863<\/p>\n<\/li>\n<li>\n<p>\u4f20\u8f93\u534f\u8bae&#xff1a;\u4f18\u5148\u4f7f\u7528 TCP&#043;TLS \u4fdd\u969c\u53ef\u9760\u6027<\/p>\n<\/li>\n<hr \/>\n<h4>\u4e8c\u3001\u7f51\u7edc\u8bbe\u5907\u914d\u7f6e&#xff08;\u4ee5Cisco\/Huawei\u4e3a\u4f8b&#xff09;<\/h4>\n<h5>1. Cisco\u8bbe\u5907 &#8211; \u63a7\u5236\u672c\u5730\u5b58\u50a8<\/h5>\n<p>cisco<\/p>\n<p>! \u9650\u5236\u672c\u5730\u65e5\u5fd7\u7f13\u5b58\u5927\u5c0f&#xff08;\u9ed8\u8ba44MB&#xff09;<br \/>\nlogging buffered 4096<br \/>\n! \u8bbe\u7f6e\u65e5\u5fd7\u670d\u52a1\u5668&#xff08;TCP&#xff09;<br \/>\nlogging host 192.168.1.100 transport tcp<br \/>\n! \u7981\u6b62\u5411\u63a7\u5236\u53f0\u8f93\u51fa\u65e5\u5fd7<br \/>\nno logging console<br \/>\n! \u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7&#xff08;\u6bcf\u5f53\u65e5\u5fd7\u6ee1\u65f6&#xff09;<br \/>\nlogging persistent url flash:\/logs size 10 filesize 4 <\/p>\n<h5>2. Huawei\u8bbe\u5907 &#8211; \u672c\u5730\u65e5\u5fd7\u8f6e\u8f6c<\/h5>\n<p>huawei<\/p>\n<p># \u8bbe\u7f6e\u65e5\u5fd7\u670d\u52a1\u5668<br \/>\ninfo-center loghost 192.168.1.100 facility local6<br \/>\n# \u9650\u5236\u672c\u5730\u65e5\u5fd7\u6587\u4ef6\u5927\u5c0f&#xff08;\u6700\u592710MB&#xff0c;\u4fdd\u75595\u4e2a&#xff09;<br \/>\ninfo-center logfile size 10 max-file-number 5<br \/>\n# \u5173\u95ed\u4e0d\u5fc5\u8981\u8f93\u51fa<br \/>\ninfo-center console channel deny <\/p>\n<hr \/>\n<h4>\u4e09\u3001Linux\u670d\u52a1\u5668\u914d\u7f6e<\/h4>\n<h5>1. \u5ba2\u6237\u7aef\u914d\u7f6e&#xff08;\u63a7\u5236\u672c\u5730\u5b58\u50a8&#xff09;<\/h5>\n<p>bash<\/p>\n<p># \/etc\/rsyslog.d\/forward.conf<br \/>\n# \u8f6c\u53d1\u6240\u6709\u65e5\u5fd7\u5230\u4e2d\u5fc3\u670d\u52a1\u5668<br \/>\n*.* &#064;&#064;192.168.1.100:514  # TCP\u4f20\u8f93<\/p>\n<p># \u672c\u5730\u53ea\u4fdd\u75597\u5929\u65e5\u5fd7&#xff08;\u901a\u8fc7logrotate&#xff09;<br \/>\nsudo tee \/etc\/logrotate.d\/rsyslog-local &lt;&lt;&#039;EOF&#039;<br \/>\n\/var\/log\/syslog {<br \/>\n    daily<br \/>\n    rotate 7<br \/>\n    compress<br \/>\n    delaycompress<br \/>\n    missingok<br \/>\n    postrotate<br \/>\n        \/usr\/lib\/rsyslog\/rsyslog-rotate<br \/>\n    endscript<br \/>\n}<br \/>\nEOF <\/p>\n<h5>2. \u65e5\u5fd7\u670d\u52a1\u5668\u914d\u7f6e<\/h5>\n<p>bash<\/p>\n<p># \/etc\/rsyslog.d\/central.conf<br \/>\n# \u63a5\u6536\u8fdc\u7a0b\u65e5\u5fd7\u5e76\u5206\u7c7b\u5b58\u50a8<br \/>\n$template RemoteLogs,&#034;\/var\/log\/remote\/%FROMHOST-IP%\/%$YEAR%-%$MONTH%-%$DAY%.log&#034;<br \/>\nruleset(name&#061;&#034;remote&#034;) {<br \/>\n    action(type&#061;&#034;omfile&#034; template&#061;&#034;RemoteLogs&#034;)<br \/>\n    # \u53ef\u9009&#xff1a;\u540c\u65f6\u5199\u5165Elasticsearch<br \/>\n    action(type&#061;&#034;omelasticsearch&#034; server&#061;&#034;localhost&#034; index&#061;&#034;logs-%FROMHOST-IP%&#034;)<br \/>\n}<\/p>\n<p>module(load&#061;&#034;imtcp&#034; MaxSessions&#061;&#034;500&#034;)<br \/>\ninput(type&#061;&#034;imtcp&#034; port&#061;&#034;514&#034; ruleset&#061;&#034;remote&#034;) <\/p>\n<hr \/>\n<h4>\u56db\u3001Windows\u670d\u52a1\u5668\u914d\u7f6e<\/h4>\n<p>\u4f7f\u7528 NXLog CE&#xff08;\u793e\u533a\u7248&#xff09;\u5b9e\u73b0\u65e5\u5fd7\u8f6c\u53d1\u548c\u672c\u5730\u6e05\u7406&#xff1a;<\/p>\n<p>xml<\/p>\n<p># nxlog.conf<br \/>\n&lt;Input eventlog&gt;<br \/>\n    Module  im_msvistalog<br \/>\n    SavePos TRUE<br \/>\n&lt;\/Input&gt;<\/p>\n<p>&lt;Output file&gt;<br \/>\n    Module  om_file<br \/>\n    File    &#034;C:\\\\\\\\Logs\\\\\\\\system_events.log&#034;<br \/>\n    Exec    if file_size() &gt; 10MB file_cycle();<br \/>\n&lt;\/Output&gt;<\/p>\n<p>&lt;Output rsyslog&gt;<br \/>\n    Module  om_tcp<br \/>\n    Host    192.168.1.100<br \/>\n    Port    514<br \/>\n&lt;\/Output&gt;<\/p>\n<p>&lt;Route 1&gt;<br \/>\n    Path    eventlog &#061;&gt; file, rsyslog<br \/>\n&lt;\/Route&gt; <\/p>\n<hr \/>\n<h4>\u4e94\u3001\u5b58\u50a8\u7a7a\u95f4\u4fdd\u969c\u63aa\u65bd<\/h4>\n<h5>1. \u6e90\u8bbe\u5907\u7a7a\u95f4\u63a7\u5236<\/h5>\n<table>\n<tr>\u8bbe\u5907\u7c7b\u578b\u63a7\u5236\u65b9\u6cd5<\/tr>\n<tbody>\n<tr>\n<td>Cisco<\/td>\n<td>logging buffered 4096 &#043; logging persistent size 10<\/td>\n<\/tr>\n<tr>\n<td>Huawei<\/td>\n<td>info-center logfile size 10 max-file-number 5<\/td>\n<\/tr>\n<tr>\n<td>Linux<\/td>\n<td>logrotate \u6309\u5927\u5c0f\/\u65f6\u95f4\u8f6e\u8f6c<\/td>\n<\/tr>\n<tr>\n<td>Windows<\/td>\n<td>NXLog\u7684file_cycle()\u51fd\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>2. \u65e5\u5fd7\u670d\u52a1\u5668\u5b58\u50a8\u89c4\u5212<\/h5>\n<p>bash<\/p>\n<p># \u8ba1\u7b97\u6240\u9700\u5b58\u50a8\u7a7a\u95f4<br \/>\n\u9884\u4f30\u516c\u5f0f&#xff1a;<br \/>\n\u603b\u7a7a\u95f4 &#061; (\u5355\u8bbe\u5907\u65e5\u5747\u65e5\u5fd7\u91cf \u00d7 \u8bbe\u5907\u6570 \u00d7 \u4fdd\u7559\u5929\u6570) \u00d7 \u5197\u4f59\u7cfb\u6570(1.3)<\/p>\n<p>\u793a\u4f8b&#xff1a;<br \/>\n50\u53f0\u8bbe\u5907 \u00d7 50MB\/\u5929 \u00d7 365\u5929 \u00d7 1.3 \u2248 1.2TB <\/p>\n<h5>3. \u81ea\u52a8\u6e05\u7406\u811a\u672c&#xff08;\u65e5\u5fd7\u670d\u52a1\u5668&#xff09;<\/h5>\n<p>bash<\/p>\n<p># \/usr\/local\/bin\/clean_old_logs.sh<br \/>\n#!\/bin\/bash<br \/>\nfind \/var\/log\/remote\/ -name &#034;*.log&#034; -mtime &#043;365 -delete<br \/>\n# \u6dfb\u52a0\u5230cron<br \/>\n(crontab -l ; echo &#034;0 3 * * * \/usr\/local\/bin\/clean_old_logs.sh&#034;) | crontab &#8211; <\/p>\n<hr \/>\n<h4>\u516d\u3001\u4f20\u8f93\u53ef\u9760\u6027\u4fdd\u969c<\/h4>\n<h5>1. \u65ad\u7f51\u7f13\u5b58&#xff08;\u5ba2\u6237\u7aef&#xff09;<\/h5>\n<p>bash<\/p>\n<p># Linux\u5ba2\u6237\u7aef\u914d\u7f6e\u672c\u5730\u961f\u5217<br \/>\n# \/etc\/rsyslog.d\/queue.conf<br \/>\n$ActionQueueFileName queue  # \u5185\u5b58\u961f\u5217\u540d\u79f0<br \/>\n$ActionQueueMaxDiskSpace 1g # \u6700\u5927\u78c1\u76d8\u7f13\u5b58<br \/>\n$ActionQueueSaveOnShutdown on<br \/>\n$ActionQueueType LinkedList<br \/>\n$ActionResumeRetryCount -1  # \u65e0\u9650\u91cd\u8bd5 <\/p>\n<h5>2. \u65e5\u5fd7\u5b8c\u6574\u6027\u6821\u9a8c<\/h5>\n<p>bash<\/p>\n<p># \u4f7f\u7528rsyslog\u7684imfile\u6a21\u5757\u8ddf\u8e2a\u6587\u4ef6\u4f4d\u7f6e<br \/>\nmodule(load&#061;&#034;imfile&#034; Mode&#061;&#034;inotify&#034;)<br \/>\ninput(<br \/>\n    type&#061;&#034;imfile&#034;<br \/>\n    File&#061;&#034;\/var\/log\/network.log&#034;<br \/>\n    Tag&#061;&#034;net-device&#034;<br \/>\n    ReadMode&#061;&#034;2&#034;  # \u8ddf\u8e2ainode\u9632\u6b62\u65e5\u5fd7\u8f6e\u8f6c\u4e22\u5931<br \/>\n) <\/p>\n<hr \/>\n<h4>\u4e03\u3001\u76d1\u63a7\u4e0e\u544a\u8b66<\/h4>\n<h5>1. \u65e5\u5fd7\u6536\u96c6\u72b6\u6001\u76d1\u63a7<\/h5>\n<p>bash<\/p>\n<p># \u68c0\u67e5\u5404\u8bbe\u5907\u6700\u65b0\u65e5\u5fd7\u65f6\u95f4<br \/>\nfind \/var\/log\/remote\/ -type f -name &#034;*.log&#034; -exec stat -c &#034;%n %y&#034; {} \\\\; | sort -k2 <\/p>\n<h5>2. Prometheus\u76d1\u63a7\u6307\u6807<\/h5>\n<p>yaml<\/p>\n<p># rsyslog exporter\u914d\u7f6e<br \/>\nscrape_configs:<br \/>\n  &#8211; job_name: &#039;rsyslog&#039;<br \/>\n    static_configs:<br \/>\n      &#8211; targets: [&#039;192.168.1.100:9100&#039;] <\/p>\n<h5>3. \u78c1\u76d8\u7a7a\u95f4\u544a\u8b66\u89c4\u5219<\/h5>\n<p>bash<\/p>\n<p># \/usr\/local\/bin\/check_disk.sh<br \/>\n#!\/bin\/bash<br \/>\nTHRESHOLD&#061;90<br \/>\nUSAGE&#061;$(df -h \/var\/log | awk &#039;NR&#061;&#061;2{print $5}&#039; | tr -d &#039;%&#039;)<br \/>\n[ $USAGE -gt $THRESHOLD ] &amp;&amp; \\\\<br \/>\necho &#034;Alert: Log disk usage $USAGE%&#034; | mail -s &#034;STORAGE ALERT&#034; admin&#064;example.com <\/p>\n<hr \/>\n<h4>\u516b\u3001\u5b9e\u65bd\u6d41\u7a0b\u56fe<\/h4>\n<p>\u56fe\u8868<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"423\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250622224615-685887b73fc5a.png\" width=\"648\" \/><\/p>\n<p>\u4ee3\u7801<\/p>\n<hr \/>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6848&#xff0c;\u60a8\u5c06\u83b7\u5f97&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u6e90\u8bbe\u5907&#xff1a;\u672c\u5730\u4ec5\u4fdd\u7559\u5fc5\u8981\u65e5\u5fd7&#xff0c;\u907f\u514d\u5b58\u50a8\u6ea2\u51fa<\/p>\n<\/li>\n<li>\n<p>\u96c6\u4e2d\u5b58\u50a8&#xff1a;\u6240\u6709\u539f\u59cb\u65e5\u5fd7\u957f\u671f\u4fdd\u7559\u5728\u4e13\u7528\u670d\u52a1\u5668<\/p>\n<\/li>\n<li>\n<p>\u53ef\u9760\u6027&#xff1a;\u65ad\u7f51\u7f13\u5b58&#043;\u52a0\u5bc6\u4f20\u8f93\u786e\u4fdd\u6570\u636e\u4e0d\u4e22\u5931<\/p>\n<\/li>\n<li>\n<p>\u53ef\u6269\u5c55\u6027&#xff1a;\u652f\u6301\u540e\u7eed\u63a5\u5165SIEM\u5206\u6790\u5e73\u53f0&#xff08;\u5982Splunk&#xff09;<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb696\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf24\u6b21\u3002\u8981\u5c06\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u548c\u670d\u52a1\u5668\u65e5\u5fd7\u96c6\u4e2d\u5b58\u50a8\u5230\u4e13\u7528\u65e5\u5fd7\u670d\u52a1\u5668\uff0c\u540c\u65f6\u786e\u4fdd\u6e90\u8bbe\u5907\uff08\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u3001\u670d\u52a1\u5668\uff09\u7684\u672c\u5730\u5b58\u50a8\u7a7a\u95f4\u4e0d\u88ab\u5360\u6ee1\uff0c\u9700\u91c7\u7528\u3002\u603b\u7a7a\u95f4 = (\u5355\u8bbe\u5907\u65e5\u5747\u65e5\u5fd7\u91cf \u00d7 \u8bbe\u5907\u6570 \u00d7 \u4fdd\u7559\u5929\u6570) \u00d7 \u5197\u4f59\u7cfb\u6570(1.3)# \u9650\u5236\u672c\u5730\u65e5\u5fd7\u6587\u4ef6\u5927\u5c0f\uff08\u6700\u592710MB\uff0c\u4fdd\u75595\u4e2a\uff09# \u672c\u5730\u53ea\u4fdd\u75597\u5929\u65e5\u5fd7\uff08\u901a\u8fc7logrotate\uff09\uff1a\u53ea\u4fdd\u7559\u77ed\u671f\u65e5\u5fd7\uff08\u59827\u5929\uff09\uff0c\u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7\u3002\uff1a\u957f\u671f\u5b58\u50a8\u539f\u59cb\u65e5\u5fd7\uff08\u59821\u5e74\uff09+ \u5206\u6790\u5f52\u6863\u3002\u9650\u5236\u672c\u5730\u65e5\u5fd7\u7f13\u5b58\u5927\u5c0f\uff08\u9ed8\u8ba44MB\uff09\u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7\uff08\u6bcf\u5f53\u65e5\u5fd7\u6ee1\u65f6\uff09\uff1a\u672c\u5730\u4ec5\u4fdd\u7559\u5fc5\u8981\u65e5\u5fd7\uff0c\u907f\u514d\u5b58\u50a8\u6ea2\u51fa\u3002<\/p>\n","protected":false},"author":2,"featured_media":45219,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[167,43,78,44],"topic":[],"class_list":["post-45220","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-167","tag-43","tag-78","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066 - \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\/45220.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb696\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf24\u6b21\u3002\u8981\u5c06\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u548c\u670d\u52a1\u5668\u65e5\u5fd7\u96c6\u4e2d\u5b58\u50a8\u5230\u4e13\u7528\u65e5\u5fd7\u670d\u52a1\u5668\uff0c\u540c\u65f6\u786e\u4fdd\u6e90\u8bbe\u5907\uff08\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u3001\u670d\u52a1\u5668\uff09\u7684\u672c\u5730\u5b58\u50a8\u7a7a\u95f4\u4e0d\u88ab\u5360\u6ee1\uff0c\u9700\u91c7\u7528\u3002\u603b\u7a7a\u95f4 = (\u5355\u8bbe\u5907\u65e5\u5747\u65e5\u5fd7\u91cf \u00d7 \u8bbe\u5907\u6570 \u00d7 \u4fdd\u7559\u5929\u6570) \u00d7 \u5197\u4f59\u7cfb\u6570(1.3)# \u9650\u5236\u672c\u5730\u65e5\u5fd7\u6587\u4ef6\u5927\u5c0f\uff08\u6700\u592710MB\uff0c\u4fdd\u75595\u4e2a\uff09# \u672c\u5730\u53ea\u4fdd\u75597\u5929\u65e5\u5fd7\uff08\u901a\u8fc7logrotate\uff09\uff1a\u53ea\u4fdd\u7559\u77ed\u671f\u65e5\u5fd7\uff08\u59827\u5929\uff09\uff0c\u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7\u3002\uff1a\u957f\u671f\u5b58\u50a8\u539f\u59cb\u65e5\u5fd7\uff08\u59821\u5e74\uff09+ \u5206\u6790\u5f52\u6863\u3002\u9650\u5236\u672c\u5730\u65e5\u5fd7\u7f13\u5b58\u5927\u5c0f\uff08\u9ed8\u8ba44MB\uff09\u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7\uff08\u6bcf\u5f53\u65e5\u5fd7\u6ee1\u65f6\uff09\uff1a\u672c\u5730\u4ec5\u4fdd\u7559\u5fc5\u8981\u65e5\u5fd7\uff0c\u907f\u514d\u5b58\u50a8\u6ea2\u51fa\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/45220.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-22T22:46:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250622224615-685887b73fc5a.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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/45220.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/45220.html\",\"name\":\"rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-22T22:46:16+00:00\",\"dateModified\":\"2025-06-22T22:46:16+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/45220.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/45220.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/45220.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066\"}]},{\"@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":"rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066 - \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\/45220.html","og_locale":"zh_CN","og_type":"article","og_title":"rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb696\u6b21\uff0c\u70b9\u8d5e11\u6b21\uff0c\u6536\u85cf24\u6b21\u3002\u8981\u5c06\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u548c\u670d\u52a1\u5668\u65e5\u5fd7\u96c6\u4e2d\u5b58\u50a8\u5230\u4e13\u7528\u65e5\u5fd7\u670d\u52a1\u5668\uff0c\u540c\u65f6\u786e\u4fdd\u6e90\u8bbe\u5907\uff08\u4ea4\u6362\u673a\u3001\u8def\u7531\u5668\u3001\u670d\u52a1\u5668\uff09\u7684\u672c\u5730\u5b58\u50a8\u7a7a\u95f4\u4e0d\u88ab\u5360\u6ee1\uff0c\u9700\u91c7\u7528\u3002\u603b\u7a7a\u95f4 = (\u5355\u8bbe\u5907\u65e5\u5747\u65e5\u5fd7\u91cf \u00d7 \u8bbe\u5907\u6570 \u00d7 \u4fdd\u7559\u5929\u6570) \u00d7 \u5197\u4f59\u7cfb\u6570(1.3)# \u9650\u5236\u672c\u5730\u65e5\u5fd7\u6587\u4ef6\u5927\u5c0f\uff08\u6700\u592710MB\uff0c\u4fdd\u75595\u4e2a\uff09# \u672c\u5730\u53ea\u4fdd\u75597\u5929\u65e5\u5fd7\uff08\u901a\u8fc7logrotate\uff09\uff1a\u53ea\u4fdd\u7559\u77ed\u671f\u65e5\u5fd7\uff08\u59827\u5929\uff09\uff0c\u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7\u3002\uff1a\u957f\u671f\u5b58\u50a8\u539f\u59cb\u65e5\u5fd7\uff08\u59821\u5e74\uff09+ \u5206\u6790\u5f52\u6863\u3002\u9650\u5236\u672c\u5730\u65e5\u5fd7\u7f13\u5b58\u5927\u5c0f\uff08\u9ed8\u8ba44MB\uff09\u81ea\u52a8\u6e05\u7406\u65e7\u65e5\u5fd7\uff08\u6bcf\u5f53\u65e5\u5fd7\u6ee1\u65f6\uff09\uff1a\u672c\u5730\u4ec5\u4fdd\u7559\u5fc5\u8981\u65e5\u5fd7\uff0c\u907f\u514d\u5b58\u50a8\u6ea2\u51fa\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/45220.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-22T22:46:16+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250622224615-685887b73fc5a.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/45220.html","url":"https:\/\/www.wsisp.com\/helps\/45220.html","name":"rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-22T22:46:16+00:00","dateModified":"2025-06-22T22:46:16+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/45220.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/45220.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/45220.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"rsyslog\u65e5\u5fd7 \u5982\u4f55\u628a \u6bd4\u5982\u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7 \u5168\u90e8\u96c6\u4e2d\u5230\u4e00\u53f0\u4e13\u95e8\u6751\u65e5\u5fd7\u7684\u670d\u52a1\u5668\u4e2d \u8fd8\u80fd\u4fdd\u8bc1 \u4ea4\u6362\u673a\uff0c\u8def\u7531\u5668\u8fd9\u7c7b\u7684 \u4ee5\u53ca\u670d\u52a1\u5668\u4e4b\u7c7b\u7684\u65e5\u5fd7\u6e90\u7cfb\u7edf\u90e8\u52066"}]},{"@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\/45220","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=45220"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/45220\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/45219"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=45220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=45220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=45220"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=45220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}