Table: aws_rds_db_instance_metric_cpu_utilization_hourly - Query AWS RDS DB Instance Metrics using SQL
The AWS RDS DB Instance Metrics is a feature of Amazon Relational Database Service (RDS) that allows you to monitor the performance of your databases. It provides CPU utilization metrics, which indicate the percentage of CPU utilization for an Amazon RDS instance. This can be used to assess the load on your database and optimize performance as necessary.
Table Usage Guide
The aws_rds_db_instance_metric_cpu_utilization_hourly
table in Steampipe provides you with information about the CPU utilization metrics of AWS RDS DB instances on an hourly basis. This table enables you, as a DevOps engineer, to query specific details about CPU usage, including maximum, minimum, and average utilization, as well as the sum of all utilization within the specified time frame. You can utilize this table to monitor and analyze the CPU consumption of your RDS DB instances, which can assist you in optimizing resource usage and identifying potential performance issues. The schema outlines the various attributes of the CPU utilization metric for you, including the DB instance identifier, timestamp, and various statistics related to CPU utilization.
The aws_rds_db_instance_metric_cpu_utilization_hourly
table provides you with metric statistics at 1 hour intervals for the most recent 60 days.
Examples
Basic info
Analyze the CPU utilization of AWS RDS database instances over time to understand performance trends and identify potential bottlenecks or periods of high demand.
select db_instance_identifier, timestamp, minimum, maximum, average, sample_countfrom aws_rds_db_instance_metric_cpu_utilization_hourlyorder by db_instance_identifier, timestamp;
select db_instance_identifier, timestamp, minimum, maximum, average, sample_countfrom aws_rds_db_instance_metric_cpu_utilization_hourlyorder by db_instance_identifier, timestamp;
CPU Over 80% average
Discover the instances where the average CPU utilization of your AWS RDS database instances exceeds 80%. This could be used to identify potential performance issues and manage resources more effectively.
select db_instance_identifier, timestamp, round(minimum :: numeric, 2) as min_cpu, round(maximum :: numeric, 2) as max_cpu, round(average :: numeric, 2) as avg_cpu, sample_countfrom aws_rds_db_instance_metric_cpu_utilization_hourlywhere average > 80order by db_instance_identifier, timestamp;
select db_instance_identifier, timestamp, round(minimum, 2) as min_cpu, round(maximum, 2) as max_cpu, round(average, 2) as avg_cpu, sample_countfrom aws_rds_db_instance_metric_cpu_utilization_hourlywhere average > 80order by db_instance_identifier, timestamp;
CPU hourly average < 2%
Explore which AWS RDS database instances have an average CPU utilization of less than 2% on an hourly basis. This can be useful to identify potentially under-utilized resources and optimize infrastructure costs.
select db_instance_identifier, timestamp, round(minimum :: numeric, 2) as min_cpu, round(maximum :: numeric, 2) as max_cpu, round(average :: numeric, 2) as avg_cpu, sample_countfrom aws_rds_db_instance_metric_cpu_utilization_hourlywhere average < 2order by db_instance_identifier, timestamp;
select db_instance_identifier, timestamp, round(minimum, 2) as min_cpu, round(maximum, 2) as max_cpu, round(average, 2) as avg_cpu, sample_countfrom aws_rds_db_instance_metric_cpu_utilization_hourlywhere average < 2order by db_instance_identifier, timestamp;
Schema for aws_rds_db_instance_metric_cpu_utilization_hourly
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
average | double precision | The average of the metric values that correspond to the data point. | |
db_instance_identifier | text | The friendly name to identify the DB Instance. | |
maximum | double precision | The maximum metric value for the data point. | |
metric_name | text | The name of the metric. | |
minimum | double precision | The minimum metric value for the data point. | |
namespace | text | The metric namespace. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
region | text | The AWS Region in which the resource is located. | |
sample_count | double precision | The number of metric values that contributed to the aggregate value of this data point. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
sum | double precision | The sum of the metric values for the data point. | |
timestamp | timestamp with time zone | The time stamp used for the data point. | |
unit | text | The standard unit for the data point. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_rds_db_instance_metric_cpu_utilization_hourly