exporter

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulOpts

type ConsulOpts struct {
	URI          string
	CAFile       string
	CertFile     string
	KeyFile      string
	ServerName   string
	Timeout      time.Duration
	Insecure     bool
	RequestLimit int
	AgentOnly    bool
}

ConsulOpts configures options for connecting to Consul.

type Exporter

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

Exporter collects Consul stats from the given server and exports them using the prometheus metrics package.

func New

func New(opts ConsulOpts, queryOptions consul_api.QueryOptions, kvPrefix, kvFilter string, metaFilter string, healthSummary bool, logger log.Logger) (*Exporter, error)

New returns an initialized Exporter.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect fetches the stats from configured Consul location and delivers them as Prometheus metrics. It implements prometheus.Collector.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe describes all the metrics ever exported by the Consul exporter. It implements prometheus.Collector.

Jump to

Keyboard shortcuts

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