Table: aws_rds_db_instance_metric_write_iops_hourly - Query AWS RDS DBInstance Metrics using SQL
The AWS RDS DBInstance Metrics is a feature of Amazon RDS that provides metrics data for a DB instance. It allows you to monitor and manage the performance of the DB instance by providing data in a readable, user-friendly format. It includes metrics such as Write IOPS, which represents the average number of disk I/O operations per second.
Table Usage Guide
The aws_rds_db_instance_metric_write_iops_hourly
table in Steampipe provides you with information about the Input/Output operations per second (IOPS) for write operations on an AWS RDS DBInstance, aggregated on an hourly basis. You can use this table to query DBInstance-specific details, including the number of write IOPS, the timestamp of the data point, and the statistical value. This table allows you, as a DevOps engineer, database administrator, or other technical professional, to gather insights on the write performance of your DBInstances. You can identify periods of high write activity, monitor the impact of performance tuning measures, and more. The schema outlines the various attributes of the DBInstance metric for you, including the DBInstance identifier, the period, the unit, and the timestamp.
The aws_rds_db_instance_metric_write_iops_hourly
table provides you with metric statistics at 1 hour intervals for the most recent 60 days.
Examples
Basic info
Explore the performance of your AWS RDS instances by tracking hourly write operations. This allows for proactive management and optimization of database performance.
select db_instance_identifier, timestamp, minimum, maximum, average, sum, sample_countfrom aws_rds_db_instance_metric_write_iops_hourlyorder by db_instance_identifier, timestamp;
select db_instance_identifier, timestamp, minimum, maximum, average, sum, sample_countfrom aws_rds_db_instance_metric_write_iops_hourlyorder by db_instance_identifier, timestamp;
Intervals where volumes exceed 1000 average write ops
Identify instances where the average write operations per hour exceed 1000 in your AWS RDS database instances. This can help in detecting high usage periods and planning for capacity upgrades.
select db_instance_identifier, timestamp, minimum, maximum, average, sum, sample_countfrom aws_rds_db_instance_metric_write_iops_hourlywhere average > 1000order by db_instance_identifier, timestamp;
select db_instance_identifier, timestamp, minimum, maximum, average, sum, sample_countfrom aws_rds_db_instance_metric_write_iops_hourlywhere average > 1000order by db_instance_identifier, timestamp;
Intervals where volumes exceed 8000 max write ops
Identify instances where database write operations exceed a specified threshold. This is useful for monitoring system performance and identifying potential bottlenecks or periods of heavy load.
select db_instance_identifier, timestamp, minimum, maximum, average, sum, sample_countfrom aws_rds_db_instance_metric_write_iops_hourlywhere maximum > 8000order by db_instance_identifier, timestamp;
select db_instance_identifier, timestamp, minimum, maximum, average, sum, sample_countfrom aws_rds_db_instance_metric_write_iops_hourlywhere maximum > 8000order by db_instance_identifier, timestamp;
Intervals where volume average iops exceeds provisioned iops
Identify instances where the average input/output operations per second (IOPS) exceeds the provisioned IOPS. This helps in monitoring the performance and ensuring the efficient use of resources in your database environment.
select r.db_instance_identifier, r.timestamp, v.iops as provisioned_iops, round(r.average) + round(w.average) as iops_avg, round(r.average) as read_ops_avg, round(w.average) as write_ops_avgfrom aws_rds_db_instance_metric_read_iops_hourly as r, aws_rds_db_instance_metric_write_iops_hourly as w, aws_rds_db_instance as vwhere r.db_instance_identifier = w.db_instance_identifier and r.timestamp = w.timestamp and v.db_instance_identifier = r.db_instance_identifier and r.average + w.average > v.iopsorder by r.db_instance_identifier, r.timestamp;
select r.db_instance_identifier, r.timestamp, v.iops as provisioned_iops, round(r.average) + round(w.average) as iops_avg, round(r.average) as read_ops_avg, round(w.average) as write_ops_avgfrom aws_rds_db_instance_metric_read_iops_hourly as r join aws_rds_db_instance_metric_write_iops_hourly as w on r.db_instance_identifier = w.db_instance_identifier and r.timestamp = w.timestamp join aws_rds_db_instance as v on v.db_instance_identifier = r.db_instance_identifierwhere r.average + w.average > v.iopsorder by r.db_instance_identifier, r.timestamp;
Read, Write, and Total IOPS
This query enables you to monitor the performance of your AWS RDS instances by providing insights into the average, maximum, and minimum Input/Output operations per second (IOPS). By analyzing these metrics, you can optimize your database performance, identify potential bottlenecks, and make informed decisions about capacity planning.
select r.db_instance_identifier, r.timestamp, round(r.average) + round(w.average) as iops_avg, round(r.average) as read_ops_avg, round(w.average) as write_ops_avg, round(r.maximum) + round(w.maximum) as iops_max, round(r.maximum) as read_ops_max, round(w.maximum) as write_ops_max, round(r.minimum) + round(w.minimum) as iops_min, round(r.minimum) as read_ops_min, round(w.minimum) as write_ops_minfrom aws_rds_db_instance_metric_read_iops_hourly as r, aws_rds_db_instance_metric_write_iops_hourly as wwhere r.db_instance_identifier = w.db_instance_identifier and r.timestamp = w.timestamporder by r.db_instance_identifier, r.timestamp;
select r.db_instance_identifier, r.timestamp, round(r.average) + round(w.average) as iops_avg, round(r.average) as read_ops_avg, round(w.average) as write_ops_avg, round(r.maximum) + round(w.maximum) as iops_max, round(r.maximum) as read_ops_max, round(w.maximum) as write_ops_max, round(r.minimum) + round(w.minimum) as iops_min, round(r.minimum) as read_ops_min, round(w.minimum) as write_ops_minfrom aws_rds_db_instance_metric_read_iops_hourly as r, aws_rds_db_instance_metric_write_iops_hourly as wwhere r.db_instance_identifier = w.db_instance_identifier and r.timestamp = w.timestamporder by r.db_instance_identifier, r.timestamp;
Schema for aws_rds_db_instance_metric_write_iops_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_write_iops_hourly