@@ -77,6 +77,14 @@ public static void main(String[] args) throws Exception {
7777
7878 String byReceiptTime = null ;
7979
80+ String intervalTimeType = null ;
81+
82+ String autoParsingMode = null ;
83+
84+ String parseMode = null ;
85+
86+ Boolean requiresRawMessages = true ;
87+
8088 // In chunk mode, the number of hours to execute the search query in.
8189 long chunkIncrementMillis = -1 ;
8290
@@ -183,6 +191,22 @@ public static void main(String[] args) throws Exception {
183191 byReceiptTime = commandLine .getOptionValue ("byReceiptTime" );
184192 }
185193
194+ if (commandLine .hasOption ("intervalTimeType" )) {
195+ intervalTimeType = commandLine .getOptionValue ("intervalTimeType" );
196+ }
197+
198+ if (commandLine .hasOption ("autoParsingMode" )) {
199+ autoParsingMode = commandLine .getOptionValue ("autoParsingMode" );
200+ }
201+ if (commandLine .hasOption ("parseMode" )) {
202+ parseMode = commandLine .getOptionValue ("parseMode" );
203+ }
204+
205+ if (commandLine .hasOption ("requiresRawMessages" )) {
206+ requiresRawMessages = commandLine .hasOption ("requiresRawMessages" );
207+ }
208+
209+
186210 searchQuery = commandLine .getOptionValue ("query" );
187211 searchQueryFilename = commandLine .getOptionValue ("file" );
188212 if (commandLine .hasOption ("json" )) {
@@ -285,7 +309,11 @@ public static void main(String[] args) throws Exception {
285309 timezone ,
286310 retry ,
287311 lastEndFile ,
288- byReceiptTime );
312+ byReceiptTime ,
313+ intervalTimeType ,
314+ autoParsingMode ,
315+ parseMode ,
316+ requiresRawMessages );
289317 if (failure ) {
290318 break ;
291319 }
@@ -377,6 +405,31 @@ private static Options createOptions() {
377405 .withDescription ("Search by receipt time instead of message time" )
378406 .hasArg ()
379407 .create ("rt" ));
408+ options .addOption (
409+ OptionBuilder .withLongOpt ("intervalTimeType" )
410+ .withArgName ("intervalTimeType" )
411+ .withDescription ("Choose which interval type to query on" )
412+ .hasArg ()
413+ .create ("itt" ));
414+ options .addOption (
415+ OptionBuilder .withLongOpt ("autoParsingMode" )
416+ .withArgName ("autoParsingMode" )
417+ .withDescription ("Decide whether the query has to be autoparsed or not" )
418+ .hasArg ()
419+ .create ("apm" ));
420+ options .addOption (
421+ OptionBuilder .withLongOpt ("parseMode" )
422+ .withArgName ("parseMode" )
423+ .withDescription ("Deprecated old values such as performance, intelligent, and verbose" )
424+ .hasArg ()
425+ .create ("pm" ));
426+ options .addOption (
427+ OptionBuilder .withLongOpt ("requiresRawMessages" )
428+ .withArgName ("requiresRawMessages" )
429+ .withDescription ("Check whether raw messages need to be fetched in results" )
430+ .hasArg ()
431+ .create ("rrm" ));
432+
380433 options .addOption (
381434 OptionBuilder .withLongOpt ("hours" )
382435 .withArgName ("hours" )
@@ -488,7 +541,11 @@ private static boolean executeSearchJobWithRetry(CSVWriter csvWriter,
488541 String timeZone ,
489542 int retry ,
490543 String lastEndFile ,
491- String byReceiptTime ) {
544+ String byReceiptTime ,
545+ String intervalTimeType ,
546+ String autoParsingMode ,
547+ String parseMode ,
548+ Boolean requiresRawMessages ) {
492549
493550 int triesLeft = retry ;
494551 int attempt = 1 ;
@@ -512,7 +569,11 @@ private static boolean executeSearchJobWithRetry(CSVWriter csvWriter,
512569 timeZone ,
513570 attempt ,
514571 lastEndFile ,
515- byReceiptTime );
572+ byReceiptTime ,
573+ intervalTimeType ,
574+ autoParsingMode ,
575+ parseMode ,
576+ requiresRawMessages );
516577
517578 if (failure ) {
518579 System .err .println (String .format (
@@ -539,15 +600,23 @@ private static boolean executeSearch(CSVWriter csvWriter,
539600 String timeZone ,
540601 int attempt ,
541602 String lastEndFile ,
542- String byReceiptTime ) {
603+ String byReceiptTime ,
604+ String intervalTimeType ,
605+ String autoParsingMode ,
606+ String parseMode ,
607+ Boolean requiresRawMessages ) {
543608
544609 // Create the search job.
545610 String searchJobId = sumoClient .createSearchJob (
546611 searchQuery ,
547612 startTimestamp ,
548613 endTimestamp ,
549614 timeZone ,
550- byReceiptTime );
615+ byReceiptTime ,
616+ intervalTimeType ,
617+ autoParsingMode ,
618+ parseMode ,
619+ requiresRawMessages );
551620
552621 System .err .printf ("[%s] %s - Search job ID: '%s', attempt: '%d'\n " ,
553622 new Date (), prefix , searchJobId , attempt );
0 commit comments