exec

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2015 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Exec Plugin

The exec plugin can execute arbitrary commands which return flattened JSON.

For example, if you have a json-returning command called mycollector, you could setup the exec plugin with:

[[exec.commands]]
command = "/usr/bin/mycollector --output=json"
name = "mycollector"

The name is used as a prefix for the measurements.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Command string
	Name    string
}

type CommandRunner

type CommandRunner struct {
}

func (CommandRunner) Run

func (c CommandRunner) Run(command string, args ...string) ([]byte, error)

type Exec

type Exec struct {
	Commands []*Command
	// contains filtered or unexported fields
}

func NewExec

func NewExec() *Exec

func (*Exec) Description

func (e *Exec) Description() string

func (*Exec) Gather

func (e *Exec) Gather(acc plugins.Accumulator) error

func (*Exec) SampleConfig

func (e *Exec) SampleConfig() string

type Runner

type Runner interface {
	Run(string, ...string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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