mongodb_exporter

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	CompatibleMode:           true,
	CollectAll:               true,
	DirectConnect:            true,
	DiscoveringMode:          true,
	EnableDBStats:            false,
	EnableDBStatsFreeStorage: false,
	EnableDiagnosticData:     false,
	EnableReplicasetStatus:   false,
	EnableReplicasetConfig:   false,
	EnableCurrentopMetrics:   false,
	EnableTopMetrics:         false,
	EnableIndexStats:         false,
	EnableCollStats:          false,
	EnableProfile:            false,
	EnableShards:             false,
	EnableFCV:                false,
	EnablePBMMetrics:         false,
}

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"`
	CompatibleMode           bool               `yaml:"compatible_mode,omitempty"`
	CollectAll               bool               `yaml:"collect_all,omitempty"`
	DirectConnect            bool               `yaml:"direct_connect,omitempty"`
	DiscoveringMode          bool               `yaml:"discovering_mode,omitempty"`
	EnableDBStats            bool               `yaml:"enable_db_stats,omitempty"`
	EnableDBStatsFreeStorage bool               `yaml:"enable_db_stats_free_storage,omitempty"`
	EnableDiagnosticData     bool               `yaml:"enable_diagnostic_data,omitempty"`
	EnableReplicasetStatus   bool               `yaml:"enable_replicaset_status,omitempty"`
	EnableReplicasetConfig   bool               `yaml:"enable_replicaset_config,omitempty"`
	EnableCurrentopMetrics   bool               `yaml:"enable_currentop_metrics,omitempty"`
	EnableTopMetrics         bool               `yaml:"enable_top_metrics,omitempty"`
	EnableIndexStats         bool               `yaml:"enable_index_stats,omitempty"`
	EnableCollStats          bool               `yaml:"enable_coll_stats,omitempty"`
	EnableProfile            bool               `yaml:"enable_profile,omitempty"`
	EnableShards             bool               `yaml:"enable_shards,omitempty"`
	EnableFCV                bool               `yaml:"enable_fcv,omitempty"`
	EnablePBMMetrics         bool               `yaml:"enable_pbm_metrics,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