{"id":1472,"date":"2016-12-14T12:05:25","date_gmt":"2016-12-14T19:05:25","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=1472"},"modified":"2016-12-14T12:05:25","modified_gmt":"2016-12-14T19:05:25","slug":"filtering-out-unwantedunneeded-message-in-rsyslog","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=1472","title":{"rendered":"Filtering out unwanted\/unneeded message in rsyslog"},"content":{"rendered":"<p>I wanted to log as much useful information as I could from a Avaya phone system to my CentOS 7.x syslog server running rsyslogd.<\/p>\n<p>That was easy, as I may noted before here:<\/p>\n<blockquote><p># vi \/etc\/rsyslog.conf<br \/>\n&#8230;<br \/>\nif $fromhost-ip startswith &#8216;<em>aaa.bbb.ccc.ddd<\/em>&#8216; then \/var\/log\/<em>mylog.log<\/em><br \/>\n&#038; ~<\/p>\n<p>&#8230;<\/p>\n<p># systemctl restart rsyslog<\/p><\/blockquote>\n<p>However, I found my log flooded with the same unneeded messages over and over.  To prevent those message from being logged into any of the log files, I made the following configuration changes:<\/p>\n<blockquote><p># vi \/etc\/rsyslog.conf<br \/>\n&#8230;<br \/>\n:msg, contains, &#8220;<em>what I want to filter out<\/em>&#8221; ~<br \/>\n&#8230;<\/p>\n<p># systemctl restart rsyslog<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to log as much useful information as I could from a Avaya phone system to my CentOS 7.x syslog server running rsyslogd. That was easy, as I may noted before here: # vi \/etc\/rsyslog.conf &#8230; if $fromhost-ip startswith &#8216;aaa.bbb.ccc.ddd&#8216; then \/var\/log\/mylog.log &#038; ~ &#8230; # systemctl restart rsyslog However, I found my log [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[40,437,48,419],"class_list":["post-1472","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-centos","tag-filter","tag-linux","tag-syslog"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1472"}],"version-history":[{"count":1,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1472\/revisions"}],"predecessor-version":[{"id":1473,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1472\/revisions\/1473"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}