Documentation
¶
Overview ¶
Package collector includes all individual collectors to gather and export system metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoData = errors.New("collector returned no data")
ErrNoData indicates the collector found no data to collect, but had no other error.
Functions ¶
func DisableDefaultCollectors ¶
func DisableDefaultCollectors()
DisableDefaultCollectors sets the collector state to false for all collectors which have not been explicitly enabled on the command line.
func IsNoDataError ¶
Types ¶
type Collector ¶
type Collector interface { // Get new metrics and expose them via prometheus registry. Update(ch chan<- prometheus.Metric) error }
Collector is the interface a collector has to implement.
type MainCollector ¶
type MainCollector struct { Collectors map[string]Collector // contains filtered or unexported fields }
MainCollector implements the prometheus.Collector interface.
func NewMainCollector ¶
func NewMainCollector(logger log.Logger, filters ...string) (*MainCollector, error)
NewMainCollector creates a new MainCollector.
func (MainCollector) Collect ¶
func (n MainCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (MainCollector) Describe ¶
func (n MainCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
Click to show internal directories.
Click to hide internal directories.