Testing for the first time loading a json document with logstash. I am have logstash 1.5.1 and elastic 1.6.0. I get the error below. Any help is much appreciated.
Thanks in advance for taking a look.
json document:
{
"header":
{
"SenderID": "",
"ReceiverID": "",
"DocTypeID": "MasterBillOfLading",
"DocCount": 1,
"Date": {
"type": "generation",
"Text": "01/26/2015 15:28"
}
}
}
config file:
input {
file
{
path => ["c:/test/mbol-header.json"]
start_position => "beginning"
type => "extract"
}
}
filter
{
json{
source => "message"
}
}
output
{
elasticsearch
{
host => "localhost"
index => "dls"
workers => 1
document_type => "mbol"
}
}
Error message (snippet):
{:timestamp=>"2015-09-18T15:51:13.505000-0500", :message=>"Trouble parsing json", :source=>"message", :raw=>"{\r", :exception=>#<LogStash::Json::ParserError: Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@4250bacb; line: 1, column: 0])
at [Source: [B@4250bacb; line: 2, column: 3]>, :level=>:warn}
{:timestamp=>"2015-09-18T15:51:13.511000-0500", :message=>"Trouble parsing json", :source=>"message", :raw=>"\r", :exception=>#<LogStash::Json::ParserError: No content to map due to end-of-input
at [Source: [B@312ae1ce; line: 1, column: 1]>, :level=>:warn}