Splunk Search

Is it possible to get an estimated job completion time for a search?

Motivator

Search job Inspector:

This search has completed and has returned 31232 results by scanning 434213123 events in 47.204 seconds.

Is it possible to estimate a search completion time prior it returns the complete results ? OR possibly an extra column in "Activity -> Jobs" view

Use case:
Using the REST API, I get search results and displaying them in a customized UI. If I show the user a field called "Estimated Job Completion Time ", the user can wait until the search gets completed or can reduce the time range to get limited results.

0 Karma

SplunkTrust
SplunkTrust

You could GET /services/search/jobs/job_id to look at the doneProgress and runDuration fields. Dividing duration so far by progress so far should give you an estimate for the total duration.
This will be terribly inaccurate over all time because the progress can't know when the data will stop into the past. It'll also be inaccurate if your data is distributed unevenly across the time range. Lastly, this will not be able to factor in finalization time occurring once runDuration reaches 1.0.

http://docs.splunk.com/Documentation/Splunk/6.2.4/RESTREF/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D

0 Karma