exporter

package
v0.0.0-...-f8f84c4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package exporter implements the collectors and metrics handlers.

Index

Constants

This section is empty.

Variables

View Source
var ErrCannotGetTopologyLabels = fmt.Errorf("cannot get topology labels")

ErrCannotGetTopologyLabels Cannot read topology labels.

Functions

func DefaultMetricsHandler

func DefaultMetricsHandler() http.Handler

func RunServer

func RunServer(name, addr, path string, handler http.Handler)

RunServer runs server for exporter with given name (it is used on landing page) on given address, with HTTP basic authentication (if configured) and with given HTTP handler (that should be created with DefaultMetricsHandler or manually). Function never returns.

func TLSConfig

func TLSConfig() *tls.Config

TLSConfig returns a new tls.Config instance configured according to Percona's security baseline.

Types

type Exporter

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

Exporter holds Exporter methods and attributes.

func New

func New(opts *Opts) (*Exporter, error)

New connects to the database and returns a new Exporter instance.

func (*Exporter) Run

func (e *Exporter) Run()

Run starts the exporter.

type Opts

type Opts struct {
	CompatibleMode          bool
	DiscoveringMode         bool
	GlobalConnPool          bool
	DirectConnect           bool
	URI                     string
	Path                    string
	WebListenAddress        string
	IndexStatsCollections   []string
	CollStatsCollections    []string
	Logger                  *logrus.Logger
	DisableDiagnosticData   bool
	DisableReplicasetStatus bool
	WebSslCertFile          string
	WebSslKeyFile           string
}

Opts holds new exporter options.

type ShardingChangelogStats

type ShardingChangelogStats struct {
	Items *[]ShardingChangelogSummary
}

ShardingChangelogStats is an array of Sharding changelog stats.

type ShardingChangelogSummary

type ShardingChangelogSummary struct {
	ID    *ShardingChangelogSummaryID `bson:"_id"`
	Count float64                     `bson:"count"`
}

ShardingChangelogSummary Sharding Changelog Summary.

type ShardingChangelogSummaryID

type ShardingChangelogSummaryID struct {
	Event string `bson:"event"`
	Note  string `bson:"note"`
}

ShardingChangelogSummaryID Sharding Changelog Summary ID.

Jump to

Keyboard shortcuts

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