How to search something for specific time period. For example I want to show Max CPU usage for each host for Last 24 hours. And want to do it through query and don't want to use TimeRangePicker. Can anybody Help??
Thanks in Advance!
You should be able to this. Here's an example:
This will return all events in the index named myindex in the last 24 hours. You just need to add the parameter earliest=sometimeperiod as shown above
search earliest=-24h should do the trick - there is good documentation on this and other time commands in the search pdf file downloadable from the splunk website.