AWS Aurora PostgreSQL
Use the script package series of "Guance Cloud Sync" in the script market to synchronize cloud monitoring and cloud asset data to Guance
Configuration¶
Install Func¶
It is recommended to activate the Guance integration - extension - managed Func: all prerequisites are automatically installed. Please continue with the script installation.
If you deploy Func on your own, refer to Self-deployed Func
Install Script¶
Note: Please prepare an Amazon AK that meets the requirements in advance (for simplicity, you can directly grant global read-only permission
ReadOnlyAccess
)
Managed Version Activation Script¶
- Log in to Guance console
- Click the 【Integration】 menu, select 【Cloud Account Management】
- Click 【Add Cloud Account】, choose 【AWS】, fill in the required information on the interface. If you have already configured cloud account information before, skip this step.
- Click 【Test】, if the test is successful, click 【Save】. If the test fails, check whether the relevant configuration information is correct and retest.
- In the 【Cloud Account Management】 list, you can see the added cloud accounts. Click the corresponding cloud account to enter the details page.
- Click the 【Integration】 button on the cloud account details page. Under the
Not Installed
list, findAWS Aurora PostgreSQL
, click the 【Install】 button, and install it via the pop-up installation interface.
Manual Activation Script¶
- Log in to the Func console, click 【Script Market】, go to the official script market, search for
guance_aws_aurora_postgresql
- After clicking 【Install】, input the corresponding parameters: AWS AK ID, AK Secret, and account name.
- Click 【Deploy Startup Script】, the system will automatically create a
Startup
script set and automatically configure the corresponding startup scripts. - After activation, you can see the corresponding automatic trigger configuration in the 「Management / Automatic Trigger Configuration」. Click 【Execute】 to run immediately without waiting for the scheduled time. After a while, you can view the execution task records and corresponding logs.
Verification¶
- Confirm in 「Management / Automatic Trigger Configuration」 whether the corresponding tasks have the corresponding automatic trigger configurations. You can also check the corresponding task records and logs to see if there are any abnormalities.
- In Guance, under 「Infrastructure - Resource Catalog」, check if there is any asset information.
- In Guance, under 「Metrics」, check if there is any corresponding monitoring data.
Metrics¶
Configure Amazon-CloudWatch by configuring more metrics Amazon CloudWatch Metrics Details
Amazon RDS Amazon CloudWatch Metrics¶
The AWS/RDS
namespace includes the following metrics, which apply to database entities running on Amazon Aurora. Some metrics apply to Aurora MySQL and/or Aurora PostgreSQL. Additionally, some metrics are specific to database clusters, primary database instances, replica database instances, or all database instances.
Amazon Aurora Cluster-Level Metrics¶
Metric | Description | Applies To | Unit |
---|---|---|---|
AuroraGlobalDBDataTransferBytes |
In Aurora Global Database, this is the amount of redo log data transferred from the source AWS region to the secondary AWS region. Note: This metric applies only to the secondary AWS region. | Aurora MySQL and Aurora PostgreSQL | Bytes |
AuroraGlobalDBProgressLag |
In Aurora Global Database, measures how far behind user transactions and system transactions the secondary cluster lags the primary cluster. Note: This metric applies only to the secondary AWS region. | Aurora MySQL and Aurora PostgreSQL | Milliseconds |
AuroraGlobalDBReplicatedWriteIO |
In Aurora Global Database, this is the number of write input/output operations replicated from the primary AWS region to the cluster volume in the secondary AWS region. Billing in the secondary AWS region of the global database uses VolumeWriteIOPs to account for writes performed in the cluster. Billing in the primary AWS region of the global database uses VolumeWriteIOPs to account for write activity in that cluster and uses AuroraGlobalDBReplicatedWriteIO to account for cross-region replication in the global database. Note: This metric applies only to the secondary AWS region. | Aurora MySQL and Aurora PostgreSQL | Count |
AuroraGlobalDBReplicationLag |
For Aurora Global Database, this is the lag time when updates are replicated from the primary AWS region. Note: This metric applies only to the secondary AWS region. | Aurora MySQL and Aurora PostgreSQL | Milliseconds |
AuroraGlobalDBRPOLag |
In Aurora Global Database, recovery point objective (RPO) lag time. This metric measures how far behind user transactions the secondary cluster lags the primary cluster. Note: This metric applies only to the secondary AWS region. | Aurora MySQL and Aurora PostgreSQL | Milliseconds |
AuroraVolumeBytesLeftTotal |
Remaining available space on the cluster volume. As the cluster volume grows, this value decreases. If it reaches zero, the cluster reports insufficient space errors. If you want to detect whether an Aurora MySQL cluster is approaching the 128TiB size limit, you can monitor this value more easily and reliably than VolumeBytesUsed. AuroraVolumeBytesLeftTotal takes into account storage used for internal transaction management and other allocations that do not affect storage billing. | Aurora MySQL | Bytes |
BacktrackChangeRecordsCreationRate |
Number of backtrack change records created for your database cluster within 5 minutes. | Aurora MySQL | Count every 5 minutes |
BacktrackChangeRecordsStored |
Number of backtrack change records used by your database cluster | Aurora MySQL | Count |
BackupRetentionPeriodStorageUsed |
Total backup storage used to support the point-in-time restore feature within the backup retention period for Aurora database clusters. This amount is included in the total reported by the TotalBackupStorageBilled metric. Calculated separately for each Aurora cluster. | Aurora MySQL and Aurora PostgreSQL | Bytes |
ServerlessDatabaseCapacity |
Current capacity of the Aurora Serverless database cluster. | Aurora MySQL and Aurora PostgreSQL | Count |
SnapshotStorageUsed |
Total backup storage consumed by all Aurora snapshots of the Aurora database cluster outside its backup retention period. This amount is included in the total reported by the TotalBackupStorageBilled metric. Calculated separately for each Aurora cluster. | Aurora MySQL and Aurora PostgreSQL | Bytes |
VolumeWriteIOPs |
Number of disk I/O write operations on the cluster volume, reported every 5 minutes. For detailed instructions on how billing write operations are calculated, see VolumeReadIOPs. Note that selecting a small --period value makes no sense because Amazon RDS collects these metrics at intervals rather than continuously. | Aurora MySQL and Aurora PostgreSQL | Count every 5 minutes |
Amazon Aurora Instance-Level Metrics¶
Unless otherwise specified, the following instance-specific Amazon CloudWatch metrics apply to all Aurora MySQL and Aurora PostgreSQL instances.
Metric | Description | Applies To | Unit |
---|---|---|---|
AbortedClients |
Number of client connections not properly closed. | Aurora MySQL | Count |
ActiveTransactions |
Average number of current transactions executed per second on the Aurora database instance. By default, Aurora does not enable this metric. To start measuring this value, set innodb_monitor_enable='all' in the database parameter group of the specific database instance. | Aurora MySQL | Count per second |
ACUUtilization |
Value of the ServerlessDatabaseCapacity metric divided by the maximum ACU value of the database cluster. This metric applies only to Aurora Serverless v2. | Aurora MySQL and Aurora PostgreSQL | Percentage |
AuroraDMLRejectedMasterFull |
Number of forwarded queries rejected due to session fullness on the writer database instance. | Applies to the primary instance of Aurora MySQL version 2 | Count |
AuroraDMLRejectedWriterFull |
Number of forwarded queries rejected due to session fullness on the writer database instance. | Applies to the primary instance of Aurora MySQL version 3 | Count |
AuroraEstimatedSharedMemoryBytes |
Estimated amount of actively used shared buffer or buffer pool memory during the last configured polling interval. | Aurora PostgreSQL | Bytes |
AuroraMemoryHealthState |
Indicates memory health status. Value 0 represents NORMAL. Value 10 represents RESERVED, indicating that server memory usage is nearing critical levels. | Aurora MySQL version 3.06.1 and above | Count |
AuroraMemoryNumDeclinedSqlTotal |
Incremental number of queries rejected to avoid out-of-memory (OOM). | Aurora MySQL version 3.06.1 and above | Count |
AuroraMemoryNumKillConnTotal |
Incremental number of connections closed to avoid OOM. | Aurora MySQL version 3.06.1 and above | Count |
AuroraReplicaLag |
Lag amount for Aurora replicas when replicating updates from the primary instance. | Applies to replica instances of Aurora MySQL and Aurora PostgreSQL | Milliseconds |
AuroraReplicaLagMaximum |
Maximum lag amount between the primary instance and any Aurora database instance in the database cluster. When deleting or renaming read-only replicas, replication delay may temporarily spike as old resources go through the recycling process. To get an accurate representation of replication delay during that period, it is recommended to monitor the AuroraReplicaLag metric on each read-only replica instance. | Applies to primary instances of Aurora MySQL and Aurora PostgreSQL | Milliseconds |
AuroraReplicaLagMinimum |
Minimum lag amount between the primary instance and any Aurora database instance in the database cluster. | Applies to primary instances of Aurora MySQL and Aurora PostgreSQL | Milliseconds |
AuroraSlowConnectionHandleCount |
Number of connections waiting two seconds or longer to start the handshake. This metric applies only to Aurora MySQL version 3. | Aurora MySQL | Count |
BacktrackWindowActual |
Difference between the target backtrack window and the actual backtrack window. | Applies to the primary instance of Aurora MySQL | Minutes |
BacktrackWindowAlert |
Number of times the actual backtrack window is less than the target backtrack window for a given time period. | Applies to the primary instance of Aurora MySQL | Count |
BlockedTransactions |
Average number of blocked transactions in the database per second. | Aurora MySQL | Count per second |
BufferCacheHitRatio |
Percentage of requests provided by the buffer cache. | Aurora MySQL and Aurora PostgreSQL | Percentage |
CommitLatency |
Average duration taken by the engine and storage to complete commit operations. | Aurora MySQL and Aurora PostgreSQL | Milliseconds |
CommitThroughput |
Average number of commit operations per second. | Aurora MySQL and Aurora PostgreSQL | Count per second |
ConnectionAttempts |
Number of attempts to connect to the instance, whether successful or not. | Aurora MySQL | Count |
CPUUtilization |
Percentage of CPU utilized by the Aurora database instance. | Aurora MySQL and Aurora PostgreSQL | Percentage |
DatabaseConnections |
Number of client network connections to the database instance. The number of database sessions may be higher than the metric value because the metric value does not include the following: sessions that no longer have network connections but the database has not yet cleaned up, sessions created by the database engine for its own purposes, sessions created by the parallel execution feature of the database engine, sessions created by the task scheduler of the database engine, Amazon Aurora connections | Applies to primary instances of Aurora MySQL and Aurora PostgreSQL | Count |
DDLLatency |
Average duration of requests such as sample, create, alter, and drop requests. | Aurora MySQL | Milliseconds |
DDLThroughput |
Average number of DDL requests per second. | Aurora MySQL | Count per second |
Deadlocks |
Average number of deadlocks in the database per second. | Aurora MySQL and Aurora PostgreSQL | Count per second |
DeleteLatency |
Average duration of delete operations. | Aurora MySQL | Milliseconds |
DeleteThroughput |
Average number of delete queries per second. | Aurora MySQL | Count per second |
DiskQueueDepth |
Number of unfinished read/write requests waiting to access the disk. | Aurora MySQL and Aurora PostgreSQL | Count |
DMLLatency |
Average duration of inserts, updates, and deletes. | Aurora MySQL | Milliseconds |
DMLThroughput |
Average number of inserts, updates, and deletes per second. | Aurora MySQL | Count per second |
EngineUptime |
Length of time the instance has been running. | Aurora MySQL and Aurora PostgreSQL | Seconds |
FreeableMemory |
Available size of random access memory. For Aurora MySQL and Aurora PostgreSQL databases, this metric reports the value of the MemAvailable field in /proc/meminfo. | Aurora MySQL and Aurora PostgreSQL | Bytes |
FreeEphemeralStorage |
Size of available temporary NVMe storage | Aurora PostgreSQL | Bytes |
InsertLatency |
Average duration of insert operations. | Aurora MySQL | Milliseconds |
Objects¶
The collected AWS Aurora PostgreSQL object data structure can be seen in the 「Infrastructure - Resource Catalog」
{
"measurement": "aws_rds",
"tags": {
"name" : "xxxxx",
"RegionId" : "cn-northwest-1",
"Engine" : "aurora-postgresql",
"DBInstanceClass" : "db.t3.medium",
"DBInstanceIdentifier" : "xxxxxx",
"AvailabilityZone" : "cn-northwest-1c",
"SecondaryAvailabilityZone": "ap-southeast-1c"
},
"fields": {
"InstanceCreateTime" : "2025-05-19T19:54:07.871Z",
"LatestRestorableTime": "2025-05-19T19:54:07.871Z",
"Endpoint" : "{connection address JSON data}",
"AllocatedStorage" : 100,
"message" : "{instance JSON data}",
}
}
Note: Fields in
tags
andfields
may change with subsequent updatesTip 1: The value of
tags.name
is the instance ID, used for unique identificationTip 2:
fields.message
andfields.Endpoint
are both serialized JSON strings