Documentation ¶
Index ¶
- Variables
- func DetectDeploymentType(session connection.Session) (string, error)
- func GetShards(session connection.Session, integration *integration.Integration) ([]string, error)
- type Cmd
- type Collector
- func GetClusters(session connection.Session, integration *integration.Integration) ([]Collector, error)
- func GetCollections(dbName string, session connection.Session, ...) ([]Collector, error)
- func GetConfigServers(session connection.Session, integration *integration.Integration) ([]Collector, error)
- func GetDatabases(session connection.Session, integration *integration.Integration, ...) ([]Collector, error)
- func GetMongoses(session connection.Session, integration *integration.Integration) ([]Collector, error)
- func GetReplSetMongods(session connection.Session, integration *integration.Integration) ([]Collector, error)
- func GetShardMongods(session connection.Session, shardHostString string, ...) ([]Collector, error)
- func GetStandaloneMongod(session connection.Session, integration *integration.Integration) Collector
Constants ¶
This section is empty.
Variables ¶
var ( // ClusterName is an identifier for the cluster ClusterName string )
var DeploymentType string
DeploymentType is either sharded_cluster, replica_set, or standalone
Functions ¶
func DetectDeploymentType ¶
func DetectDeploymentType(session connection.Session) (string, error)
DetectDeploymentType tries to detect what type of mongo deployment is being monitored
func GetShards ¶
func GetShards(session connection.Session, integration *integration.Integration) ([]string, error)
GetShards creates an array of ShardCollectors
Types ¶
type Cmd ¶ added in v1.1.0
type Cmd map[string]interface{}
Cmd is an aliasi for map[string]interface{}
type Collector ¶
type Collector interface { CollectMetrics() CollectInventory() GetName() string GetEntity() (*integration.Entity, error) GetIntegration() *integration.Integration GetSession() (connection.Session, error) }
Collector is an interface which represents an entity. A Collector knows how to collect itself through the CollectMetrics and CollectInventory methods.
func GetClusters ¶
func GetClusters(session connection.Session, integration *integration.Integration) ([]Collector, error)
GetClusters returns an array of MongosCollectors which will be collected
func GetCollections ¶
func GetCollections(dbName string, session connection.Session, integration *integration.Integration, filter *filter.DatabaseFilter) ([]Collector, error)
GetCollections returns a list of CollectionCollectors which each collect a collection
func GetConfigServers ¶
func GetConfigServers(session connection.Session, integration *integration.Integration) ([]Collector, error)
GetConfigServers returns a list of ConfigCollectors to collect
func GetDatabases ¶
func GetDatabases(session connection.Session, integration *integration.Integration, filter *filter.DatabaseFilter) ([]Collector, error)
GetDatabases returns a list of DatabaseCollectors which each collect a specific database
func GetMongoses ¶
func GetMongoses(session connection.Session, integration *integration.Integration) ([]Collector, error)
GetMongoses returns an array of MongosCollectors which will be collected
func GetReplSetMongods ¶
func GetReplSetMongods(session connection.Session, integration *integration.Integration) ([]Collector, error)
GetReplSetMongods attempts to connect to a member of a rreplica set to eplica set to
func GetShardMongods ¶
func GetShardMongods(session connection.Session, shardHostString string, integration *integration.Integration) ([]Collector, error)
GetShardMongods attempts to connect to a member of the shard to retrieve shard configuration information
func GetStandaloneMongod ¶ added in v1.1.0
func GetStandaloneMongod(session connection.Session, integration *integration.Integration) Collector
GetStandaloneMongod creates a mongod from a session