Skip to content

AWS RDS MySQL

Use the "Guance Cloud Sync" script packages in the script market to synchronize cloud monitoring and cloud asset data to Guance

Configuration

Install Func

We recommend enabling Guance Integrations - Extensions - Hosted Func: all prerequisites are installed automatically. Continue with script installation.

To deploy Func yourself, see Self-hosted Func.

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)

  1. Log in to the Guance console
  2. Click the 【Integration】 menu and select 【Cloud Account Management】
  3. 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
  4. 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
  5. 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
  6. Click on the 【Integration】 button on the cloud account details page, and under the Not Installed list, find AWS RDS MySQL, and click on the 【Install】 button. The installation interface will pop up for installation.

Activate Script Manually

  1. Log in to the Func console, click on 【Script Market】, enter the Guance script market, and search for: integration_aws_rds

  2. Click 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.

  3. Click 【Deploy Startup Script】, the system will automatically create the Startup script set and automatically configure the corresponding startup script.

  4. 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

  1. Under [Management / Automatic Trigger Configuration], confirm that an automatic trigger configuration exists for the task, and check the task records and logs for errors.
  2. In Guance, check [Infrastructure / Custom] for asset information.
  3. In Guance, check [Metrics] for the corresponding monitoring data.

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
DBLoad MySQL Average number of active database sessions, published only when the instance has a workload. -
DBLoadCPU MySQL Average number of active sessions with CPU as the wait event type, published only when the instance has a workload. -
DBLoadNonCPU MySQL Average number of active sessions whose wait event type is not CPU, published only when the instance has a workload. -
DBLoadRelativeToNumVCPUs MySQL Ratio of database load to vCPU count, published only when the instance has a workload. -
DiskQueueDepth All The number of outstanding I/O (read/write 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 free 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 (receive) network traffic for the database instance, including customer database traffic and Amazon RDS traffic for monitoring and replication. Bytes per second
NetworkTransmitThroughput All The outgoing (transmit) network traffic for the database 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 taken 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 taken 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.

Objects

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: Fields in tags and fields may change with subsequent updates

Tip 1: tags.name value is the instance ID, used as a unique identifier

Tip 2: fields.message, fields.Endpoint are JSON serialized strings

Feedback

Is this page helpful?