设置参数 `node.name` 可以自定义 Elasticsearch 节点的名字。 此条 Tips 由 medcl 贡献。

logstash怎么处理\\x09\\x09\\x09这类的特殊字符?

Logstash | 作者 a505100745 | 发布于2018年05月14日 | 阅读数:4190

nginx日志出现了带特殊字符的日志,logstash无法解析,报错。日志如下:
{"http_host": "xxxxx.com", "time_local": "14/May/2018:15:40:09 +0800", "remote_addr": "10.0.0.23", "remote_user": "-", "request": "GET / HTTP/1.1", "status": "200", "body_bytes_sent": "52", "http_referrer": "-", "http_user_agent": "Mozilla/5.0 (Linux; Android 4.4.4; HUAWEI ALE-CL00 Build/HuaweiALE-CL00; wv) \x09\x09\x09AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043015 Safari/537.36 V1_AND_SQ_6.6.9_482_YYB_D QQ/6.6.9.3060 NetType/2G WebP/0.3.0 Pixel/720", "http_x_forwarded_for": "xx.xx.xxx.xx, xx.xx.x.x", "request_time": "0.019", "upstream_response_time": "0.019"}

 
[b]http_user_agent字段出现\x09\x09\x09有没有大神遇到过同样问题的,请大神帮忙解决下,谢谢了。[/b]
logstash报错日志:
LogStash::Json::ParserError: Unrecognized character escape 'x' (code 120)



 
已邀请:

要回复问题请先登录注册