我目前正在测试一个用例,以从远程设备接收网络日志,然后使用rsyslog生成一个非匿名文件和一个完整的数据。
我已经在ryslog.conf中为此创建了一条规则
但是,当我发送测试字符串时,它不会写入任何一个日志文件。
#### RULES ####
#Testing Rules#
if $fromhost-ip == '192.168.62.185' then {
module(load="mmanon")
action(type="omfile" file="/var/log/hosts/worf-ip/non-anon.log")
action(type="mmanon" ipv6.enable="off")
action(type="omfile" file="/var/log/hosts/worf-ip/anon.log")
stop
}
如果我删除了mmanon部分,它将无问题地写入文件。
#### RULES ####
#Testing Rules#
if $fromhost-ip == '192.168.62.185' then {
action(type="omfile" file="/var/log/hosts/worf-ip/non-anon.log")
stop
}