Mongodbatlas Receiver
contrib
Maintainers: @justinianvoss22, @dyl10s, @ishleenk17
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Getting Started
The MongoDB Atlas receiver takes the following parameters.public_key and
private_key are the only two required values to receive metrics and logs and are obtained via the
“API Keys” tab of the MongoDB Atlas Project Access Manager. In the example
below both values are being pulled from the environment.
In order to collect logs, at least one project must be specified. By default, logs for all clusters within a project will be collected. Clusters can be limited using either the include_clusters or exclude_clusters setting.
In order to collect project events, the requesting API key needs the appropriate permission which at minimum is the Project Read Only role. Project events are specific to a single project.
In order to collect organization events, the requesting API key needs the appropriate permission which at minimum is the Organization Member role. Organization events are collected across all the projects hosted on Atlas within the organization. These events are not associated with a project.
In order to collect access logs, the requesting API key needs the appropriate permission which requires either the Project Owner or Organization Owner role. Access logs are specific to each cluster.
MongoDB Atlas Documentation recommends a polling interval of 5 minutes.
base_url(default https://cloud.mongodb.com/) set the base URL to connect to Atlas Cloudpublic_key(required for metrics, logs, or alerts inpollmode)private_key(required for metrics, logs, or alerts inpollmode)granularity(defaultPT1M- See MongoDB Atlas Documentation)collection_interval(default3m) This receiver collects metrics on an interval. Valid time units arens,us(orµs),ms,s,m,h.storage(optional) The component ID of a storage extension which can be used when polling foralertsorevents. The storage extension prevents duplication of data after a collector restart by remembering which data were previously collected.projects(optional for metrics) a slice of projects this receiver collects metrics from instead of all projects in an organizationnameName of the project to discover metrics frominclude_clusters(default empty, exclusive withexclude_clusters)exclude_clusters(default empty, exclusive withinclude_clusters)- If both
include_clustersandexclude_clustersare empty, then all clusters in the project will be included
- If both
retry_on_failureenabled(default true)initial_interval(default 5s)max_interval(default 30s)max_elapsed_time(default 5m)
alertsenabled(default false)mode(defaultlisten. Options arepollorlisten)secret(required if usinglistenmode)endpoint(required if usinglistenmode)poll_interval(default5m, only relevant usingpollmode)page_size(default100)- When in
pollmode, this is the number of alerts that will be processed per request to the MongoDB Atlas API.
- When in
max_pages(default10)- When in
pollmode, this will limit how many pages of alerts the receiver will request for each project.
- When in
projects(required if usingpollmode)name(required if usingpoll mode)include_clusters(default empty, exclusive withexclude_clusters)exclude_clusters(default empty, exclusive withinclude_clusters)- If both
include_clustersandexclude_clustersare empty, then all clusters in the project will be included
- If both
tls(relevant only forlistenmode)key_filecert_file
logsenabled(default false)projects(required if enabled)name(required if enabled)collect_host_logs(default true)collect_audit_logs(default false)- Audit logging must be enabled for your MongoDB Atlas project in order to scrape audit logs.
access_logsenabled(default true, if theaccess_logsparameter is defined)auth_result- If specified, will limit the access logs queried to successful accesses (true) or failed accesses (false). If not specified, all will be collected
page_size(default20000)- This is the number of access logs that will be processed per request to the MongoDB Atlas API. The maximum value is 20000.
max_pages(default10)- This will limit how many pages of access logs the receiver will request from the MongoDB Atlas API for a project.
poll_interval(default5m)- This will define how frequently the MongoDB Atlas API is queried for Access Logs for the given project.
include_clusters(default empty)exclude_clusters(default empty)
eventsprojectsnameName of the Project to discover events from.
organizationsidID of the Organization to discover events from.
poll_interval(default1m)- How often the receiver will poll the Events API for new events.
page_size(default100)- This is the number of events that will be processed per request to the MongoDB Atlas API.
max_pages(default25)- This will limit how many pages of events the receiver will request from the MongoDB Atlas API for each project.
types(defaults to all types of events)- This is a list of event types that the receiver will request from the API. If specified, the receiver will collect only the indicated types of events.
Metrics
Attributes
Resource Attributes
Configuration
Example Configuration
Last generated: 2026-08-24