steampipe plugin install aws

Table: aws_rds_db_instance_metric_connections_daily - Query AWS RDS DB Instance Metrics using SQL

The AWS RDS DB Instance is a relational database service that provides cost-efficient and resizable capacity while managing time-consuming database administration tasks. It provides a set of metrics, such as the "Connections" metric, to help you monitor the performance of the DB instances. The "Connections" metric, specifically, measures the number of database connections made to an RDS instance on a daily basis, aiding in understanding usage patterns and potential performance issues.

Table Usage Guide

The aws_rds_db_instance_metric_connections_daily table in Steampipe provides you with information about AWS RDS DB instance metrics, specifically focusing on the daily database connections. This table allows you, as a DevOps engineer, database administrator, or other technical professional, to query these metrics, enabling you to monitor and manage the number of connections to your database instances. This is critical for your optimization of resource utilization, management of performance, and troubleshooting of issues. The schema outlines various attributes of the daily DB instance connections metric, including the DB instance identifier, timestamp, sum of connections, minimum, maximum, and sample count.

The aws_rds_db_instance_metric_connections_daily table provides you with metric statistics at 24 hour intervals for the past year.

Examples

Basic info

Analyze the daily connection metrics of your AWS RDS database instances to understand their usage patterns and performance. This can help in identifying bottlenecks, planning capacity, and optimizing resource utilization.

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

Intervals averaging over 100 connections

Determine the areas in which your AWS RDS database instances have an average of over 100 daily connections. This can help in understanding the load on your databases and potentially optimize them for better performance.

select
db_instance_identifier,
timestamp,
minimum,
maximum,
average,
sample_count
from
aws_rds_db_instance_metric_connections_daily
where
average > 100
order by
db_instance_identifier,
timestamp;
select
db_instance_identifier,
timestamp,
minimum,
maximum,
average,
sample_count
from
aws_rds_db_instance_metric_connections_daily
where
average > 100
order by
db_instance_identifier,
timestamp;

Instances with no connections in the past week

Determine the areas in which your database instances have not had any connections in the past week. This can help you identify unused or idle instances, potentially saving on unnecessary costs.

select
db_instance_identifier,
sum(maximum) as total_connections
from
aws_rds_db_instance_metric_connections
where
timestamp > (current_date - interval '7' day)
group by
db_instance_identifier
having
sum(maximum) = 0;
select
db_instance_identifier,
sum(maximum) as total_connections
from
aws_rds_db_instance_metric_connections
where
timestamp > (date('now', '-7 day'))
group by
db_instance_identifier
having
sum(maximum) = 0;

Schema for aws_rds_db_instance_metric_connections_daily

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_connections_daily