probe

package
v0.4.2-alpha.0...-9a8b422 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2016 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Cmd string `json:"cmd"`
}

Command probe allow the execution of any file or script and parse the output

func (Command) Name

func (cp Command) Name() string

Name of the probe

func (Command) Value

func (cp Command) Value() (float64, error)

Value report the parsed output of the commmand or script as float64

type DefaultScalingProbe

type DefaultScalingProbe struct{}

DefaultScalingProbe report a fake sensor value Value goes from 0 to 1 and to 1 to 0 each minute

func (*DefaultScalingProbe) Name

func (p *DefaultScalingProbe) Name() string

Name of the probe

func (*DefaultScalingProbe) Value

func (p *DefaultScalingProbe) Value() (float64, error)

Value of the probe

type HAproxy

type HAproxy struct {
	Socket string `json:"socket"`
	Type   string `json:"type"`
	Item   string `json:"item"`
}

HAproxy configurable probe.

Metrics are retrived by accessing HAProxy command socket

func (*HAproxy) HaproxyCmd

func (ha *HAproxy) HaproxyCmd(cmd string) (string, error)

HaproxyCmd execution on the unix socket

func (HAproxy) Name

func (ha HAproxy) Name() string

Name of the probe

func (HAproxy) Value

func (ha HAproxy) Value() (float64, error)

Value probe the target and report back values

type Prometheus

type Prometheus struct {
	URL string `json:"url"` // Sample: http://localhost:9100/metrics
	Key string `json:"key"` // Sample: node_cpu{cpu="cpu6",mode="idle"}
}

Prometheus probe

Metrics are retrived using HTTP/Text protocol (see https://prometheus.io/docs/instrumenting/exposition_formats/) TODO protobuf support ?

func (Prometheus) Name

func (p Prometheus) Name() string

Name of the probe

func (Prometheus) Value

func (p Prometheus) Value() (float64, error)

Value make the request and parse content

Jump to

Keyboard shortcuts

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