Elasticsearch filter plugin query failure

Hello,

I'm trying to query for an instrument in elasticsearch and calculate the time difference between the events. I'm running into an error trying to query elasticsearch.

Here is the config.

filter {
if [type] == "kafka-instrument" {
elasticsearch {
hosts => ["127.0.0.1"]
query => 'type:def AND _id:%{[key][dvi]}'
fields => ["@timestamp"]
}

}

}

and here is the error.
{:timestamp=>"2016-04-29T15:09:56.616000-0500", :message=>"Failed to query elasticsearch for previous event", :query=>"type:def AND _id:176", :event=>#<LogStash::Event:0x33dfaf04 @metadata_accessors=#<LogStash::Util::Accessors:0x2be39827 @store={}, @lut={}>, @cancelled=false, @data={REMOVEDFORBREVITY}>>, :error=> #<NoMethodError: undefined method `[]' for nil:NilClass>, :level=>:warn}

Any ideas?

1 Like

Check your ES logs as well, there should be something related.