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

推荐订阅源

L
LangChain Blog
有赞技术团队
有赞技术团队
博客园_首页
IT之家
IT之家
爱范儿
爱范儿
量子位
小众软件
小众软件
Jina AI
Jina AI
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
The Cloudflare Blog
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
雷峰网
雷峰网
V
Visual Studio Blog
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题

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
How to monitor MongoDB performance with Datadog
Jean-Mathieu Saponaro · 2016-05-25 · via Datadog | The Monitor blog

This post is the last of a 3-part series about monitoring MongoDB. Part 1 presents the key performance metrics available from MongoDB: there is one post for the WiredTiger storage engine and one for MMAPv1. Part 2 explains the different ways to collect MongoDB metrics.

If you’ve already read our first two parts in this series, you know that monitoring MongoDB gives you a range of metrics that allow you to explore its health and performance in great depth. But for databases running in production, you need a robust monitoring system that collects, aggregates, and visualizes MongoDB metrics along with metrics from the other parts of your infrastructure. Advanced alert mechanisms are also essential to be able to quickly react when things go awry. In this post, we’ll show you how to start monitoring MongoDB in a few minutes with Datadog.

Monitor MongoDB graphs on Datadog

Monitor MongoDB performance in 3 easy steps

Step 1: install the Datadog Agent

The Datadog Agent is the open-source software that collects and reports metrics from your hosts so that you can visualize and monitor them in Datadog. Installing the agentusually takes just a single command.

Installation instructions for a variety of platforms are available here.

MongoDB also requires a user with “read” and “clusterMonitor” client roles for Datadog so the Agent can collect all the server statistics. The commands to run in the mongo shell differs between MongoDB versions 2.x and 3.x. They are detailed in the “configuration” tab of the MongoDB’s integration tile on the integrations page on Datadog.

Monitor MongoDB graphs on Datadog

As soon as your Agent is up and running, you should see your host reporting metrics on your Datadog account.

Monitor MongoDB Datadog Agent reporting metrics

Step 2: configure the Agent

Then you’ll need to create a simple MongoDB configuration file for the Agent. For Linux hosts, configuration files are typically located in/etc/dd-agent/conf.d/, but you can find OS-specific config information here.

The Agent configuration file mongo.yaml is where you provide instances informations. You can also apply tags to your MongoDB instances so you can filter and aggregate your metrics later.

The Agent ships with a mongo.yaml.example template, but to access all of the metrics described in Part 1 of this series, you should use the modified YAML template available here.

Step 3: verify the configuration settings

Restart the Agent using the right command for your platform, then check that Datadog and MongoDB are properly integrated by running the Datadog info command.

If the configuration is correct, you should see a section like this in the info output:

Checks

======

[...]

mongo

-----

- instance #0 [OK]

- Collected 8 metrics & 0 events

That’s it! You can now turn on the integration

You can now switch on the MongoDB integration inside your Datadog account. It’s as simple as clicking the “Install Integration” button under the Configuration tab in the MongoDB integration tile on your Datadog account.

Metrics! Metrics everywhere!

Now that the Agent is properly configured, you will see all the MongoDB metrics available for monitoring, graphing, and correlation on Datadog.

You can immediately see your metrics populating a default dashboard for MongoDB containing the essential MongoDB metrics presented in Part 1. It should be a great starting point for your monitoring. You can clone this dashboard and customize it as you wish, even adding metrics from other parts of your infrastructure so that you can easily correlate what’s happening in MongoDB with what’s happening throughout your stack.

MongoDB default dashboard on Datadog
Monitor MongoDB Dashboard on Datadog
MongoDB default dashboard on Datadog

Alerting

Once Datadog is capturing and graphing your metrics, you will likely want to set up some alerts to keep watch over your metrics and to notify your teams about any issues.

Datadog allows you to alert on individual hosts, services, processes, and metrics—or virtually any combination thereof. For instance, you can monitor all of your hosts in a certain availability zone, or you can monitor a single key metric being reported by each of your MongoDB hosts.

For example, as explained in Part 1, the number of current connections is limited to 65,536 simultaneous connections by default since v3.0. So you might want to set up an alert whenever the corresponding metric is getting close to this maximum.

Monitor MongoDB Datadog alert

Datadog also integrates with many communication tools such as Slack, PagerDuty or HipChat so you can notify your teams via the channels you already use.

You are now a MongoDB pro!

This concludes the series on how to monitor MongoDB. In this post we’ve walked you through integrating MongoDB with Datadog to visualize your key metrics and notify your team whenever your database shows signs of trouble.

If you’ve followed along using your own Datadog account, you should now have unparalleled visibility into MongoDB’s activity and performance. You are also aware of the ability to create automated alerts tailored to your environment, usage patterns, and the metrics that are most valuable to your teams.

If you don’t yet have a Datadog account, you can sign up for a free trial and start monitoring MongoDB alongside the rest of your infrastructure, your applications, and your services today.