INPUT: json
{"userid": 125,"type": "SELL"}
{"userid": 127,"type": "SELL"}
LOGSTASH CONF FILE:
input {
kafka {
bootstrap_servers => ""
topics => ["topic1"]
codec => "json"
}
}
output {
amazon_es {
hosts => ["XXXX"]
region => "XXXXX"
aws_access_key_id => 'xxxxxxxxxxxx'
aws_secret_access_key => 'xxxxxxxxxxx'
index => "indexname"
}
stdout { codec => rubydebug }
}
stdout output:
{
"userid" => 127,
"@version" => "1",
"@timestamp" => 2018-10-18T13:54:37.641Z,
"type" => "SELL"
}
The output looks exactly like what I want. But this will just not go into the elasticsearch topic.
If I do not use the json filter the entire json goes as 'message' into ES.
Any help will be appreciated.