curl - Issue while using Date range filter in elasticsearch -
i new logstash , elasticsearch. have logline have parsed in logstash. see below example: log line:
20150727 020225108-0700 site1dir01 imqueueserv 4161 0 139965885622016 note;mtaqueuedirremoved(79/54) /xyz/user1/queue/deferred/mta:rme=qs_p_getqueuedmessages:port=10003
grok pattern have written it:
grok{ match => ["message", "%{year}%{monthnum}%{monthday} %{username:integerdata} %{host} %{word:servername} %{int:processid}...%{int:data} %{word:loglevel};%{word:tracename}\(.*\) %{greedydata:logdata}", "message", "%{greedydata:mtalogdata}"] }
now in kibana, getting data timestamp this:
@timestamp ==> 2015-07-27t02:02:25.812-07:00
now when fire below curl command in elasticsearch data specific dates, records should not happen.
my curl command below:
curl -xget 'http://localhost:9200/_all/_count?pretty=true' -d '{ "query" : { "bool" : { "should" : [ { "match" : { "type" : "queueserverlog" }} , { "filtered" : { "filter" : { "range" : { "timestamp" : { "from" : "2015-07-23t00:00:01", "to" : "2015-07-23t23:59:59" } } } } } ] } } }'
can guide me data based on date filter ehat need here?
Comments
Post a Comment