Skip to content

Collection of utilites for interacting with Splunk Enterprise/Universal forwarders releases.

Notifications You must be signed in to change notification settings

KeiranY/splunk-releases

Repository files navigation

GitHub Workflow Status OpenAPI Verstion Codecov CodeFactor Grade

Splunk Releases

Collection of utilites for interacting with Splunk Enterprise/Universal forwarders releases.

Table of Contents

Command Line

The command line utility can be used to retrieve the download link to a Splunk release

Usage

Run the CLI tool once using: npx github:KeiranY/splunk-releases

Install the CLI tool with: npm i -g github:KeiranY/splunk-releases and run with sr-cli.

Flags

$ sr-cli

Usage: cli [options] [command]

Options:
  -p, --platform <platform>    platform filter i.e. linux
  -a, --arch <arch>            architecture filter i.e x86_64
  -v, --version <version>      version filter i.e 8.1.0
  -f, --filetype <filetype>    filetype filter i.e tgz
  -r, --product <product>      product filter (enterprise/forwarder)
  -c, --checksum <md5|sha512>  calculate checksum of download
  -h, --help                   display help for command

Commands:
  search                       (default) search for a splunk release
  download|d [filename]        download a splunk release
  help [command]               display help for command

Environment Variables

Environment variables can also supply filters, cli parameters take precedence over these.

Environment Variable Flag Example
SPLUNKRELEASES_PLATFORM -p linux
SPLUNKRELEASES_ARCH -a x86_64
SPLUNKRELEASES_VERSION -v 8.1.0
SPLUNKRELEASES_FILETYPE -f tgz
SPLUNKRELEASES_PRODUCT -r forwarder
SPLUNKRELEASES_DOWNLOAD -d splunk.tgz
SPLUNKRELEASES_CHECKSUM -c md5

Example

Example of using the splunk releases CLI command

Rest API

The REST API lets you retrieve info about splunk release (/details) or to download individual releases directly (/download).

An example of the API server may be running at sr.keirany.com.

Usage

Run the CLI tool once using: npx -p github:KeiranY/splunk-releases sr-api

Install the CLI tool with: npm i -g github:KeiranY/splunk-releases and run with sr-api.

Environmant Variables

Environment Variable Description Default
SPLUNKRELEASES_API_MAX_LIMIT Sets the max number of relases returned in a page 100
SPLUNKRELEASES_API_DEFAULT_LIMIT Sets the default number of relases returned in a page 10
SPLUNKRELEASES_APIPORT Web server port Random between 1024-65536
SPLUNKRELEASES_APIRETRIES Attempts to bind to port 5

Documentation

See the SwaggerHub Page for documentation and examples for the Rest API (OpenApi3 spec here).

About

Collection of utilites for interacting with Splunk Enterprise/Universal forwarders releases.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published