Discarding some logs.

ozgurerdogan

Renowned Member
May 2, 2010
627
6
83
Bursa, Turkey, Turkey
I am trying to discard / not writing some infos to logs. I created /etc/rsyslog.d/ignore-proxmox.conf and added belows and installed rsyslog.

if ($programname == 'pveproxy' and $msg contains 'proxy detected vanished client connection') then stop

if ($programname == 'pvestatd' and $msg contains 'status update time') then stop

if ($programname == 'pvedaemon' and $msg contains 'Connection timed out') then stop

But they still shows in syslog. So How can I disard these messages in logs?
 
Hi,

could you clarify why you need to stop logging it?
If you do it you will lost a part of diagnostics information that could be needed in case of failures.
Or it's the main goal?)
But if you still want to have some blind zones in your environment ... rsyslog processes log rules in order, so if your filter file loads too late, the messages are already written before your “stop” rules run.