i was hoping solution would be that simple
did update to: query => 'type:threat_intell AND IP:"%{[dest_ip]"}'
but still not working, its not converting the variable to its value:
in short thequerly lookslike: query=>"type:XYZ AND IP:\"%{[dest_ip]\"}"
full:
[2017-06-19T15:44:10,937][WARN ][logstash.filters.elasticsearch] Failed to query elasticsearch for previous event {:index=>"XYZ*", :query=>"type:XYZ AND IP:\"%{[dest_ip]\"}", :event=>2017-06-19T14:44:01.689Z IEDUBEACDSO01 1497883439.463405 FvIiTOuxcnqysmw5j 13.107.6.159 192.168.250.122 CLMyuU2PNII2RMfbca SSL 0 SHA1,X509,MD5 application/pkix-cert - 0.000000 F F 1914 - 0 0 F -e61683ff8024828fe144ce88efa28ace d332f9f56c3c5b4455587927eb0ed3203980d0eb - -, :error=>#<Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"7sJja53ARamnfZQL441IcA","index":"XYZ-2017.04.28"},{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"wjc04MuGT2mg6iEEsa-b8Q","index":"XYZ-2017.05.17"},{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"42Vp2zCdSvmgyk2NTsc_Rw","index":"XYZ-2017.06.08"},{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"g0C4n8lvRw6LwPKr2cB_4w","index":"XYZ-2017.06.15"},{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"6l9aUg2oS3uQzvxbSLh0mg","index":"XYZ-2017.06.19"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"XYZ-2017.04.28","node":"43pItJ_-TD6DbBoIm_upHA","reason":{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"7sJja53ARamnfZQL441IcA","index":"XYZ-2017.04.28","caused_by":{"type":"parse_exception","reason":"Cannot parse 'type:XYZ AND IP:\"%{[dest_ip]\"}': Lexical error at line 1, column 41. Encountered: <EOF> after : \"\"","caused_by":{"type":"token_mgr_error","reason":"Lexical error at line 1, column 41. Encountered: <EOF> after : \"\""}}}},{"shard":0,"index":"XYZ-2017.05.17","node":"43pItJ_-TD6DbBoIm_upHA","reason":{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"wjc04MuGT2mg6iEEsa-b8Q","index":"XYZ-2017.05.17","caused_by":{"type":"parse_exception","reason":"Cannot parse 'type:XYZ AND IP:\"%{[dest_ip]\"}': Lexical error at line 1, column 41. Encountered: <EOF> after : \"\"","caused_by":{"type":"token_mgr_error","reason":"Lexical error at line 1, column 41. Encountered: <EOF> after : \"\""}}}},{"shard":0,"index":"XYZ-2017.06.08","node":"43pItJ_-TD6DbBoIm_upHA","reason":{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"42Vp2zCdSvmgyk2NTsc_Rw","index":"XYZ-2017.06.08","caused_by":{"type":"parse_exception","reason":"Cannot parse 'type:XYZ AND IP:\"%{[dest_ip]\"}': Lexical error at line 1, column 41. Encountered: <EOF> after : \"\"","caused_by":{"type":"token_mgr_error","reason":"Lexical error at line 1, column 41. Encountered: <EOF> after : \"\""}}}},{"shard":0,"index":"XYZ-2017.06.15","node":"43pItJ_-TD6DbBoIm_upHA","reason":{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"g0C4n8lvRw6LwPKr2cB_4w","index":"XYZ-2017.06.15","caused_by":{"type":"parse_exception","reason":"Cannot parse 'type:XYZ AND IP:\"%{[dest_ip]\"}': Lexical error at line 1, column 41. Encountered: <EOF> after : \"\"","caused_by":{"type":"token_mgr_error","reason":"Lexical error at line 1, column 41. Encountered: <EOF> after : \"\""}}}},{"shard":0,"index":"XYZ-2017.06.19","node":"43pItJ_-TD6DbBoIm_upHA","reason":{"type":"query_shard_exception","reason":"Failed to parse query [type:XYZ AND IP:\"%{[dest_ip]\"}]","index_uuid":"6l9aUg2oS3uQzvxbSLh0mg","index":"XYZ-2017.06.19","caused_by":{"type":"parse_exception","reason":"Cannot parse 'type:XYZ AND IP:\"%{[dest_ip]\"}': Lexical error at line 1, column 41. Encountered: <EOF> after : \"\"","caused_by":{"type":"token_mgr_error","reason":"Lexical error at line 1, column 41. Encountered: <EOF> after : \"\""}}}}]},"status":400}>}