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 }
MongodbCollectorOpts is the options of the mongodb collector.
Click to show internal directories.
Click to hide internal directories.