Multiple clusters

If you use multiple Amazon DocumentDB clusters, you may want to keep an eye on trends across several clusters. For example, let’s say that you have two Amazon DocumentDB databases in production. As a database administrator, you want to keep an eye on performance trends across both databases.

Fortunately, it’s quite easy to build a composite dashboard with metrics from two databases. As you add a new widget to a dashboard, you can select a metric from a different database cluster or database instance.

If you want to try this now, you’ll need to create a second Amazon DocumentDB database. You can follow the steps in Step 3 of the Getting Started Guide to create a single-node database. After you create the second database, note the database cluster ID.

  • Go back to the dashboard you built earlier in the section on monitoring the primary node.
  • Click Add Widget.
  • Select Line and click Next.

Amazon CloudWatch Widget Add

  • Select Metric and click Configure.
  • Choose the DocDB namespace and the Cluster Metrics by Role dimension.
  • Choose a metric from your second database cluster.
  • Click Create widget.
  • Rename your widget.

Amazon CloudWatch Multi DB

You can also build composite alarms. For example, let’s say that high network traffic is expected occasionally on your databases, but usually not on two databases at the same time. You can set an alarm that triggers on high network activity on each database; these alarms will not trigger any actions. You then set up a composite alarm that triggers if the individual database alarms are both going off at the same time. That might indicate an unusual level of network activity in your VPC that you need to diagnose.