collector

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2017 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentStats

type AgentStats struct {
	CheckMonitors uint64 `mapstructure:"check_monitors"`
	CheckTTLs     uint64 `mapstructure:"check_ttls"`
	Checks        uint64 `mapstructure:"checks"`
	Services      uint64 `mapstructure:"services"`
}

type BuildInfo

type BuildInfo struct {
	Revision string `mapstructure:"revision"`
	Version  string `mapstructure:"version"`
}

type Collector

type Collector interface {
	Collect(ch chan<- prometheus.Metric) (err error)
	Describe(ch chan<- *prometheus.Desc)
}

type ConsulCollector

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

func NewConsulCollector

func NewConsulCollector(client *api.Client) ConsulCollector

func (ConsulCollector) Collect

func (c ConsulCollector) Collect(ch chan<- prometheus.Metric)

func (ConsulCollector) Describe

func (c ConsulCollector) Describe(ch chan<- *prometheus.Desc)

type ConsulStats

type ConsulStats struct {
	KnownDatacenters uint64 `mapstructure:"known_datacenters"`
	KnownServers     uint64 `mapstructure:"known_servers"`
	IsLeader         bool   `mapstructure:"leader"`
	IsServer         bool   `mapstructure:"server"`
}

type RaftStats

type RaftStats struct {
	AppliedIndex             uint64 `mapstructure:"applied_index"`
	CommitIndex              uint64 `mapstructure:"commit_index"`
	FsmPending               uint64 `mapstructure:"fsm_pending"`
	LastContact              string `mapstructure:"last_contact"`
	LastLogIndex             uint64 `mapstructure:"last_log_index"`
	LastLogTerm              uint64 `mapstructure:"last_log_term"`
	LastSnapshotIndex        uint64 `mapstructure:"last_snapshot_index"`
	LastSnapshotTerm         uint64 `mapstructure:"last_snapshot_term"`
	LatestConfigurationIndex uint64 `mapstructure:"latest_configuration_index"`
	NumPeers                 uint64 `mapstructure:"num_peers"`
	State                    string `mapstructure:"state"`
	Term                     uint64 `mapstructure:"term"`
}

type RuntimeStats

type RuntimeStats struct {
	NumberOfGoroutines uint64 `mapstructure:"goroutines"`
}

type SerfStats

type SerfStats struct {
	Encrypted   bool   `mapstructure:"encrypted"`
	EventQueue  uint64 `mapstructure:"event_queue"`
	EventTime   uint64 `mapstructure:"event_time"`
	Failed      uint64 `mapstructure:"failed"`
	HealthScore uint64 `mapstructure:"health_score"`
	IntentQueue uint64 `mapstructure:"intent_queue"`
	Left        uint64 `mapstructure:"left"`
	MemberTime  uint64 `mapstructure:"member_time"`
	Members     uint64 `mapstructure:"members"`
	QueryQueue  uint64 `mapstructure:"query_queue"`
	QueryTime   uint64 `mapstructure:"query_time"`
}

type Stats

type Stats struct {
	Agent   AgentStats   `mapstructure:"agent"`
	Build   BuildInfo    `mapstructure:"build"`
	Consul  ConsulStats  `mapstructure:"consul"`
	Raft    RaftStats    `mapstructure:"raft,omitempty"`
	Runtime RuntimeStats `mapstructure:"runtime"`
	SerfLan SerfStats    `mapstructure:"serf_lan"`
	SerfWan SerfStats    `mapstructure:"serf_wan,omitempty"`
}

Jump to

Keyboard shortcuts

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