While using elastic search as the input, not able to fetch data using the same index in elastic seach plugin for filter


(Atul Shukla) #1

Below is my code :
input {
elasticsearch {
hosts => "xxxx"
index => "abcd*"
query=> ' {
"query":{
"range":{
"@timestamp":{
"gte":"2018-11-29T11:54:01.600113354Z",
"lt":"2018-11-29T11:57:01.600113354Z"
}
}
}
}'
}
}
filter {
elasticsearch {
hosts => "xxxx"
index => "abcd*"
query => 'value_needed:"%{value_needed}"'
fields => {
"field1" => "field1"
}
}

	}

: Not able to fetch the field1 value from abcd index. Can someone please help with this.


(Lewis Barclay) #2

Any errors or what is happening? Try removing the "lt" timestamp to see if that helps you get some results at first.


(Atul Shukla) #3

Hi Lewis,
From the input elastic plugin, I am getting data.

The problem comes when I am trying to open the connection again to the same database.
No error log is generated in logstash.