steampipe plugin install aws

Table: aws_rds_db_instance_metric_cpu_utilization - Query Amazon RDS DBInstanceCPUUtilization using SQL

The Amazon RDS DBInstanceCPUUtilization is a resource that provides metrics about the percentage of CPU utilization for an Amazon RDS instance. This metric allows you to monitor the compute load on your DB instance. By using SQL queries, you can retrieve and analyze these metrics to optimize the performance and resource usage of your Amazon RDS instances.

Table Usage Guide

The aws_rds_db_instance_metric_cpu_utilization table in Steampipe provides you with information about CPU utilization metrics for Amazon RDS DB instances. This table allows you, as a DevOps engineer, database administrator, or other technical professional, to query CPU utilization-specific details, including average, maximum, and minimum CPU utilization, along with associated timestamps. You can utilize this table to monitor and analyze the CPU usage of your RDS DB instances, helping you optimize resource usage, identify potential performance bottlenecks, and make informed scaling decisions. The schema outlines the various attributes of the CPU utilization metrics, including the DB instance identifier, period, unit, and statistical data.

The aws_rds_db_instance_metric_cpu_utilization table provides you with metric statistics at 5 minute intervals for the most recent 5 days.

Examples

Basic info

Explore the CPU utilization metrics of your AWS RDS database instances over time. This can help you understand usage patterns, identify potential performance issues, and plan for capacity management.

select
db_instance_identifier,
timestamp,
minimum,
maximum,
average,
sample_count
from
aws_rds_db_instance_metric_cpu_utilization
order by
db_instance_identifier,
timestamp;
select
db_instance_identifier,
timestamp,
minimum,
maximum,
average,
sample_count
from
aws_rds_db_instance_metric_cpu_utilization
order by
db_instance_identifier,
timestamp;

CPU Over 80% average

Identify instances where the average CPU utilization of an AWS RDS database instance exceeds 80%. This can aid in assessing the performance of your databases and pinpointing any potential areas of concern that may require optimization or resource scaling.

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_count
from
aws_rds_db_instance_metric_cpu_utilization
where
average > 80
order 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_count
from
aws_rds_db_instance_metric_cpu_utilization
where
average > 80
order by
db_instance_identifier,
timestamp;

Schema for aws_rds_db_instance_metric_cpu_utilization

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
averagedouble precisionThe average of the metric values that correspond to the data point.
db_instance_identifiertextThe friendly name to identify the DB Instance.
maximumdouble precisionThe maximum metric value for the data point.
metric_nametextThe name of the metric.
minimumdouble precisionThe minimum metric value for the data point.
namespacetextThe metric namespace.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
regiontextThe AWS Region in which the resource is located.
sample_countdouble precisionThe number of metric values that contributed to the aggregate value of this data point.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
sumdouble precisionThe sum of the metric values for the data point.
timestamptimestamp with time zoneThe time stamp used for the data point.
unittextThe 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