Hello, I am monitoring a csv file using universal forwarder and the first column in the csv file is Last_Updated_Date. This file is indexed based on this field (_time = Last_Updated_Date). This file also has a column called Created_Date. While writing a search, I want to use Created_Date as _time to filter the data and the search I have written is given below: index="tickets" host="host_1"
| foreach * [ eval newFieldName=replace("<<FIELD>>", "\s+", "_"), {newFieldName}='<<FIELD>>' ] | fields - "* *", newFieldName
| eval _time=strptime(Created_Date, "%Y-%m-%d %H:%M:%S")
| sort 0 -_time
| addinfo
| where _time>=info_min_time AND (_time<=info_max_time OR info_max_time="+Infinity")
| dedup ID
| where Status!="Closed"
| eval min_time=strftime(info_min_time, "%Y-%m-%d %H:%M:%S")
| eval max_time=strftime(info_max_time, "%Y-%m-%d %H:%M:%S")
| eval index_time=strftime(_indextime, "%Y-%m-%d %H:%M:%S")
| rename Created_Date as Created, Last_Updated_Date as "Last Updated"
| table ID Type Created "Last Updated" _time min_time info_min_time max_time info_max_time index_time
| sort 0 Created When I run this search for a period, say 1st Feb 2021 - 31st Jul 2021, it gives results as below: When I checked this for a longer period, say All Time - it gives results as below: There are many open tickets (created between Feb and Jul) and not just two, as shown in the first screenshot, but it seems still the timepicker is using Last_Updated_Date to filter the events and not the Created_Date. Can you please suggest how I can fix this? Thank you.
... View more