cli

package
v0.0.0-...-ad35ae5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: Apache-2.0 Imports: 5 Imported by: 2

README

mohawk/cli

Mohawk

Mohawk is a metric data storage engine that uses a plugin architecture for data storage and a simple REST API as the primary interface.

Usage

When installed, run using the command line mohawk

mohawk --version

Mohawk version: 0.33.3

The -h flag will print out a help text, that list the command line arguments.

mohawk -h
Mohawk is a metric data storage engine.

Mohawk is a metric data storage engine that uses a plugin architecture for data
storage and a simple REST API as the primary interface.

Version:
  0.33.3

Author:
  Yaacov Zamir <kobi.zamir@gmail.com>

Usage:
  mohawk [flags]

Flags:
      --alerts-interval int           Check alerts every N sec (default 5)
      --alerts-server string          Alert buffer URL (default "http://localhost:9099/append")
      --alerts-server-insecure        Alert server https skip verify
      --alerts-server-method string   Alert server http method (default "POST")
      --basic-auth string             authorization user and password pair (e.g. jack:secret-password)
      --bearer-auth string            token used for bearer authorization
      --cert string                   path to TLS cert file (default "server.pem")
  -c, --config string                 config file
  -g, --gzip                          use gzip encoding
  -h, --help                          help for mohawk
      --key string                    path to TLS key file (default "server.key")
      --media string                  path to media files (default "./mohawk-webui")
      --options string                specific storage options [e.g. db-dirname, db-url]
  -p, --port int                      server port (default 8080)
  -b, --storage string                the storage plugin to use (default "memory")
  -t, --tls                           use TLS server
  -V, --verbose                       more debug output
  -v, --version                       display mohawk version number

Running mohawk with tls and using the memory back end.

mohawk --tls --gzip --port 8443 --storage memory
2017/06/30 11:37:08 Start server, listen on https://0.0.0.0:8443
When running with tls on, we need .key and .pem files:

This commands will crate self signed secrets for testing.

openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.pem -days 3650

Documentation

Overview

Package cli command line interface

Index

Constants

View Source
const AUTHOR = "Yaacov Zamir <kobi.zamir@gmail.com>"

AUTHOR the author name and Email

Variables

View Source
var RootCmd = &cobra.Command{
	Use: "mohawk",
	Long: fmt.Sprintf(`Mohawk is a metric data storage engine.

Mohawk is a metric data storage engine that uses a plugin architecture for data
storage and a simple REST API as the primary interface.

Version:
  %s

Author:
  %s`, server.VER, AUTHOR),
	Run: func(cmd *cobra.Command, args []string) {

		if viper.GetBool("version") {
			fmt.Printf("Mohawk version: %s\n\n", server.VER)
			return
		}

		server.Serve()
	},
}

RootCmd Mohawk root cli Command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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