cli

package
v5.10.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2019 License: MIT, MIT Imports: 8 Imported by: 250

README

Sensu CLI

sensuctl is the command line interface for managing your Sensu cluster.

Auto-Completion

Installation (Bash Shell)

Make sure bash completion is installed. If you use a current Linux in a non-minimal installation, bash completion should be available. On a Mac, install with:

brew install bash-completion

Then add the following to your ~/.bash_profile:

if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi

When bash-completion is available we can add the following to your ~/.bash_profile:

source <(sensuctl completion bash)

You can now source your ~/.bash_profile or launch a new terminal to utilize completion.

source ~/.bash_profile
Installation (ZSH)

Add the following to your ~/.zshrc:

source <(sensuctl completion zsh)

You can now source your ~/.zshrc or launch a new terminal to utilize completion.

source ~/.zshrc
Usage

sensuctl:

$ sensuctl Tab

check       configure   event       user
asset       completion  entity      handler

sensuctl:

$ sensuctl check Tab

create  delete  import  list

Contributing

UX Guidelines

Documentation

Index

Constants

View Source
const SensuCmdName = "sensuctl"

SensuCmdName name of the command

View Source
const TypeError = "TypeError"

TypeError is the string returned in the event of an invalid type assertion

Variables

This section is empty.

Functions

This section is empty.

Types

type SensuCli

type SensuCli struct {
	Config config.Config
	Client client.APIClient
	Logger *logrus.Entry
	InFile *os.File
}

SensuCli is an instance of the Sensu command line client; encapsulates API client, logger & general configuration.

func New

func New(flags *pflag.FlagSet) *SensuCli

New SensuCLI given persistent flags from command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL