filebeat 乱码
查看 文件的类型
[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统一设置为GB2312
filebeat.prospectors:
- input_type: log
encoding: GB2312
paths:
- /slview/resin/log/stdout.log
#这样就可以解析 中文
文献 https://elasticsearch.cn/question/1455