AWS RDS PostgreSQL
Use the "Guance Cloud Sync" script packages 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 - Extensions - DataFlux Func (Automata): All prerequisites will be automatically installed. Please proceed with the script installation.
If you want to deploy Func manually, refer to Deploy Func Manually
Install Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can grant global read-only permissions
ReadOnlyAccess
)
Activate Script in DataFlux Func (Automata)¶
- Log in to the Guance console
- Click the 【Integration】 menu and select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step
- Click 【Test】, and if the test is successful, click 【Save】. If the test fails, please check if the relevant configuration information is correct and test again
- Click 【Cloud Account Management】, and you can see the added cloud account in the list. Click the corresponding cloud account to enter the details page
- Click the 【Integration】 button on the cloud account details page, find
AWS RDS PostgreSQL
under theNot Installed
list, and click the 【Install】 button. The installation interface will pop up for installation. Click the 【Install】 button, and the installation interface will pop up for installation.
Activate Script Manually¶
-
Log in to the Func console, click 【Script Market】, enter the Guance script market, and search:
integration_aws_rds_postgresql
-
Click 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create the
Startup
script set and automatically configure the corresponding startup script. -
After activation, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to execute it immediately without waiting for the scheduled time. After a while, you can view the execution task records and corresponding logs.
Verification¶
- In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the corresponding automatic trigger configuration, and you can also view the corresponding task records and logs to check for any abnormalities
- In Guance, check if the asset information exists in 「Infrastructure - Resource Catalog」
- In Guance, check if there is corresponding monitoring data in 「Metrics」
Metrics¶
Configure Amazon CloudWatch to collect more metrics Amazon CloudWatch Metrics Details
Amazon CloudWatch Metrics for Amazon RDS¶
The AWS/RDS
namespace in Amazon CloudWatch includes the following instance-level metrics.
Note: The Amazon RDS console may display metrics in different units than those sent to Amazon CloudWatch. For example, the Amazon RDS console may display a metric in megabytes (MB), while sending the metric to Amazon CloudWatch in bytes.
Metric | Console Name | Description | Unit |
---|---|---|---|
BinLogDiskUsage |
Binary Log Disk Usage (MB) | The amount of disk space occupied by binary logs. Binary logs are created if automatic backups are enabled for MySQL and MariaDB instances (including read replicas). | Bytes |
BurstBalance |
Burst Balance (Percentage) | The percentage of I/O credits remaining in the burst bucket for General Purpose SSD (GP2) storage. | Percentage |
CheckpointLag |
Checkpoint Lag (Milliseconds) | The time since the last checkpoint. Only applicable to RDS for PostgreSQL. | Milliseconds |
ConnectionAttempts |
Connection Attempts (Count) | The number of attempts to connect to the instance, regardless of success. | Count |
CPUUtilization |
CPU Utilization (Percentage) | The percentage of CPU usage. | Percentage |
CPUCreditUsage |
CPU Credit Usage (Count) | (T2 instances) The number of CPU credits spent by the instance to maintain CPU usage. One CPU credit equals one vCPU running at 100% usage for one minute or an equivalent combination of vCPU, usage, and time. For example, you can have one vCPU running at 50% usage for two minutes, or two vCPUs running at 25% usage for two minutes. CPU credit metrics are only provided every 5 minutes. If you specify a period greater than five minutes, use the Sum statistic instead of the Average statistic. |
Credits (vCPU minutes) |
CPUCreditBalance |
CPU Credit Balance (Count) | (T2 instances) The number of CPU credits accumulated by the instance since launch. For T2 Standard, CPUCreditBalance also includes the number of launch credits accumulated. Credits are added to the credit balance after they are earned; credits are deducted from the credit balance after they are spent. The credit balance has a maximum limit, which is determined by the instance size. After reaching the limit, any new credits earned are discarded. For T2 Standard, launch credits do not count toward the limit. The instance can spend credits in the CPUCreditBalance to burst above the baseline CPU usage. Credits in the CPUCreditBalance do not expire while the instance is running. When the instance is stopped, the CPUCreditBalance is not retained, and all accumulated credits are lost. CPU credit metrics are only provided every 5 minutes. Launch credits work the same way in Amazon RDS as they do in Amazon EC2. For more information, see Launch Credits in the Amazon Elastic Compute Cloud User Guide for Linux Instances. |
Credits (vCPU minutes) |
DatabaseConnections |
Database Connections (Count) | The 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 a network connection but have not yet been cleaned up by the database Sessions created by the database engine for its own purposes Sessions created by the database engine's parallel execution feature Sessions created by the database engine's task scheduler Amazon RDS connections | Count |
DiskQueueDepth |
Queue Depth (Count) | The number of outstanding I/O (read/write requests) waiting to access the disk. | Count |
EBSByteBalance% |
EBS Byte Balance (Percentage) | The percentage of throughput credits remaining in the burst bucket for RDS database instances. This metric is only available for basic monitoring. The metric value is based on the throughput and IOPS of all volumes, including the root volume, not just those containing database files. To find instance sizes that support this metric, see the Amazon EC2 User Guide for Linux Instances Default Optimized EBS Table for instance sizes marked with an asterisk (*). The Sum statistic is not applicable to this metric. |
Percentage |
EBSIOBalance% |
EBS IO Balance (Percentage) | The percentage of I/O credits remaining in the burst bucket for RDS database instances. This metric is only available for basic monitoring. The metric value is based on the throughput and IOPS of all volumes, including the root volume, not just those containing database files. To find instance sizes that support this metric, see the Amazon EC2 User Guide for Linux Instances Default Optimized EBS Table for instance sizes marked with an asterisk (*). The Sum statistic is not applicable to this metric. This metric is different from BurstBalance . To learn how to use this metric, see Improving Application Performance and Reducing Costs with Amazon EBS Optimized Instance Burst Capability. |
Percentage |
FailedSQLServerAgentJobsCount |
Failed SQL Server Agent Jobs Count (Count/Minute) | The number of Microsoft SQL Server Agent jobs that failed in the past 1 minute. | Count per minute |
FreeableMemory |
Freeable Memory (MB) | The amount of available random access memory. For MariaDB, MySQL, Oracle, and PostgreSQL database instances, this metric reports the value of the MemAvailable field in /proc/meminfo . |
Bytes |
FreeLocalStorage |
Free Local Storage (MB) | The amount of free local storage space. This metric is only applicable to database instance classes with NVMe SSD instance store volumes. For information about Amazon EC2 instances with NVMe SSD instance store volumes, see Instance Store Volumes. Equivalent RDS database instance classes have the same instance store volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance store volumes. (This does not apply to Aurora Serverless v2.) | Bytes |
FreeStorageSpace |
Free Storage Space (MB) | The amount of free storage space. | Bytes |
MaximumUsedTransactionIDs |
Maximum Used Transaction IDs (Count) | The maximum transaction ID used. Only applicable to PostgreSQL. | Count |
NetworkReceiveThroughput |
Network Receive Throughput (MB/Second) | The incoming (receive) network traffic for the database instance, including customer database traffic and Amazon RDS traffic for monitoring and replication. | Bytes per second |
NetworkTransmitThroughput |
Network Transmit Throughput (MB/Second) | The outgoing (transmit) network traffic for the database instance, including customer database traffic and Amazon RDS traffic for monitoring and replication. | Bytes per second |
OldestReplicationSlotLag |
Oldest Replication Slot Lag (MB) | The lag size of the replica that is the most behind in receiving write-ahead log (WAL) data. Applicable to PostgreSQL. | Bytes |
ReadIOPS |
Read IOPS (Count/Second) | The average number of disk read I/O operations per second. | Count per second |
ReadIOPSLocalStorage |
Read IOPS Local Storage (Count/Second) | The average number of disk read input/output operations per second to local storage. This metric is only applicable to database instance classes with NVMe SSD instance store volumes. For information about Amazon EC2 instances with NVMe SSD instance store volumes, see Instance Store Volumes. Equivalent RDS database instance classes have the same instance store volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance store volumes. | Count per second |
ReadLatency |
Read Latency (Milliseconds) | The average time taken per disk I/O operation. | Milliseconds |
ReadLatencyLocalStorage |
Read Latency Local Storage (Milliseconds) | The average time taken per disk input/output operation to local storage. This metric is only applicable to database instance classes with NVMe SSD instance store volumes. For information about Amazon EC2 instances with NVMe SSD instance store volumes, see Instance Store Volumes. Equivalent RDS database instance classes have the same instance store volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance store volumes. | Milliseconds |
ReadThroughput |
Read Throughput (MB/Second) | The average number of bytes read from disk per second. | Bytes per second |
ReadThroughputLocalStorage |
Read Throughput Local Storage (MB/Second) | The average number of bytes read from disk to local storage per second. This metric is only applicable to database instance classes with NVMe SSD instance store volumes. For information about Amazon EC2 instances with NVMe SSD instance store volumes, see Instance Store Volumes. Equivalent RDS database instance classes have the same instance store volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance store volumes. | Bytes per second |
ReplicaLag |
Replica Lag (Milliseconds) | For read replica configurations, the amount of time the read replica database instance lags behind the source database instance. Applicable to MariaDB, Microsoft SQL Server, MySQL, Oracle, and PostgreSQL read replicas. For Multi-AZ database clusters, the time difference between the latest transaction on the writer database instance and the latest applied transaction on the reader database instance. | Milliseconds |
ReplicationSlotDiskUsage |
Replication Slot Disk Usage (MB) | The disk space used by replication slot files. Applicable to PostgreSQL. | Bytes |
SwapUsage |
Swap Usage (MB) | The amount of swap space used on the database instance. This metric is not available for SQL Server. | Bytes |
TransactionLogsDiskUsage |
Transaction Logs Disk Usage (MB) | The disk space used by transaction logs. Applicable to PostgreSQL. | Bytes |
TransactionLogsGeneration |
Transaction Logs Generation (MB/Second) | The size of transaction logs generated per second. Applicable to PostgreSQL. | Bytes per second |
WriteIOPS |
Write IOPS (Count/Second) | The average number of disk write I/O operations per second. | Count per second |
WriteIOPSLocalStorage |
Write IOPS Local Storage (Count/Second) | The average number of disk write I/O operations per second to local storage. This metric is only applicable to database instance classes with NVMe SSD instance store volumes. For information about Amazon EC2 instances with NVMe SSD instance store volumes, see Instance Store Volumes. Equivalent RDS database instance classes have the same instance store volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance store volumes. | Count per second |
WriteLatency |
Write Latency (Milliseconds) | The average time taken per disk I/O operation. | Milliseconds |
WriteLatencyLocalStorage |
Write Latency Local Storage (Milliseconds) | The average time taken per disk I/O operation to local storage. This metric is only applicable to database instance classes with NVMe SSD instance store volumes. For information about Amazon EC2 instances with NVMe SSD instance store volumes, see Instance Store Volumes. Equivalent RDS database instance classes have the same instance store volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance store volumes. | Milliseconds |
WriteThroughput |
Write Throughput (MB/Second) | The average number of bytes written to disk per second. | Bytes per second |
WriteThroughputLocalStorage |
Write Throughput Local Storage (MB/Second) | The average number of bytes written to disk to local storage per second. This metric is only applicable to database instance classes with NVMe SSD instance store volumes. For information about Amazon EC2 instances with NVMe SSD instance store volumes, see Instance Store Volumes. Equivalent RDS database instance classes have the same instance store volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance store volumes. | Bytes per second |
Objects¶
The collected AWS RDS PostgreSQL object data structure can be viewed in 「Infrastructure - Resource Catalog」
{
"measurement": "aws_rds",
"tags": {
"name" : "xxxxx",
"RegionId" : "cn-northwest-1",
"Engine" : "postgres",
"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:
tags.name
value is the instance ID, used as a unique identifierTip 2:
fields.message
,fields.Endpoint
are JSON serialized strings ```