惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
F
Fortinet All Blogs
博客园_首页
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
D
Docker
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
T
The Exploit Database - CXSecurity.com
博客园 - 三生石上(FineUI控件)
量子位
The Last Watchdog
The Last Watchdog
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Blog of Author Tim Ferriss
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
小众软件
小众软件
Cloudbric
Cloudbric
博客园 - 司徒正美
H
Help Net Security
人人都是产品经理
人人都是产品经理
Application and Cybersecurity Blog
Application and Cybersecurity Blog
L
LangChain Blog
Latest news
Latest news
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
博客园 - Franky
S
Security Affairs
W
WeLiveSecurity
F
Full Disclosure
Know Your Adversary
Know Your Adversary
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
Cyberwarzone
Cyberwarzone
美团技术团队
PCI Perspectives
PCI Perspectives
C
Check Point Blog
Spread Privacy
Spread Privacy

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Track and troubleshoot MongoDB performance with Datadog Database Monitoring
Casey Culligan, Meaghan Vella · 2024-11-04 · via Datadog | The Monitor blog

Many modern applications rely on MongoDB and MongoDB Atlas to manage growing data volumes and to provide flexible schema and data structures. As organizations adopt these and other NoSQL databases, effective monitoring and optimization become critical, especially in distributed environments. The decentralized nature of microservices and the increasing complexity of applications can lead to fragmented insights and limited visibility into database performance, resulting in longer troubleshooting times and decreased application stability.

Datadog Database Monitoring (DBM) now supports MongoDB, building on existing MongoDB and MongoDB Atlas integrations to provide deeper visibility into database performance.

DBM surfaces critical information about your MongoDB instances, including slow operations, explain plans, and replication state changes. It enables you to analyze detailed operation samples to pinpoint performance bottlenecks before they impact applications. You can also monitor the health and efficiency of your MongoDB instances, making it easier to proactively diagnose and resolve database issues.

In this post, we’ll walk through how DBM for MongoDB enables your teams to:

  • Ensure high availability by tracking replication health and node status to keep MongoDB self-hosted and Atlas clusters running smoothly

  • Optimize query and database performance by using detailed metrics and explain plans to identify and resolve bottlenecks

  • Drive collaboration by unifying MongoDB monitoring with application and infrastructure metrics for a complete view of system performance

Ensure high availability by tracking replication health and node status

In distributed MongoDB environments, maintaining high availability across clusters with multiple nodes and replicas is essential. Replication failures or misconfigurations can result in significant downtime and data inconsistencies, which may impact application performance and reliability.

DBM helps teams keep MongoDB nodes healthy and replicating smoothly by providing metrics on replication lag (mongodb.replset.optime_lag), replica set member state (mongodb.replset.state), and member health (mongodb.replset.health), alongside other cluster health telemetry. mongodb.replset.optime_lag measures the delay between a write on the primary and its replication to the secondary, helping you monitor replication state with minimal delay. Additionally, mongodb.replset.votefraction and mongodb.replset.votes track election processes within replica sets to confirm that leader elections proceed smoothly when needed. These metrics provide visibility to help ensure that your clusters remain available and that replication functions as expected, even as your system scales.

DBM offers two key views to help you visualize your MongoDB clusters:

Cluster List

When you open DBM, you’ll see the Cluster List view, which provides a comprehensive list of your MongoDB clusters. This view displays critical metrics like queries per second, reads and writes per second, and replication details. You can monitor overall cluster performance at a glance and drill into specific clusters for more detailed metrics like replication lag and operations log (oplog) size. This allows you to detect potential issues early and take preventive action.

Keep track of all MongoDB clusters in one place.
Database List Page
Keep track of all MongoDB clusters in one place.

Cluster Composition

From the Cluster List view, you can navigate to the Composition tab to see a visual representation of your cluster’s structure. MongoDB Clusters are grouped by replica set or shard, with each node represented by a hexagon. Healthy nodes appear in green, while offline or unhealthy nodes show in red. This visualization provides a quick assessment of cluster health and confirms that replication processes are functioning as expected.

Monitor MongoDB cluster health and replication status with near real-time telemetry.
Cluster Composition View
Monitor MongoDB cluster health and replication status with near real-time telemetry.

You can set custom alerts on these metrics to notify you, for example, when replication lags or a node goes down. This enables you to maintain high availability and quickly resolve issues before they escalate.

Optimize query and database performance by using detailed metrics and explain plans

As your application scales, database queries can become performance bottlenecks. Inefficient indexing strategies or suboptimal query patterns can lead to slow response times and degraded application performance. Identifying the root cause of these slowdowns in a distributed environment is complex, requiring visibility into query behavior, execution plans, and host-level metrics.

