etcd

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter collects ETCD stats from the given server and exports them using the prometheus metrics package.

func NewExporter

func NewExporter(config *monitoring.ETCDConfig) (*Exporter, error)

NewExporter returns an initialized Exporter.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect fetches the stats from configured ETCD endpoint and delivers them as Prometheus metrics. It implements prometheus.Collector.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

type FollowerStats

type FollowerStats struct {
	Latency   LatencyStats `json:"latency"`
	RaftStats RaftStats    `json:"counts"`
}

FollowerStats encapsulates various statistics about a follower in an etcd cluster

type LatencyStats

type LatencyStats struct {
	// Current latency between follower and leader
	Current float64 `json:"current"`
}

LatencyStats encapsulates latency statistics.

type LeaderStats

type LeaderStats struct {
	// Leader is the ID of the leader in the etcd cluster.
	Leader    string                   `json:"leader"`
	Followers map[string]FollowerStats `json:"followers"`
	// Message contains information about request.
	// It will be not empty string, when request was sent to follower.
	Message string `json:"message"`
}

LeaderStats is used by the leader in an etcd cluster, and encapsulates statistics about communication with its followers reference documentation https://github.com/coreos/etcd/blob/master/etcdserver/stats/leader.go

type Member

type Member struct {
	// ID of etcd cluster member
	ID string `json:"id"`
	// Name of etcd cluster member
	Name string `json:"name,omitempty"`
}

Member represents simplified ETCD member structure

type RaftStats

type RaftStats struct {
	// Number of failed RPC requests
	Fail uint64 `json:"fail"`
	// Number of successful RPC requests
	Success uint64 `json:"success"`
}

RaftStats encapsulates raft statistics.

Jump to

Keyboard shortcuts

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