Documentation ¶
Overview ¶
Package metrics contains prometheus metric definitions for the epoxy server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Stage1Total counts the number of host boots. Stage1Total = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "epoxy_stage1_total", Help: "Total number of boots per machine.", }, []string{"machine"}, ) // RequestDuration profiles request latency. RequestDuration = promauto.NewHistogramVec( prometheus.HistogramOpts{ Name: "epoxy_request_duration_seconds", Help: "A histogram of request latencies.", }, []string{"code"}, ) )
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector defines a custom collector for reading metrics from datastore.
func NewCollector ¶
NewCollector creates a new datastore collector instance. The metricName should be one of "epoxy_last_boot" or "epoxy_last_success".
func (*Collector) Collect ¶
func (col *Collector) Collect(ch chan<- prometheus.Metric)
Collect satisfies the prometheus.Collector interface. Collect reports values from hosts datastore.
func (*Collector) Describe ¶
func (col *Collector) Describe(ch chan<- *prometheus.Desc)
Describe satisfies the prometheus.Collector interface. Describe is called immediately after registering the collector.
Click to show internal directories.
Click to hide internal directories.