我有这个子配置:
UDP 配置:有效
template(name="template1" type="string" string="/var/log/rsyslog/%$YEAR%/%$MONTH%/%HOSTNAME%/%HOSTNAME%-%FROMHOST-IP%.log")
ruleset(name="rule1"){
action(type="omfile" dynaFile="template1")
action(type="omfwd" protocol="udp" target="10.10.10.1" port="1025")
}
input(type="imudp" port="1025" ruleset="rule1")
TCP配置:
配置 1:失败
template(name="template1" type="string" string="/var/log/rsyslog/%$YEAR%/%$MONTH%/%HOSTNAME%/%HOSTNAME%-%FROMHOST-IP%.log")
ruleset(name="rule1"){
action(type="omfile" dynaFile="template1")
action(type="omfwd" protocol="tcp" target="10.10.10.1" port="1025")
}
input(type="imudp" port="1025" ruleset="rule1")
配置 2:失败
template(name="template1" type="string" string="/var/log/rsyslog/%$YEAR%/%$MONTH%/%HOSTNAME%/%HOSTNAME%-%FROMHOST-IP%.log")
ruleset(name="rule1"){
action(type="omfile" dynaFile="template1")
action(type="omfwd" queue.type="linkedlist" queue.filename="queueing" action.resumeRetryCount="-1" queue.saveOnShutdown="on" protocol="tcp" target="10.10.10.1" port="1025")
}
input(type="imudp" port="1025" ruleset="rule1")
有人能帮助我吗?
谢谢