Documentation
¶
Overview ¶
Package exporter implements the collectors and metrics handlers.
Index ¶
Constants ¶
View Source
const ( // UnknownState is the values for an unknown rs state. // From MongoDB documentation: https://docs.mongodb.com/manual/reference/replica-states/ UnknownState = 6 // EnterpriseEdition shows that MongoDB is Enterprise edition. EnterpriseEdition = "Enterprise" // CommunityEdition shows that MongoDB is Community edition. CommunityEdition = "Community" // PerconaVendor means that MongoDB provided by Percona. PerconaVendor = "Percona" // MongoDBVendor means that MongoDB provided by Mongo. MongoDBVendor = "MongoDB" )
Variables ¶
View Source
var ErrCannotGetTopologyLabels = fmt.Errorf("cannot get topology labels")
ErrCannotGetTopologyLabels Cannot read topology labels.
View Source
var ErrInvalidOrMissingInprogEntry = errors.New("invalid or missing inprog entry in currentop results")
View Source
var ErrInvalidOrMissingTotalsEntry = fmt.Errorf("Invalid or misssing totals entry in top results")
Functions ¶
func RunWebServer ¶ added in v0.40.0
func RunWebServer(opts *ServerOpts, exporters []*Exporter, log *logrus.Logger)
Runs the main web-server
Types ¶
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter holds Exporter methods and attributes.
type Opts ¶
type Opts struct {
// Only get stats for the collections matching this list of namespaces.
// Example: db1.col1,db.col1
CollStatsNamespaces []string
CollStatsLimit int
CompatibleMode bool
DirectConnect bool
ConnectTimeoutMS int
DisableDefaultRegistry bool
DiscoveringMode bool
GlobalConnPool bool
ProfileTimeTS int
TimeoutOffset int
CollectAll bool
EnableDBStats bool
EnableDBStatsFreeStorage bool
EnableDiagnosticData bool
EnableReplicasetStatus bool
EnableCurrentopMetrics bool
EnableTopMetrics bool
EnableIndexStats bool
EnableCollStats bool
EnableProfile bool
EnableOverrideDescendingIndex bool
IndexStatsCollections []string
Logger *logrus.Logger
URI string
}
Opts holds new exporter options.
type ServerOpts ¶ added in v0.40.0
type ServerOpts struct {
Path string
MultiTargetPath string
WebListenAddress string
TLSConfigPath string
}
ServerOpts is the options for the main http handler
type ShardingChangelogStats ¶
type ShardingChangelogStats struct {
Items *[]ShardingChangelogSummary
}
ShardingChangelogStats is an array of Sharding changelog stats.
type ShardingChangelogSummary ¶
type ShardingChangelogSummary struct {
ID *ShardingChangelogSummaryID `bson:"_id"`
Count float64 `bson:"count"`
}
ShardingChangelogSummary Sharding Changelog Summary.
type ShardingChangelogSummaryID ¶
ShardingChangelogSummaryID Sharding Changelog Summary ID.
Source Files
¶
- base_collector.go
- collstats_collector.go
- common.go
- currentop_collector.go
- dbstats_collector.go
- debug.go
- diagnostic_data_collector.go
- exporter.go
- exporter_metrics.go
- general_collector.go
- indexstats_collector.go
- metrics.go
- profile_status_collector.go
- replset_status_collector.go
- server.go
- top_collector.go
- topology_info.go
- v1_compatibility.go
Click to show internal directories.
Click to hide internal directories.