Preventing SYSLOG spam
One of my Raspberry Pis has a problem. When connected to WIFI every few seconds two lines are added to my /var/syslog
:
Mar 6 10:13:15 Pi dhcpcd[764]: eth0: Router Advertisement from...
In this particular example I could fix this by disabling the IPv6 DHCP servive in my router, or disabling IPv6 on the Pi, but for the moment I want to simply keep these messages out of my syslog
.
Happily, there's a nice syntax which allows us to add lines to the /etc/rsyslog.conf
to filter lines sent to the syslog and prohibit them from being added.
In the case of the example above I added the following line near the top of the configuration file:
:msg, contains, "Router Advertisement from" stop
Then restart with sudo systemctl restart rsyslog
and no more junk in the syslog!