【发布时间】:2019-06-14 19:05:11
【问题描述】:
我目前正在尝试通过logstash 将json 发送到elasticsearch。但是,即使我已验证我的 json 格式正确,我仍然收到一个错误,即存在 jsonparsefailure。我的问题可能是什么?下面是我的配置文件和我的 json
input{
file{
path => "/Users/CFP668/Downloads/gs-accessing-data-mysql-master/complete/example.json"
codec => json
start_position => "beginning"
}
}
filter{
json{
source => "message"
}
}
output{
elasticsearch{
hosts => "localhost:9200"
index => "test123"
}
stdout { codec => rubydebug }
}
"{\"request_id\":1,\"requestDetail_id\":0,\"enrichedContent\":\"enrich cont example\",\"statusCode\":\"P\",\"reasonDesc\":\"This is a test\",\"createdBy\":\"Sarah\",\"createdDate\":\"Sep 24, 2010\"}"
【问题讨论】:
标签: json logstash elastic-stack