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