Hi,
I am trying to search Splunk using Java and my search produced 12000+ events, when I checked in the Splunk Admin UI.
But, when it comes to code, it is able to retrieve 6700 events only. I tried setting counts, but didn't work.
Below is my code,
JobArgs jobargs = new JobArgs();
jobargs.setMaximumCount(2147483647);
jobargs.setExecutionMode(JobArgs.ExecutionMode.BLOCKING);
val job = service.getJobs().create(searchQuery, jobargs);
while (!job.isDone()) {
Thread.sleep(500);
}
JobResultsArgs jobRes = new JobResultsArgs();
jobRes.setCount(20000)
InputStream resultsNormalSearch = job.getResults(jobRes);
ResultsReaderXml resultsReaderNormalSearch = new ResultsReaderXml(resultsNormalSearch);
I can only get 6700 events, what could have went wrong.?
↧
Using the Splunk Java Search API, why am I only getting 6700 events when there should be over 12000?
↧