juju: github.com/juju/juju/mongo/mongometrics Index | Files

package mongometrics

import "github.com/juju/juju/mongo/mongometrics"

Package mongometrics contains MongodB-related Prometheus metric collectors.

Index

Package Files

dialmetrics.go doc.go mgostatsmetrics.go txnmetrics.go

type DialCollector Uses

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

DalCollector is a prometheus.Collector that collects MongoDB connection dialing metrics from Juju code.

func NewDialCollector Uses

func NewDialCollector() *DialCollector

NewDialCollector returns a new DialCollector.

func (*DialCollector) Collect Uses

func (c *DialCollector) Collect(ch chan<- prometheus.Metric)

Collect is part of the prometheus.Collector interface.

func (*DialCollector) Describe Uses

func (c *DialCollector) Describe(ch chan<- *prometheus.Desc)

Describe is part of the prometheus.Collector interface.

func (*DialCollector) PostDialServer Uses

func (c *DialCollector) PostDialServer(server string, duration time.Duration, dialErr error)

PostDialServer is a function that may be used in mongo.DialOpts.PostDialServer, to update metrics.

type MgoStatsCollector Uses

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

MgoStatsCollector is a prometheus.Collector that collects metrics based on mgo stats.

func NewMgoStatsCollector Uses

func NewMgoStatsCollector(getCurrentStats func() mgo.Stats) *MgoStatsCollector

NewMgoStatsCollector returns a new MgoStatsCollector.

func (*MgoStatsCollector) Collect Uses

func (c *MgoStatsCollector) Collect(ch chan<- prometheus.Metric)

Collect is part of the prometheus.Collector interface.

func (*MgoStatsCollector) Describe Uses

func (c *MgoStatsCollector) Describe(ch chan<- *prometheus.Desc)

Describe is part of the prometheus.Collector interface.

type TxnCollector Uses

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

TxnCollector is a prometheus.Collector that collects metrics about mgo/txn operations.

func NewTxnCollector Uses

func NewTxnCollector() *TxnCollector

NewTxnCollector returns a new TxnCollector.

func (*TxnCollector) AfterRunTransaction Uses

func (c *TxnCollector) AfterRunTransaction(dbName, modelUUID string, ops []txn.Op, err error)

AfterRunTransaction is called when a mgo/txn transaction has run.

func (*TxnCollector) Collect Uses

func (c *TxnCollector) Collect(ch chan<- prometheus.Metric)

Collect is part of the prometheus.Collector interface.

func (*TxnCollector) Describe Uses

func (c *TxnCollector) Describe(ch chan<- *prometheus.Desc)

Describe is part of the prometheus.Collector interface.

Package mongometrics imports 6 packages (graph) and is imported by 3 packages. Updated 2019-03-18. Refresh now. Tools for package owners.