AWS RDS MySQL¶
Use the Guance Cloud Sync script package in the script market to synchronize cloud monitoring and cloud asset data to Guance
Configuration¶
Install Func¶
It is recommended to activate Guance 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 Guance 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 Installed
list, 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 Guance 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
Startup
script 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 Guance, check if the asset information exists in 「Infrastructure / Custom」.
- In Guance, check if there is corresponding monitoring data in 「Metrics」.
Metrics¶
After configuring Amazon CloudWatch, the default Measurement is 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.
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% utilization for one minute or an equivalent combination of vCPU, utilization, and time. For example, you can have one vCPU running at 50% utilization for two minutes, or two vCPUs running at 25% utilization for two minutes. CPU credit metrics are only available every five 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 its launch. For T2 Standard, CPUCreditBalance also includes the accumulated launch credits. After credits are earned, they are added to the credit balance; after credits are spent, they are deducted from the credit balance. The credit balance has a maximum limit determined by the instance size. After reaching the limit, any new credits earned are discarded. For T2 Standard, launch credits are not counted towards the limit. The instance can spend credits from 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 available every five 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 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 storage. 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 storage. 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 failed Microsoft SQL Server Agent jobs in the past 1 minute. | Count per minute |
FreeableMemory |
Freeable Memory (MB) | The amount of random access memory available. 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 storage volumes. For information about Amazon EC2 instances with NVMe SSD instance storage volumes, see Instance Storage Volumes. Equivalent RDS database instance classes have the same instance storage volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance storage 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 most lagging replica 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 I/O operations per second to local storage. This metric is only applicable to database instance classes with NVMe SSD instance storage volumes. For information about Amazon EC2 instances with NVMe SSD instance storage volumes, see Instance Storage Volumes. Equivalent RDS database instance classes have the same instance storage volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance storage volumes. | Count per second |
ReadLatency |
Read Latency (Milliseconds) | The average time per disk I/O operation. | Milliseconds |
ReadLatencyLocalStorage |
Read Latency Local Storage (Milliseconds) | The average time per disk I/O operation to local storage. This metric is only applicable to database instance classes with NVMe SSD instance storage volumes. For information about Amazon EC2 instances with NVMe SSD instance storage volumes, see Instance Storage Volumes. Equivalent RDS database instance classes have the same instance storage volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance storage 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 storage volumes. For information about Amazon EC2 instances with NVMe SSD instance storage volumes, see Instance Storage Volumes. Equivalent RDS database instance classes have the same instance storage volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance storage 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 amount of 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 amount of disk space used by transaction logs. Applicable to PostgreSQL. | Bytes |
TransactionLogsGeneration |
Transaction Logs Generation (MB/Second) | The amount 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 storage volumes. For information about Amazon EC2 instances with NVMe SSD instance storage volumes, see Instance Storage Volumes. Equivalent RDS database instance classes have the same instance storage volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance storage volumes. | Count per second |
WriteLatency |
Write Latency (Milliseconds) | The average time per disk I/O operation. | Milliseconds |
WriteLatencyLocalStorage |
Write Latency Local Storage (Milliseconds) | The average time per disk I/O operation to local storage. This metric is only applicable to database instance classes with NVMe SSD instance storage volumes. For information about Amazon EC2 instances with NVMe SSD instance storage volumes, see Instance Storage Volumes. Equivalent RDS database instance classes have the same instance storage volumes. For example, the db.m6gd and db.r6gd database instance classes have NVMe SSD instance storage 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 storage volumes. For information about Amazon EC2 instances with NVMe SSD instance storage volumes, see Instance Storage Volumes. Equivalent RDS database instance classes have the same instance storage volumes. For example, the db.m6gd and db.r6gd database instance classes have 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 more information about quotas, 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 database instances. The total does not include temporary migration instances. | Gigabytes |
DBClusterParameterGroups |
The number of database cluster parameter groups in your AWS account. The count does not include the default parameter group. | Count |
DBClusters |
The number of Amazon Aurora database clusters in your AWS account. | Count |
DBInstances |
The number of database instances in your AWS account. | Count |
DBParameterGroups |
The number of database parameter groups in your AWS account. The count does not include the default database parameter group. | Count |
DBSecurityGroups |
The number of security groups in your AWS account. The count does not include the default security group and the default VPC security group. | Count |
DBSubnetGroups |
The number of database subnet groups in your AWS account. The count does not include the default subnet group. | Count |
ManualClusterSnapshots |
The number of manually created database cluster snapshots in your AWS account. The count does not include invalid snapshots. | Count |
ManualSnapshots |
The number of manually created database snapshots in your AWS account. The count does not include invalid snapshots. | Count |
OptionGroups |
The number of option groups in your AWS account. The count does not include the default option group. | Count |
ReservedDBInstances |
The number of reserved database instances in your AWS account. The count does not include deactivated or denied instances. | Count |
* Amazon RDS does not publish the units of usage metrics to CloudWatch. These units only appear 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
tags
andfields
may change with subsequent updatesTip 1: The value of
tags.name
is the instance ID, used as a unique identifierTip 2:
fields.message
,fields.Endpoint
are JSON serialized strings ```