v3

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 Aggregation

type Aggregation struct {
	Servers    []string
	Cache      time.Duration
	Mode       string
	Database   string
	Collection string
	Pipeline   string
	Metrics    []Metric
}

Aggregation defines what aggregation pipeline is executed on what servers

type Config

type Config struct {
	Bind         string
	MetricsPath  string
	Log          zap.Config
	Global       Global
	Servers      []*Server
	Aggregations []*collector.Aggregation
}

Configuration v3.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      time.Duration
	DefaultMode       string
	DefaultDatabase   string
	DefaultCollection string
}

Global config

type Metric

type Metric struct {
	Name          string
	Type          string
	Help          string
	Value         string
	OverrideEmpty bool
	EmptyValue    int64
	ConstLabels   prometheus.Labels
	Labels        []string
}

Metric defines how a certain value is exported from a MongoDB aggregation

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