Skip to content
Frank Reno edited this page Oct 9, 2015 · 15 revisions

SumoLogic Report Generator

This tool allows a user to execute multiple searches, and compile the data in a single report. Currently, the only format is Excel (.xlsx). Each tab in Excel would correspond to a search executed in Sumo Logic.

##Usage To use the tool, simply run from your command line:

$java -jar sumo-report-generator.jar

usage: SumoLogic Report Generator
 -c,--config <arg>   Path to the report JSON configuration file.
 -d,--debug          Enable debug logging.
 -h,--help           Prints help information.
 -t,--trace          Enable trace logging.
 -v,--version        Get the version of the utility.

##JSON Configuration File

To generate a report, simply configure JSON configuration file that defines the report. Here is a basic example: '''json { "username" : "<username/accessid>", "password" : "<password/accesskey>", "url" : "https://api.sumologic.com/api/v1", "destinationFile" : "/some/path/workbook.xlsx", "reportSheets" : [ { "sheetName" : "errors", "searchJob" : { "query": "error | count", "from": "2015-09-20T00:00:00", "to": "2015-09-20T23:59:59", "timezone": "PST" } } ] } ''' Your username/password can be using your SumoLogic credentials, or an accessId/accessKey. The URL you choose should be the URL based on your deployment. You can define any number of report sheets, each reportSheet represents a sheet in the final Excel Workbook. The sheetName will be the name of the sheet. Note that standard limitations of naming sheets in Excel apply. The searchJob is the Sumo search you want to execute and populate in the sheet. Make sure you properly escape your query as you would with any SumoLogic API call.

Clone this wiki locally