查看 文件的类型 [root@elk-node-1 rsyslog] # file 192.168.1.16.log 192.168.1.16.log: Non-ISO extended-ASCII text, with very long lines, with LF, NEL line terminators 如果命令返回结果说明改日志为utf-8,则logstash配置文件中charset设置为UTF-8 如果命令返回结果说明改日志不是utf-8,则logstash配置文件中charset