input { syslog {#接收模式为syslog 当然你也可以用文件的形式 type => "system-syslog" port => 515 # 这里的端口要和你nginx配置文件里access_log配置的一致,这里为接收发送日志端口 } } filter { #在json化之前,使用mutte对\\x字符串进行替换,防止以下错误:ParserError: Un