DBM simplifies troubleshooting database inefficiencies by providing detailed information on MongoDB queries and operations. You can identify issues such as slow queries caused by missing indexes, full collection scans from inefficient execution plans, or resource contention from high CPU or memory usage. DBM’s features provide a complete picture of MongoDB performance, allowing you to drill down from high-level metrics to specific inefficiencies.

Slow Queries and Top Operations

The Slow Queries tab highlights the longest-running queries, displaying key metrics such as total duration, the number of keys or documents examined, documents returned, and the type of execution plan used (e.g., COLLSCAN for collection scans).

Track slow-running queries.
Slow Queries View
Track slow-running queries.

Similarly, the Top Operations tab ranks the most resource-intensive operations, showing which queries or operations consume the most resources. Together, these views offer an overview of major resource bottlenecks due to a specific slow query or a high-traffic operation.

Track most frequently executed and slowest MongoDB queries and analyze their performance.
Top Operations View
Track most frequently executed and slowest MongoDB queries and analyze their performance.

Explain plans for deeper diagnosis

After identifying slow queries or high-resource operations, you can analyze their explain plans for more detail. This feature breaks down MongoDB’s query execution, revealing whether the query performs a full collection scan (COLLSCAN), inefficiently sorts large datasets in memory, lacks key indexes to speed up execution, or scans more index entries or documents than it returns. The Map View visually highlights the most resource-intensive parts of the query execution, while the List View provides a step-by-step breakdown of each stage, from index usage to document retrieval, offering the context needed to optimize performance.

Analyze query explain plan to identify the most expensive steps.
Explain Plan View
Analyze query explain plan to identify the most expensive steps.

Linking slow queries to their execution plans enables you to diagnose inefficiencies and optimize them by adding indexes, adjusting query filters to reduce the number of scanned documents, or refining projections to limit returned fields.

Query samples for additional context

The Samples tab allows you to examine individual query executions in greater detail. You can filter by attributes such as database, user, client IP, or application to pinpoint specific queries or users that may be causing issues. Each sample includes the originating statement and in-flight duration, and provides metadata—such as the application making the query—to give context on how queries interact with your database and whether certain applications or users generate inefficient queries.

You can link query samples back to slow queries and explain plans, providing an end-to-end view of how and why a query is underperforming, from execution time to context.

Analyze individual query executions, including originating statements and context details.
Query Samples View
Analyze individual query executions, including originating statements and context details.

Collections for schema and index information

Beyond individual queries, DBM provides details on MongoDB Collections, allowing you to track schema-level information such as index usage, index size, document size, and read/write operations per second. Optimizing your indexing strategy is key to efficient query execution. Monitoring index usage and collection activity lets you make proactive adjustments to enhance performance, especially in high-traffic collections. For example, dropping unused indexes can reduce write overhead and improve efficiency.

Track MongoDB collections, schema details, and index usage to optimize database performance.
Collections View
Track MongoDB collections, schema details, and index usage to optimize database performance.

By using these features together, you can troubleshoot performance bottlenecks from a high level down to specific queries and maintain optimal performance as your MongoDB environment scales.

Drive collaboration by unifying MongoDB monitoring with application and infrastructure metrics

Databases like MongoDB have often been monitored in silos, with dedicated database teams managing and troubleshooting as needed. With separate monitoring solutions, it can be challenging to ensure the right teams are notified promptly and have the necessary tools and context to troubleshoot efficiently. Additionally, most organizations rely on various database types, further complicating monitoring efforts.

DBM offers a full-stack view of MongoDB performance, enabling teams to understand database health alongside infrastructure metrics like CPU and memory usage. This holistic view simplifies pinpointing the root cause of issues, attributing them to resource constraints or inefficient queries.

View a comprehensive set of metrics to quickly assess MongoDB performance and identify potential bottlenecks.
Metrics View
View a comprehensive set of metrics to quickly assess MongoDB performance and identify potential bottlenecks.

You can set up recommended monitors for key thresholds, such as memory consumption or available connections, to ensure faster incident response. By making database health and performance easily accessible, DBM enables multiple teams—including application developers, platform teams, and database administrators—to interpret database and query performance metrics, fostering efficient collaboration.

Set alerts on common database performance issues to react to issues faster.
Recommended Monitors
Set alerts on common database performance issues to react to issues faster.

Monitoring MongoDB alongside your infrastructure and other databases in DBM enables teams to troubleshoot issues effectively and ensure consistent performance across the entire stack.

Start monitoring MongoDB performance from end to end

Datadog DBM delivers key metrics on your MongoDB databases alongside infrastructure telemetry, providing a unified view to proactively manage performance and address issues before they affect your applications.

From monitoring critical MongoDB cluster health to setting proactive alerts and analyzing slow queries, DBM enables your teams to optimize performance and reduce troubleshooting time. DBM offers support for multiple database types, so you can manage all your databases in one place, simplifying and scaling your monitoring efforts.

Visit our documentation to learn more about DBM. If you’re new to Datadog, sign up for a free 14-day trial.