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 ¶
InstanceKey returns the address:port of the mongodb server being queried.
func (*Config) NewIntegration ¶
func (c *Config) NewIntegration(logger log.Logger) (integrations.Integration, error)
NewIntegration creates a new mongodb_exporter
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config
Click to show internal directories.
Click to hide internal directories.