Q:非洲食人族的酋长吃什么?

如何使用logstash解析json对象数组数据?

Logstash | 作者 Magina | 发布于2019年04月11日 | 阅读数:3343

ES存储了如下格式的数据,使用logstash的json-fileter无法正确解析,请问如何在logstash中正确的解析此类数据格式?json数组的size是不定的!
{
"key": "serializer",
"value": "widget"
},
{
"key": "namespace_id",
"value": "FaceTeam"
},
{
"key": "project_id",
"value": "foxconn"
},
{
"key": "id",
"value": "229"
}
已邀请:

laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自:

参考实现:
input{
exec{
command => "cat file.json"
codec => json_lines
interval => 60
}
}
output{
stdout{codec => ruby_debug}
}
https://discuss.elastic.co/t/b ... 809/5

要回复问题请先登录注册