Table: aws_redshift_cluster_metric_cpu_utilization_daily - Query AWS Redshift Cluster Metrics using SQL
The AWS Redshift Cluster is a fully managed, petabyte-scale data warehouse service in the cloud. It allows you to analyze all your data using your existing business intelligence tools. The CPU Utilization metric provides the percentage of CPU utilization for the Amazon Redshift cluster.
Table Usage Guide
The aws_redshift_cluster_metric_cpu_utilization_daily
table in Steampipe gives you information about the CPU utilization metrics for AWS Redshift clusters, calculated on a daily basis. This table allows you, as a data engineer or administrator, to query CPU usage details, including maximum, minimum, average, and sample count values. You can utilize this table to gather insights on cluster performance, such as identifying clusters with high CPU usage, tracking CPU usage trends over time, and optimizing cluster configurations for better performance. The schema outlines the various attributes of the CPU utilization metrics, including the cluster identifier, region, timestamp, and the aforementioned statistical values.
The aws_redshift_cluster_metric_cpu_utilization_daily
table provides you with metric statistics at 24-hour intervals for the last year.
Examples
Basic info
Analyze the daily CPU utilization patterns of your AWS Redshift clusters to understand their performance and resource usage trends. This information can help optimize resource allocation and improve overall system efficiency.
select cluster_identifier, timestamp, minimum, maximum, average, sample_countfrom aws_redshift_cluster_metric_cpu_utilization_dailyorder by cluster_identifier, timestamp;
select cluster_identifier, timestamp, minimum, maximum, average, sample_countfrom aws_redshift_cluster_metric_cpu_utilization_dailyorder by cluster_identifier, timestamp;
CPU Over 80% average
Determine the areas in which your AWS Redshift clusters are experiencing high CPU utilization, specifically where the average daily usage exceeds 80%. This can help in identifying potential performance issues and planning for capacity upgrades.
select cluster_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_redshift_cluster_metric_cpu_utilization_dailywhere average > 80order by cluster_identifier, timestamp;
select cluster_identifier, timestamp, round(minimum, 2) as min_cpu, round(maximum, 2) as max_cpu, round(average, 2) as avg_cpu, sample_countfrom aws_redshift_cluster_metric_cpu_utilization_dailywhere average > 80order by cluster_identifier, timestamp;
CPU daily average < 2%
This example helps to identify instances where the average daily CPU utilization is less than 2% in your AWS Redshift clusters. This can be useful to pinpoint underutilized resources, potentially leading to cost savings by downsizing or eliminating these clusters.
select cluster_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_redshift_cluster_metric_cpu_utilization_dailywhere average < 2order by cluster_identifier, timestamp;
select cluster_identifier, timestamp, round(minimum, 2) as min_cpu, round(maximum, 2) as max_cpu, round(average, 2) as avg_cpu, sample_countfrom aws_redshift_cluster_metric_cpu_utilization_dailywhere average < 2order by cluster_identifier, timestamp;
Schema for aws_redshift_cluster_metric_cpu_utilization_daily
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. | |
cluster_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_redshift_cluster_metric_cpu_utilization_daily