Filtering out unwanted/unneeded message in rsyslog
- December 14th, 2016
- Posted in Documentation
- Write comment
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
…
if $fromhost-ip startswith ‘aaa.bbb.ccc.ddd‘ then /var/log/mylog.log
& ~…
# systemctl restart rsyslog
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:
# vi /etc/rsyslog.conf
…
:msg, contains, “what I want to filter out” ~
…# systemctl restart rsyslog
No comments yet.