To create a custom view of your database or compare the performance of multiple instances, use a monitoring dashboard. You can select the instances and metrics you want to monitor, compare performance between instances, and correlate different metrics to get a comprehensive overview of your database's health.
Prerequisites
Your ApsaraDB RDS for PostgreSQL instance must be the High-availability Edition.
Database Autonomy Service (DAS) has been rolling out the monitoring dashboard feature for ApsaraDB RDS for PostgreSQL since May 20, 2022.
Add a monitoring dashboard
-
Log in to the ApsaraDB RDS console.
-
In the left-side navigation pane, click Maintenance & Monitoring > Performance Monitoring.
-
On the Performance Monitoring page, click the Monitoring Dashboard tab.
-
On the tab for your target database engine, click Add Monitoring Dashboard.
-
Enter a name for the New Monitoring Dashboard, and click OK.
-
Click Select Instances and Metrics, select the target instances and metrics, and then click
.Note-
You can monitor up to 32 instances.
-
For more information about the metrics, see Metrics.
In the Select Instances and Metrics dialog box, select the target instances. In the Select Metrics area, select the PostgreSQL metrics to monitor (including host metrics and basic PostgreSQL monitoring). Then click Confirm.
-
-
Click Confirm.
NoteTo modify the instances or metrics on the dashboard, click Add Instances and Metrics.
View metric trends
Log on to the ApsaraDB RDS console.
In the left-side navigation pane, click Maintenance & Monitoring > Performance Monitoring.
On the Performance Monitoring page, click the Monitoring Dashboard tab.
On the tab for your target database engine, select the desired monitoring dashboard and set a time range to view the trend charts for the selected metrics.
NoteWhen you select a time range, the end time must be later than the start time, and the range cannot span more than seven days.
Use Filter by Instance to select multiple instances and compare their metrics.
Turn on Auto-refresh to refresh the data every 5 seconds.
Turn on Linkage Chart to correlate metrics and view their values at the same point in time.
Use Chart Layout to set the number of metric trend charts to display per row.
Click Add Instances and Metrics to modify the instances or metrics in the dashboard.
Click Details on a metric trend chart to zoom in on the chart. You can also change the time range to view the metric trend over different periods.
Click Delete on a metric trend chart to remove the metric from the monitoring dashboard.
Metrics
|
Category |
Parameter |
Description |
|
host metrics |
cpu_sys_ratio |
The CPU utilization of the PostgreSQL process in kernel mode. |
|
cpu_user_ratio |
The CPU utilization of the PostgreSQL process in user mode. |
|
|
cpu_usage |
The CPU utilization of the PostgreSQL process. |
|
|
mem_usage |
The memory usage of the PostgreSQL process. |
|
|
data.r_s |
The read IOPS for the disk containing the data directory. |
|
|
data.iops |
The IOPS for the disk containing the data directory. |
|
|
data.w_s |
The write IOPS for the disk containing the data directory. |
|
|
local_fs_size_total |
The total disk space. |
|
|
data.fs.used |
The used space on the disk containing the data directory. |
|
|
data.fs.usage |
The disk usage of the disk containing the data directory. |
|
|
network_out_io |
The outbound network traffic of the PostgreSQL process. |
|
|
network_io |
The network traffic of the PostgreSQL process. |
|
|
network_in_io |
The inbound network traffic of the PostgreSQL process. |
|
|
basic PostgreSQL monitoring |
waiting_connection |
The number of waiting connections. |
|
idle_in_transaction |
The number of sessions that are idle within a transaction. |
|
|
active_session |
The number of active sessions. |
|
|
total_session |
The total number of sessions. |
|
|
tup_inserted |
The number of rows inserted per second. |
|
|
tup_deleted |
The number of rows deleted per second. |
|
|
tup_updated |
The number of rows updated per second. |
|
|
tup_returned |
The number of rows returned by sequential scans per second. |
|
|
tup_fetched |
The number of rows fetched by index scans per second. |
|
|
tps |
The number of transactions per second (TPS). |
|
|
xact_rollback |
The number of transactions rolled back per second. |
|
|
xact_commit |
The number of transactions committed per second. |
|
|
deadlocks |
The number of deadlocks per second. |
|
|
oldest_snapshot |
The oldest transaction snapshot point. Dead tuples created before this point can be reclaimed. |
|
|
max_sent_delay |
The data send latency on the secondary RDS instance. |
|
|
max_replay_delay |
The data replay latency on the secondary RDS instance. |
|
|
long_query_5s |
The number of SQL queries that run for 5 seconds or longer. |
|
|
long_query_1s |
The number of SQL queries that run for 1 second or longer. |
|
|
long_query_3s |
The number of SQL queries that run for 3 seconds or longer. |
|
|
long_idle_in_transaction_3s |
The number of transactions that are idle for 3 seconds or longer. |
|
|
long_idle_in_transaction_5s |
The number of transactions that are idle for 5 seconds or longer. |
|
|
long_idle_in_transaction_1s |
The number of transactions that are idle for 1 second or longer. |
|
|
long_2pc_1s |
The number of two-phase commit (2PC) transactions running for 1 second or longer. |
|
|
long_2pc_5s |
The number of two-phase commit (2PC) transactions running for 5 seconds or longer. |
|
|
long_2pc_3s |
The number of two-phase commit (2PC) transactions running for 3 seconds or longer. |
You can also view a metric's description by clicking the
icon next to its name on the monitoring dashboard.