v2

package
v5.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Bind        string
	MetricsPath string
	Log         zap.Config
	Global      Global
	Servers     []*Server
	Metrics     []*Metric
}

Configuration v2.0 format

func (*Config) Build

func (conf *Config) Build() (*collector.Collector, error)

Build collectors from a configuration v2.0 format and return a collection of all configured collectors

func (*Config) GetBindAddr

func (conf *Config) GetBindAddr() string

Get address where the http server should be bound to

func (*Config) GetMetricsPath

func (conf *Config) GetMetricsPath() string

Get metrics path

type Global

type Global struct {
	QueryTimeout      time.Duration
	MaxConnections    int32
	DefaultCache      int64
	DefaultMode       string
	DefaultDatabase   string
	DefaultCollection string
}

type Metric

type Metric struct {
	Servers       []string
	Cache         int64
	Mode          string
	Database      string
	Collection    string
	Pipeline      string
	Name          string
	Type          string
	Help          string
	Value         string
	OverrideEmpty bool
	EmptyValue    int64
	ConstLabels   prometheus.Labels
	Labels        []string
}

Metric defines an exported metric from a MongoDB aggregation pipeline

type Server

type Server struct {
	Name string
	URI  string
}

MongoDB client options

Jump to

Keyboard shortcuts

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