mongodb_exporter

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	DirectConnect: true,
}

Functions

func New

func New(logger log.Logger, c *Config) (integrations.Integration, error)

New creates a new mongodb_exporter integration.

Types

type Config

type Config struct {
	// MongoDB connection URI. example:mongodb://user:pass@127.0.0.1:27017/admin?ssl=true"
	URI                    config_util.Secret `yaml:"mongodb_uri"`
	DirectConnect          bool               `yaml:"direct_connect,omitempty"`
	DiscoveringMode        bool               `yaml:"discovering_mode,omitempty"`
	TLSBasicAuthConfigPath string             `yaml:"tls_basic_auth_config_path,omitempty"`
}

Config controls mongodb_exporter

func (*Config) InstanceKey

func (c *Config) InstanceKey(_ string) (string, error)

InstanceKey returns the address:port of the mongodb server being queried.

func (*Config) Name

func (c *Config) Name() string

Name returns the name of the integration that this config represents.

func (*Config) NewIntegration

func (c *Config) NewIntegration(logger log.Logger) (integrations.Integration, error)

NewIntegration creates a new mongodb_exporter

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler for Config

Jump to

Keyboard shortcuts

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