Query Range with Date Data

alerting

(Suman Reddy) #1

Hi Team,

Below is my filter configurations.

"filter": {
"range": {
"@timestamp": {
"gte": "now-5d",
"lte": "now-1d"
}
}
}

Requirement is to watch last 5 days data excluding current day.

I have tried multiple options but none seems to be working, as am doing time stamp based query it is including irrelevant data, like till this time.

I need the query to be run like 26-09-2018 to 30-09-2018 without timestamp limitations,

Thanks in advance


(rich collier) #2

Look at the date math and rounding section here: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.