I am trying to implement time limit on the query, but failing to fetch the result

New Member

public static void executeQuery(String query,String earliestTime,String latestTime)

    Args queryArgs=new Args();
    queryArgs.put("earliest_time", earliestTime);
    queryArgs.put("latest_time", latestTime);
    splunkJob= splunkService.getJobs().create(query,queryArgs); 

        try {
        } catch (InterruptedException e) {

0 Karma


The variables (earliestTime and latestTime) that you used in queryArgs.put must contain a date-time string similar to this

0 Karma

Revered Legend

Refer to code examples from this link. Check the format of values and classes to be used.

0 Karma

Splunk Employee
Splunk Employee

@priyabhakat - Your question is quite vague. Please leave a comment with more information. In general, your question has a greater chance of being answered by experts in the Answers community when when you provide as much information and context as possible. Thanks.

0 Karma
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes and swag!