Hi All, I have a search query that allows me to pull results from an index summary. One of the fields is a time/date field. The data is pull from a database and is a schedule so the time in this f...
See more...
Hi All, I have a search query that allows me to pull results from an index summary. One of the fields is a time/date field. The data is pull from a database and is a schedule so the time in this field is not the indexed field. I would like to search on the time field and have the below query which allows me to do this. However i would like to move this into a dashboard and have a timepicker. Is this possible to do this? I need to have a time picker to grab the correct index summary data, then again for the field. index=summary sourcetype=prod source=service DESCR="Central Extra" | dedup SI_START,NAME,DESCR | eval sTime=strptime(SI_START,"%Y-%m-%d %H:%M:%S") | sort 0 -sTime | eval eventday=strptime(SI_START,"%Y-%m-%d %H:%M:%S") | bucket eventday span=1d | eval eventday=strftime(eventday,"%Y-%m-%d") | eval eventday1=strptime(eventday,"%Y-%m-%d") | eval min_Date=strptime("2023-10-11","%Y-%m-%d") | eval max_Date=strptime("2023-10-14","%Y-%m-%d") | where (eventday1 >= min_Date AND eventday1 < max_Date) | eval record=substr(CODE, -14, 1) | eval record=case(record==1,"YES", record==0,"NO") | stats count(eval(record="YES")) as events_record count(record) as events by NAME | eval percentage_record=(events/events_record)*100 | fillnull value=0 percentage_record | search percentage_record<100 | sort +percentage_record -events