=====================参数说明====================
& ~表示了一个重定向规则,被用来告知rsyslog守护进程停止对日志消息的进一步处理,
并且不要在本地写入。如果没有使用该重定向规则,那么所有的远程消息都会在写入
上述描述的日志文件之外同时被写入到本地日志文件,这就意味着日志消息实际上被写了两次。
使用该规则的另外一个结果就是syslog服务器本身的日志消息只会被以该机器主机名
命名的专有文件中。

http://www.bubuko.com/infodetail-850192.html


[root@dx-it-mx06 root]# cat /etc/rsyslog.d/20-bash.conf 

# send to sec-rsyslog01

if $syslogfacility-text == 'local1' and not ($msg contains 'User=zabbix') then @10.4.19.9:514

#& ~

[root@dx-it-mx06 root]#