streammatch

package
v0.0.0-...-d6aee50 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2017 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCfg

type FileCfg struct {
	File string
	Var  []VarCfg
}

type FileCollector

type FileCollector struct {
	// contains filtered or unexported fields
}

FileCollector implements prometheus.Collector for counter metrics based on matched line counters.

func NewFileCollector

func NewFileCollector(cfg FileCfg) (*FileCollector, error)

func (FileCollector) Collect

func (vms FileCollector) Collect(ch chan<- promm.Metric)

func (FileCollector) Describe

func (vms FileCollector) Describe(ch chan<- *promm.Desc)

type MatchCfg

type MatchCfg struct {
	Pattern     string
	LabelValues []string
}

type ProcCfg

type ProcCfg struct {
	// The command, first item being the executable name/path.
	Command []string
	// The CWD for the process.
	Dir string
	// If the process exits, wait this long before restarting. Defaults to 30
	// seconds if unspecified.
	RetryInterval util.Duration
	// Configurations for the variable matching on stdout and stderr.
	Stdout, Stderr []VarCfg
}

Configures matching output from a command's output.

type ProcCollector

type ProcCollector struct {
	// contains filtered or unexported fields
}

func NewProcCollector

func NewProcCollector(cfg ProcCfg) (*ProcCollector, error)

func (*ProcCollector) Collect

func (pc *ProcCollector) Collect(ch chan<- promm.Metric)

func (*ProcCollector) Describe

func (pc *ProcCollector) Describe(ch chan<- *promm.Desc)

type VarCfg

type VarCfg struct {
	promm.CounterOpts
	LabelNames []string
	Match      []MatchCfg
}

Jump to

Keyboard shortcuts

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