Monitor the Read Replicas

Now that you’ve seen how to set up some basic monitoring for the primary node, let’s focus on the read replicas. With read replicas, you need to keep an eye on replication lag, to make sure that our replicas are staying up to date. If they are not staying up to date, you should look at the configuration of the primary node and the read replicas to make sure they have enough capacity to handle replication work.

In summary, for read replicas, you should monitor:

  • DBClusterReplicaLagMaximum (This is a cluster-level metric, but indicates how quickly the replicas as a whole are keeping up to date with the master)
  • DBInstanceReplicaLag
  • Plus the metrics being monitored for the primary node

You can follow the same process to set up an Amazon CloudWatch dashboard for the read replicas as you used for the primary node. You’d use the READER dimension rather than WRITER.

You can monitor individual instances as well, and you will work through an example of this later as part of automating the dashboard creation process.