Documentation ¶
Index ¶
- type AlertPollOptions
- type MongoDBAtlasClient
- func (s *MongoDBAtlasClient) GetAlerts(ctx context.Context, groupID string, opts *AlertPollOptions) (ret []mongodbatlas.Alert, nextPage bool, err error)
- func (s *MongoDBAtlasClient) GetClusters(ctx context.Context, groupID string) ([]mongodbatlas.Cluster, error)
- func (s *MongoDBAtlasClient) GetLogs(ctx context.Context, groupID, hostname, logName string, start, end time.Time) (*bytes.Buffer, error)
- func (s *MongoDBAtlasClient) GetOrganization(ctx context.Context, orgID string) (*mongodbatlas.Organization, error)
- func (s *MongoDBAtlasClient) GetProject(ctx context.Context, projectName string) (*mongodbatlas.Project, error)
- func (s *MongoDBAtlasClient) Organizations(ctx context.Context) ([]*mongodbatlas.Organization, error)
- func (s *MongoDBAtlasClient) ProcessDatabaseMetrics(ctx context.Context, mb *metadata.MetricsBuilder, projectID string, ...) error
- func (s *MongoDBAtlasClient) ProcessDatabases(ctx context.Context, projectID string, host string, port int) ([]*mongodbatlas.ProcessDatabase, error)
- func (s *MongoDBAtlasClient) ProcessDiskMetrics(ctx context.Context, mb *metadata.MetricsBuilder, projectID string, ...) error
- func (s *MongoDBAtlasClient) ProcessDisks(ctx context.Context, projectID string, host string, port int) []*mongodbatlas.ProcessDisk
- func (s *MongoDBAtlasClient) ProcessMetrics(ctx context.Context, mb *metadata.MetricsBuilder, projectID string, ...) error
- func (s *MongoDBAtlasClient) Processes(ctx context.Context, projectID string) ([]*mongodbatlas.Process, error)
- func (s *MongoDBAtlasClient) Projects(ctx context.Context, orgID string) ([]*mongodbatlas.Project, error)
- func (s *MongoDBAtlasClient) Shutdown() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertPollOptions ¶ added in v0.62.0
type MongoDBAtlasClient ¶
type MongoDBAtlasClient struct {
// contains filtered or unexported fields
}
MongoDBAtlasClient wraps the official MongoDB Atlas client to manage pagination and mapping to OpenTelmetry metric and log structures.
func NewMongoDBAtlasClient ¶
func NewMongoDBAtlasClient( publicKey string, privateKey string, retrySettings exporterhelper.RetrySettings, log *zap.Logger, ) *MongoDBAtlasClient
NewMongoDBAtlasClient creates a new MongoDB Atlas client wrapper
func (*MongoDBAtlasClient) GetAlerts ¶ added in v0.62.0
func (s *MongoDBAtlasClient) GetAlerts(ctx context.Context, groupID string, opts *AlertPollOptions) (ret []mongodbatlas.Alert, nextPage bool, err error)
GetAlerts returns the alerts specified for the set projects
func (*MongoDBAtlasClient) GetClusters ¶ added in v0.59.0
func (s *MongoDBAtlasClient) GetClusters(ctx context.Context, groupID string) ([]mongodbatlas.Cluster, error)
retrieves the logs from the mongo API using API call: https://www.mongodb.com/docs/atlas/reference/api/clusters-get-all/#request
func (*MongoDBAtlasClient) GetLogs ¶ added in v0.59.0
func (s *MongoDBAtlasClient) GetLogs(ctx context.Context, groupID, hostname, logName string, start, end time.Time) (*bytes.Buffer, error)
GetLogs retrieves the logs from the mongo API using API call: https://www.mongodb.com/docs/atlas/reference/api/logs/#syntax
func (*MongoDBAtlasClient) GetOrganization ¶ added in v0.59.0
func (s *MongoDBAtlasClient) GetOrganization(ctx context.Context, orgID string) (*mongodbatlas.Organization, error)
GetOrganization retrieves a single organization specified by orgID
func (*MongoDBAtlasClient) GetProject ¶ added in v0.59.0
func (s *MongoDBAtlasClient) GetProject(ctx context.Context, projectName string) (*mongodbatlas.Project, error)
GetProject returns a single project specified by projectName
func (*MongoDBAtlasClient) Organizations ¶
func (s *MongoDBAtlasClient) Organizations(ctx context.Context) ([]*mongodbatlas.Organization, error)
Organizations returns a list of all organizations available with the supplied credentials
func (*MongoDBAtlasClient) ProcessDatabaseMetrics ¶ added in v0.38.0
func (s *MongoDBAtlasClient) ProcessDatabaseMetrics( ctx context.Context, mb *metadata.MetricsBuilder, projectID string, host string, port int, dbname string, start string, end string, resolution string, ) error
ProcessDatabaseMetrics returns metrics about a particular database running within a MongoDB Atlas process
func (*MongoDBAtlasClient) ProcessDatabases ¶ added in v0.38.0
func (s *MongoDBAtlasClient) ProcessDatabases( ctx context.Context, projectID string, host string, port int, ) ([]*mongodbatlas.ProcessDatabase, error)
ProcessDatabases lists databases that are running in a given MongoDB Atlas process
func (*MongoDBAtlasClient) ProcessDiskMetrics ¶ added in v0.38.0
func (s *MongoDBAtlasClient) ProcessDiskMetrics( ctx context.Context, mb *metadata.MetricsBuilder, projectID string, host string, port int, partitionName string, start string, end string, resolution string, ) error
ProcessDiskMetrics returns metrics supplied for a particular disk partition used by a MongoDB Atlas process
func (*MongoDBAtlasClient) ProcessDisks ¶ added in v0.38.0
func (s *MongoDBAtlasClient) ProcessDisks( ctx context.Context, projectID string, host string, port int, ) []*mongodbatlas.ProcessDisk
ProcessDisks enumerates the disks accessible to a specified MongoDB Atlas process
func (*MongoDBAtlasClient) ProcessMetrics ¶ added in v0.38.0
func (s *MongoDBAtlasClient) ProcessMetrics( ctx context.Context, mb *metadata.MetricsBuilder, projectID string, host string, port int, start string, end string, resolution string, ) error
ProcessMetrics returns a set of metrics associated with the specified running process.
func (*MongoDBAtlasClient) Processes ¶ added in v0.38.0
func (s *MongoDBAtlasClient) Processes( ctx context.Context, projectID string, ) ([]*mongodbatlas.Process, error)
Processes returns the list of processes running for a given project.
func (*MongoDBAtlasClient) Projects ¶ added in v0.38.0
func (s *MongoDBAtlasClient) Projects( ctx context.Context, orgID string, ) ([]*mongodbatlas.Project, error)
Projects returns a list of projects accessible within the provided organization
func (*MongoDBAtlasClient) Shutdown ¶ added in v0.43.0
func (s *MongoDBAtlasClient) Shutdown() error