exporter

package
v0.0.0-...-ff4b6db Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeanstalkdCollector

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

BeanstalkdCollector collects metrics from a beanstalkd server for consumption by Prometheus

func NewBeanstalkdCollector

func NewBeanstalkdCollector(beanstalkd BeanstalkdServer, opts CollectorOpts, logger log.Logger) (*BeanstalkdCollector, error)

NewBeanstalkdCollector returns an initialised BeanstalkdCollector

func (*BeanstalkdCollector) Collect

func (b *BeanstalkdCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface to collect the beanstalkd metrics.

func (*BeanstalkdCollector) Describe

func (b *BeanstalkdCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface to describe the collected metrics.

type BeanstalkdServer

type BeanstalkdServer interface {
	ListTubes() ([]string, error)
	FetchStats() (beanstalkd.ServerStats, error)
	FetchTubesStats(map[string]bool) (beanstalkd.ManyTubeStats, error)
}

BeanstalkdServer is the minimum interface required by a BeanstalkdCollector

type CollectorOpts

type CollectorOpts struct {
	SystemMetrics []string
	AllTubes      bool
	Tubes         []string
	TubeMetrics   []string
}

CollectorOpts contains the options for configuring the beanstalkd collector.

Jump to

Keyboard shortcuts

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