I am receiving the Web service data say from Twitter and logging to file and there after I need to send that data to Logstash so as same can be indexed to Elasticsearch.
I am using below config and that is giving jsonparsefailure with exception as
JSON parse failure. Falling back to plain-text {:error=>#> LogStash::Json::ParserError: Unexpected character (':' (code 58)): expected a >valid value (number, String, array, object, 'true', 'false' or 'null')
My logstash conf files looks like :
input
{
file
{
path => ["/mnt/volume2/ELK_Prashant/at/events.json"]
codec => json
type => json
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
output
{
stdout { codec => rubydebug }
}
And data in events.json can be reference from https://dev.twitter.com/rest/reference/get/search/tweets with some sample as below:
events.json
[
{ "location": "LA, CA",
"follow_request_sent": null,
"profile_link_color": "0084B4",
"is_translator": false,
"id_str": "137238150",
"entities": {
"url": {
"urls": [
{
"expanded_url": null,
"url": ""
}
]
}
}
}
]