AWS RDS MySQL¶
Use the TrueWatch Cloud Sync script package in the script market to synchronize cloud monitoring and cloud asset data to TrueWatch
Configuration¶
Install Func¶
It is recommended to activate TrueWatch Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed. Please proceed with the script installation.
If deploying Func manually, refer to Manual Func Deployment
Install Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant the global read-only permission
ReadOnlyAccess)
Activate Script in Automata¶
- Log in to the TrueWatch console
- Click on the 【Integration】 menu, select 【Cloud Account Management】
- Click on 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, you can skip this step.
- Click on 【Test】, and after the test is successful, click on 【Save】. If the test fails, please check if the relevant configuration information is correct and retest.
- On the 【Cloud Account Management】 list, you can see the added cloud account. Click on the corresponding cloud account to enter the details page.
- Click on the 【Integration】 button on the cloud account details page, and under the
Not Installedlist, findAWS RDS MySQL, and click on the 【Install】 button. The installation interface will pop up for installation.
Manually Activate Script¶
-
Log in to the Func console, click on 【Script Market】, enter the TrueWatch script market, and search for:
integration_aws_rds -
Click on 【Install】, and enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click on 【Deploy Startup Script】, the system will automatically create the
Startupscript set and automatically configure the corresponding startup script. -
After activation, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click on 【Execute】 to immediately execute it once without waiting for the scheduled time. After a while, you can check the execution task record and corresponding logs.
Verification¶
- In 「Management / Automatic Trigger Configuration」, confirm whether the corresponding task has the corresponding automatic trigger configuration, and you can also check the corresponding task record and logs to see if there are any exceptions.
- In TrueWatch, check if the asset information exists in 「Infrastructure / Custom」.
- In TrueWatch, check if there is corresponding monitoring data in 「Metrics」.
Metrics¶
After Amazon CloudWatch is configured, the default metrics are as follows. You can collect more metrics through configuration: Amazon CloudWatch Metrics Details
Amazon CloudWatch Instance-Level 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.
The table below is aligned with the latest AWS documentation and keeps only metrics that apply to MySQL or to all engines.
| Metric | Applies To | Description | Unit |
|---|---|---|---|
BinLogDiskUsage |
MySQL | 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 |
All | The percentage of I/O credits remaining in the burst bucket for General Purpose SSD (GP2) storage. | Percentage |
ConnectionAttempts |
MySQL | The number of attempts to connect to the instance, regardless of success. | Count |
CPUUtilization |
All | The percentage of CPU usage. | Percentage |
CPUCreditUsage |
All | The number of CPU credits spent by the instance to maintain CPU usage. One CPU credit equals one vCPU running at 100% utilization for one minute, or an equivalent combination of vCPU, utilization, and time. This metric applies only to db.t2, db.t3, and db.t4g instances. CPU credit metrics are emitted every five minutes; for periods greater than five minutes, use the Sum statistic. |
Credits (vCPU minutes) |
CPUCreditBalance |
All | The number of CPU credits accumulated by the instance since launch. For T2 Standard, CPUCreditBalance also includes launch credits. This metric applies only to db.t2, db.t3, and db.t4g instances. |
Credits (vCPU minutes) |
CPUSurplusCreditBalance |
All | The number of surplus credits spent by an unlimited instance when CPUCreditBalance is zero. |
Credits (vCPU minutes) |
CPUSurplusCreditsCharged |
All | The number of surplus credits spent that are not covered by earned CPU credits and therefore incur additional charges. | Credits (vCPU minutes) |
DatabaseConnections |
All | The number of client network connections to the database instance. The value can be lower than the actual number of sessions because it excludes some internal, parallel, scheduler, stale, and Amazon RDS connections. | Count |
DiskQueueDepth |
All | The number of outstanding I/O requests waiting to access the disk. | Count |
DiskQueueDepthLogVolume |
DB instances with dedicated log volume enabled | The number of outstanding I/O requests waiting to access the log volume disk. | Count |
EBSByteBalance% |
All | The percentage of throughput credits remaining in the burst bucket for RDS database storage. This metric is available only for basic monitoring. | Percentage |
EBSIOBalance% |
All | The percentage of I/O credits remaining in the burst bucket for RDS database storage. This metric is available only for basic monitoring. | Percentage |
FreeableMemory |
All | The amount of available random-access memory. For MariaDB, MySQL, Oracle, and PostgreSQL DB instances, this reports the MemAvailable field from /proc/meminfo. |
Bytes |
FreeLocalStorage |
All | The amount of available local storage. This metric applies only to DB instance classes with NVMe SSD instance storage volumes. | Bytes |
FreeLocalStoragePercent |
All | The percentage of available local storage. This metric applies only to DB instance classes with NVMe SSD instance storage volumes. | Percentage |
FreeStorageSpace |
All | The amount of available storage space. | Bytes |
FreeStorageSpaceLogVolume |
DB instances with dedicated log volume enabled | The amount of available storage space on the log volume. | Bytes |
IamDbAuthConnectionRequests |
All | The number of connection requests that use IAM authentication to access the DB instance. | Count |
NetworkReceiveThroughput |
All | The incoming network traffic for the DB instance, including customer database traffic and Amazon RDS traffic for monitoring and replication. | Bytes per second |
NetworkTransmitThroughput |
All | The outgoing network traffic for the DB instance, including customer database traffic and Amazon RDS traffic for monitoring and replication. | Bytes per second |
ReadIOPS |
All | The average number of disk read I/O operations per second. | Count per second |
ReadIOPSLocalStorage |
All | The average number of local storage read I/O operations per second. This metric applies only to DB instance classes with NVMe SSD instance storage volumes. | Count per second |
ReadIOPSLogVolume |
DB instances with dedicated log volume enabled | The average number of read I/O operations per second to the log volume. | Count per second |
ReadLatency |
All | The average time per disk I/O operation. | Seconds |
ReadLatencyLocalStorage |
All | The average time per local storage I/O operation. This metric applies only to DB instance classes with NVMe SSD instance storage volumes. | Seconds |
ReadLatencyLogVolume |
DB instances with dedicated log volume enabled | The average time per I/O operation to the log volume. | Seconds |
ReadThroughput |
All | The average number of bytes read from disk per second. | Bytes per second |
ReadThroughputLocalStorage |
All | The average number of bytes read from local storage per second. This metric applies only to DB instance classes with NVMe SSD instance storage volumes. | Bytes per second |
ReadThroughputLogVolume |
DB instances with dedicated log volume enabled | The average number of bytes read from the log volume per second. | Bytes per second |
ReplicaLag |
All | For read replica configurations, the amount of time the read replica lags behind the source DB instance. For Multi-AZ DB clusters, this is the time difference between the latest transaction on the writer and the latest applied transaction on the reader. | Seconds |
ReplicationChannelLag |
MySQL | For multi-source replica configurations, the amount of time a specific channel on the replica lags behind the source DB instance. | Seconds |
SwapUsage |
MySQL | The amount of swap space used on the DB instance. | Bytes |
WriteIOPS |
All | The average number of disk write I/O operations per second. | Count per second |
WriteIOPSLocalStorage |
All | The average number of local storage write I/O operations per second. This metric applies only to DB instance classes with NVMe SSD instance storage volumes. | Count per second |
WriteIOPSLogVolume |
DB instances with dedicated log volume enabled | The average number of write I/O operations per second to the log volume. | Count per second |
WriteLatency |
All | The average time per disk I/O operation. | Seconds |
WriteLatencyLocalStorage |
All | The average time per local storage I/O operation. This metric applies only to DB instance classes with NVMe SSD instance storage volumes. | Seconds |
WriteLatencyLogVolume |
DB instances with dedicated log volume enabled | The average time per I/O operation to the log volume. | Seconds |
WriteThroughput |
All | The average number of bytes written to disk per second. | Bytes per second |
WriteThroughputLogVolume |
DB instances with dedicated log volume enabled | The average number of bytes written to the log volume per second. | Bytes per second |
WriteThroughputLocalStorage |
All | The average number of bytes written to local storage per second. This metric applies only to DB instance classes with NVMe SSD instance storage volumes. | Bytes per second |
Amazon CloudWatch Usage Metrics for Amazon RDS¶
The AWS/Usage namespace in Amazon CloudWatch includes account-level usage metrics for Amazon RDS service quotas. CloudWatch automatically collects usage metrics for all AWS Regions.
For more information, see CloudWatch Usage Metrics in the Amazon CloudWatch User Guide. For quota-related details, see Quotas and Limits for Amazon RDS and Requesting a Quota Increase in the Service Quotas User Guide.
| Metric | Description | Unit* |
|---|---|---|
AllocatedStorage |
The total storage space for all DB instances. The total does not include temporary migration instances. | Gigabytes |
AuthorizationsPerDBSecurityGroup |
The number of inbound rules per DB security group in your AWS account. The reported value is the maximum across DB security groups in the account. | Count |
CustomEndpointsPerDBCluster |
The number of custom endpoints per DB cluster in your AWS account. The reported value is the maximum across DB clusters in the account. | Count |
CustomEngineVersions |
The number of custom engine versions (CEVs) for Amazon RDS Custom in your AWS account. | Count |
DBClusterParameterGroups |
The number of DB cluster parameter groups in your AWS account, excluding default parameter groups. | Count |
DBClusterRoles |
The number of associated IAM roles per DB cluster in your AWS account. The reported value is the maximum across DB clusters in the account. | Count |
DBClusters |
The number of Amazon Aurora DB clusters in your AWS account. | Count |
DBInstanceRoles |
The number of associated IAM roles per DB instance in your AWS account. The reported value is the maximum across DB instances in the account. | Count |
DBInstances |
The number of DB instances in your AWS account. | Count |
DBParameterGroups |
The number of DB parameter groups in your AWS account, excluding default DB parameter groups. | Count |
DBSecurityGroups |
The number of DB security groups in your AWS account, excluding the default security group and the default VPC security group. | Count |
DBSubnetGroups |
The number of DB subnet groups in your AWS account, excluding the default subnet group. | Count |
EventSubscriptions |
The number of event notification subscriptions in your AWS account. | Count |
Integrations |
The number of Zero-ETL integrations with Amazon Redshift in your AWS account. | Count |
ManualClusterSnapshots |
The number of manually created DB cluster snapshots in your AWS account, excluding invalid snapshots. | Count |
ManualSnapshots |
The number of manually created DB snapshots in your AWS account, excluding invalid snapshots. | Count |
OptionGroups |
The number of option groups in your AWS account, excluding default option groups. | Count |
Proxies |
The number of RDS Proxies in your AWS account. | Count |
ReadReplicasPerMaster |
The number of read replicas per DB instance in your AWS account. The reported value is the maximum across DB instances in the account. | Count |
ReservedDBInstances |
The number of reserved DB instances in your AWS account, excluding deactivated or denied instances. | Count |
SubnetsPerDBSubnetGroup |
The number of subnets per DB subnet group in your AWS account. The reported value is the maximum across DB subnet groups in the account. | Count |
* Amazon RDS does not publish the units of usage metrics to CloudWatch. These units appear only in the documentation.
Object¶
The AWS RDS MySQL object data structure collected can be viewed in 「Infrastructure - Custom」
{
"measurement": "aws_rds",
"tags": {
"name" : "xxxxx",
"RegionId" : "cn-northwest-1",
"Engine" : "mysql",
"DBInstanceClass" : "db.t3.medium",
"DBInstanceIdentifier" : "xxxxxx",
"AvailabilityZone" : "cn-northwest-1c",
"SecondaryAvailabilityZone": "cn-northwest-1d"
},
"fields": {
"InstanceCreateTime" : "2018-03-28T19:54:07.871Z",
"LatestRestorableTime": "2018-03-28T19:54:07.871Z",
"Endpoint" : "{Connection Address JSON Data}",
"AllocatedStorage" : 100,
"message" : "{Instance JSON Data}",
}
}
Note: The fields in
tagsandfieldsmay change with subsequent updatesTip 1: The value of
tags.nameis the instance ID, used as a unique identifierTip 2:
fields.message,fields.Endpointare JSON serialized strings