collector

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongodbCollector

type MongodbCollector struct {
	Opts *MongodbCollectorOpts
	// contains filtered or unexported fields
}

MongodbCollector is in charge of collecting mongodb's metrics.

func NewMongodbCollector

func NewMongodbCollector(opts *MongodbCollectorOpts) *MongodbCollector

NewMongodbCollector returns a new instance of a MongodbCollector.

func (*MongodbCollector) Close added in v0.4.0

func (exporter *MongodbCollector) Close()

Close cleanly closes the mongo session if it exists.

func (*MongodbCollector) Collect

func (exporter *MongodbCollector) Collect(ch chan<- prometheus.Metric)

Collect is called by the Prometheus registry when collecting metrics. Part of prometheus.Collector interface.

func (*MongodbCollector) Describe

func (exporter *MongodbCollector) Describe(ch chan<- *prometheus.Desc)

Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last descriptor has been sent. Part of prometheus.Collector interface.

type MongodbCollectorOpts

type MongodbCollectorOpts struct {
	URI                      string
	TLSConnection            bool
	TLSCertificateFile       string
	TLSPrivateKeyFile        string
	TLSCaFile                string
	TLSHostnameValidation    bool
	DBPoolLimit              int
	CollectDatabaseMetrics   bool
	CollectCollectionMetrics bool
	CollectTopMetrics        bool
	CollectIndexUsageStats   bool
	SocketTimeout            time.Duration
	SyncTimeout              time.Duration
}

MongodbCollectorOpts is the options of the mongodb collector.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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