Skip to content

brittonhayes/splunk-go

 
 

Repository files navigation

Banner Logo

Splunk Golang REST API Client

splunk-go is a Splunk REST API Client written in GO designed to allow common tasks for Splunk usage and administration to be conducted through an easy-to-use command line tool. This package assumes that you have a running instance of Splunk Enterprise with user credentials to access this instance. For all information related to the Splunk software, please visit https://www.splunk.com/en_us/software/splunk-enterprise.html

Documentation

Install

# Clone the repository
git clone https://github.com/brittonhayes/splunk-go

# Install dependencies
make dependencies

Usage

# From entrypoint
go run main.go --help

# To run with CI
make all

Run tests

make security

Using the binary

Once the binary is compiled and added to your path, you can utilize the CLI to perform Splunk operations.

  1. Build the binary
# Build your OS's binary
make build

or

go build -o ./bin/splunk-go main.go

# Cross-compile for all systems
make cross-compile
  1. Run the help command to get a list of possible actions
# Using the entrypoint
go run main.go --help

or

# Using the Makefile
make run

This will output a message like the following: Help Output

Adding features to the project

  1. Navigate to the pkg directory of the repository and add a new *.go file with your added functionality.

  2. Run cobra add [command_name] and the Cobra CLI tool will add a new *.go file for your command.

  3. After creating your command, run make docs to automatically update the documentation of all CLI commands.

Demo

asciicast


Author

👤 Britton Hayes

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check the issues page. You can also take a look at the contributing guide.

Acknowledgements

Social image from Ashley Mcnamara

Original Project written by drewrm

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

About

A Splunk REST API Client written in Go. This package is designed to allow users to perform common Splunk tasks through a lightweight command line tool.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 97.6%
  • Makefile 2.4%