Install Golang (Homebrew or https://go.dev/doc/install).
Build a binary:
git clone git@github.com:nhoag/sumo-search-job-cli.git
cd sumo-search-job-cli
cp .sumo-search-job-cli.yaml.dist ~/.sumo-search-job-cli.yaml
make build
# Optional: Move the binary into a PATH directory
./sumo -h
Create a Sumo Logic Access Key here.
Add credentials to ~/.sumo-search-job-cli.yaml
.
Perform the full life-cycle of initiating a search job, polling for status, fetching results, and deleting the job:
sumo jobProcessFull -J ./resources/jobDefinition.json
Create a search job:
sumo jobCreate -J ./resources/jobDefinition.json
Get search job status, and poll until complete:
sumo jobStatusCheck JOB_ID -p
Keep the search job alive for 1h (default lifetime is 5m after last activity):
sumo jobKeepAlive JOB_ID -k60
Fetch search job results after a job has completed:
sumo jobResultsGet JOB_ID -a -p
Delete search job:
sumo jobDelete JOB_ID