View a markdown version of this page

CloudWatch metrics for database cluster groups for Aurora - Amazon Aurora

CloudWatch metrics for database cluster groups for Aurora

Read the CloudWatch metrics of a database cluster group for Aurora, its routing layer, and each member cluster. Data movement jobs don't publish CloudWatch metrics; see Data movement metrics. For logs and events, see Logs for database cluster groups for Aurora and Amazon RDS events for database cluster groups for Aurora.

To view the group's metrics in the Amazon RDS console, choose Database cluster groups in the navigation pane, choose the group, and then choose the Monitoring tab.

Dimensions

You can filter metrics for database cluster groups for Aurora in the AWS/RDS namespace by using the dimensions in the following table.

Dimension Filters the requested data for . . .
DbClusterGroupId One database cluster group for Aurora: the member clusters' metrics combined into one group value, and the routing layer's metrics.
DbClusterGroupId, HostType The routing layer's metrics for one group only, when HostType is router.
DBClusterIdentifier One member cluster, as for any Aurora DB cluster. For the other Aurora dimensions, such as Role and DBInstanceIdentifier, see Amazon CloudWatch dimensions for Aurora.

No dimension combines DbClusterGroupId with DBClusterIdentifier. To find the member cluster behind a group value, read the same metric for each member cluster's DBClusterIdentifier. The Amazon VPC endpoints that serve the routing endpoint publish their metrics in the AWS/PrivateLinkEndpoints namespace, with their own dimensions, as described in Routing layer metrics and signals.

Group metrics

The group publishes the member clusters' metrics, combined, under the DbClusterGroupId dimension, whose value is the group's identifier. Each member cluster also keeps publishing under its own DBClusterIdentifier. Use the group value to see whether a metric is high across the group, and then use the DBClusterIdentifier values to find the member cluster that drives it. For example, to detect one member cluster with high processor use, create an alarm on the maximum of CPUUtilization for the group.

A group value combines the member clusters' values by metric family:

Metric family Group value
Throughput, counts, input and output operations, connections, storage, and network The sum across member clusters
Processor use, capacity units, latency, memory health, and replica lag The maximum, from the member cluster with the highest value
Freeable memory and free local storage The minimum, from the member cluster with the lowest value
Latency percentiles A merge of the member clusters' histograms, not an average of their percentiles

A group value covers only the member clusters that published a data point in the period, so it can cover fewer member clusters than the group holds. Group metrics don't state how many member clusters they cover, and no metric reports how many member clusters the routing layer can reach. Before you act on a group value, list the member clusters with DescribeDBClusterGroups and check each one's status with DescribeDBClusters.

Routing layer metrics and signals

The routing layer publishes its metrics in the AWS/RDS namespace under the DbClusterGroupId dimension, and again with the HostType dimension set to router; see Dimensions. Use the following signals to monitor the routing path:

  • Routing layer metrics. Throughput, connection counts, and RouterProcessingLatency, the time that the routing layer adds to each statement, not counting network latency. When application latency rises, compare RouterProcessingLatency with the member cluster's own latency metrics to see where the time is spent. For the full list of routing layer metrics, with their units and statistics, see Routing layer metrics reference for database cluster groups for Aurora.

  • Routed sessions. dbclustergroup_sys.router_processlist lists the sessions that came through the routing layer and the member cluster that each one runs on. Direct connections appear only on their member cluster. See Reading the routed session list.

  • Amazon VPC endpoint metrics. The interface Amazon VPC endpoints that serve the routing endpoint publish AWS/PrivateLinkEndpoints metrics in your account: ActiveConnections, NewConnections, BytesProcessed, PacketsDropped, and RstPacketsReceived. Query them with all four dimensions, Endpoint Type, Service Name, VPC Endpoint Id, and VPC Id; a query that names only VPC Endpoint Id returns no data. For new connections per second, divide the per-minute Sum of NewConnections by 60. For the most connections held in a minute, use the Maximum of ActiveConnections. To find the endpoints, see Finding the routing endpoint's Amazon VPC endpoints.

  • Client-side checks. Record latency and errors per statement type in the application. Add scheduled checks that separate the routing path from one member cluster: a SELECT 1 that the routing layer answers itself, a routed read for each member cluster, and a direct read for each member cluster.

Connections at each point

The routing layer multiplexes connections, so client connections don't map one to one to connections on a member cluster. Connections count at three points:

  • Client connections to the routing endpoint: RouterClientConnections.

  • The routing layer's connections to the member clusters: RouterToMemberConnections. Of these, ActiveRouterToMemberConnections wait for a reply from a member cluster, and RouterPinnedConnections are pinned to a client session.

  • Connections on a member cluster, routed and direct, limited by the engine's max_connections setting. A member cluster's DatabaseConnections includes the sessions that the routing layer and data movement jobs open on it.

Reading the routed session list

At the routing endpoint, list the open connections of one router user. To see other router users' connections, you need the dbclustergroup_process_admin privilege.

SELECT id, user, host, db, command, time FROM dbclustergroup_sys.router_processlist WHERE user = 'USER_NAME';

The WHERE clause accepts comparisons of a column with a literal value (equal, not equal, less than, less than or equal, greater than, greater than or equal), joined by AND. It refuses OR, NULL comparisons, IS NULL, LIKE, and IN, and the query refuses ORDER BY, GROUP BY, DISTINCT, and joins. It accepts LIMIT n, LIMIT n OFFSET m, and LIMIT m, n with integer literals. For example, WHERE command = 'Query' AND time >= 60 finds statements that have run for a minute or more. For other filters, read the whole table and filter in your client. For the columns, see Process list table: router_processlist. To follow one session to its member cluster, see Tracing a session or statement across the group.

Through the routing endpoint, SHOW PROCESSLIST and SHOW FULL PROCESSLIST return error 1235 unless the session is pinned, so read router_processlist instead. In a pinned session, the process list is the member cluster's own. A thread identifier is local to one member cluster, so read the process list again after every change of pin.

Data movement metrics

Data movement jobs report their progress through dbclustergroup_data_movement.move_info, the data movement log, and Amazon RDS events, not through CloudWatch metrics. A job can run for hours and uses input and output on its source and target member clusters, so watch their metrics while it runs. For more information, see Reading move status.

Member cluster metrics

Each member cluster keeps publishing its Aurora metrics under its own DBClusterIdentifier dimension. Joining a group doesn't rename these metrics or change their dimensions, so existing alarms and dashboards keep working. For the metrics, see Amazon CloudWatch metrics for Amazon Aurora and Monitoring Amazon Aurora metrics with Amazon CloudWatch.

Performance Insights and CloudWatch Database Insights have no group view, so read them per DB instance on each member cluster. The routing layer doesn't report to Performance Insights, so statement load comes from the member clusters only. A cluster keeps its Database Insights mode and retention period when it joins a group, so member clusters can differ. For more information, see Monitoring DB load with Amazon CloudWatch Database Insights on Amazon Aurora and Monitoring Amazon Aurora databases with CloudWatch Database Insights. To compare member clusters, see Monitoring member clusters side by side.