Hey, I am new to log stash and surely I must be doing someone wrong. When I sending basic nested json from python 3 it fails:
Message=json.dumps({'default': 'default', 'time': 'again', 'this': {'go': 'by'}})
My log stash config is:
input {
tcp {
port => 5000
}
sqs {
queue => "QCB_logstash"
region => "us-east-1"
}
}
output {
elasticsearch {
hosts => "elasticsearch:9200"
}
}
Super simple, but it fails with:
{:timestamp=>"2016-02-04T22:54:03.980000+0000", :message=>"Failed action. ", :status=>400, :action=>["index", {:_id=>nil, :_index=>"logstash-2016.02.04", :_type=>"logs", :_routing=>nil}, #<LogStash::Event:0x7d705a75 @metadata_accessors=#<LogStash::Util::Accessors:0x18e4e6d2 @store={}, @lut={}>, @cancelled=false, @data={"default"=>"default", "this"=>{"go"=>"by"}, "time"=>"again", "@version"=>"1", "@timestamp"=>"2016-02-04T22:54:03.533Z"}, @metadata={}, @accessors=#<LogStash::Util::Accessors:0x34c898d2 @store={"default"=>"default", "this"=>{"go"=>"by"}, "time"=>"again", "@version"=>"1", "@timestamp"=>"2016-02-04T22:54:03.533Z"}, @lut={"type"=>[{"default"=>"default", "this"=>{"go"=>"by"}, "time"=>"again", "@version"=>"1", "@timestamp"=>"2016-02-04T22:54:03.533Z"}, "type"]}>>], :response=>{"create"=>{"_index"=>"logstash-2016.02.04", "_type"=>"logs", "_id"=>"AVKufhLIk85JQl8a5Oze", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [this]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"unknown property [go]"}}}}, :level=>:warn}
This seems so simple but I've tried a bunch of configs and can't get a nested structure to work. Any help would be great, thanks