{"id":1966,"date":"2014-04-03T01:52:24","date_gmt":"2014-04-02T21:52:24","guid":{"rendered":"https:\/\/sandalov.org\/blog\/?p=1966"},"modified":"2014-04-03T01:52:25","modified_gmt":"2014-04-02T21:52:25","slug":"remote-rsyslogd-with-filters","status":"publish","type":"post","link":"https:\/\/sandalov.org\/blog\/1966\/","title":{"rendered":"Remote rsyslogd with filters"},"content":{"rendered":"<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>Add at the beginning of \/etc\/rsyslog.d\/50-default.conf:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$template PerHostLog,&quot;\/var\/log\/filename.log&quot;\nif $fromhost-ip != \u2019127.0.0.1\u2032 then -?PerHostLog\n&amp; ~\n<\/pre>\n<p>Uncomment the lines in \/etc\/rsyslog.conf:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ModLoad imudp\n$UDPServerRun 514\n$ModLoad imtcp\n$InputTCPServerRun 514\n<\/pre>\n<p>Restart the service<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo service rsyslog restart\n<\/pre>\n<p>Don&#8217;t forget to tune the permissions:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo chown syslog:syslog \/var\/log\n<\/pre>\n<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Add at the beginning of \/etc\/rsyslog.d\/50-default.conf: $template PerHostLog,&quot;\/var\/log\/filename.log&quot; if $fromhost-ip != \u2019127.0.0.1\u2032 then -?PerHostLog &amp; ~ Uncomment the lines in \/etc\/rsyslog.conf: $ModLoad imudp $UDPServerRun 514 $ModLoad imtcp $InputTCPServerRun 514 Restart the service sudo service rsyslog restart Don&#8217;t forget to tune the permissions: sudo chown syslog:syslog \/var\/log<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1966","post","type-post","status-publish","format-standard","hentry","category-unsorted"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/comments?post=1966"}],"version-history":[{"count":1,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1966\/revisions"}],"predecessor-version":[{"id":1967,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1966\/revisions\/1967"}],"wp:attachment":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/media?parent=1966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/categories?post=1966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/tags?post=1966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}