Hi All,
I have a nested json as a file input as below:
[
{
"status": "OK",
"total":2,
"doc_value": {
"state": "1",
"value": "0.203222",
"type": "new"
},
"language": "english",
"doc_state": {
"state": "0.051384",
"data": "0.1089"
},
"uname": "abxdch"
},
{
"status": "OK",
"total": "2",
"doc_value": {
"state": "989",
"value": "0.898222",
"type": "updated"
},
"language": "german",
"doc_state": {
"state": "0.051384",
"data": "0.1089"
},
"uname": "yhtgfr"
}]
Now, I am importing this .json file to ES with logstash:
my conf is:
input
{
file
{
path => "filepath.json"
start_position => beginning
"sincedb_path" => "/dev/null"
"ignore_older" => 0
}
}
filter {
json {
source => "message"
}
}
output {
stdout { codec => "rubydebug" }
elasticsearch {
hosts => "host:port"
index => "index_name"
} }
I understand I am missing out something really basic.
any pointers please
Best,
Divya