turbot/alicloud
steampipe plugin install alicloud

Table: alicloud_ecs_instance_metric_cpu_utilization_hourly - Query Alibaba Cloud ECS Instance Metrics using SQL

Alibaba Cloud Elastic Compute Service (ECS) provides scalable, on-demand computing resources for secure, flexible, and efficient applications. ECS Instance Metrics are part of the monitoring service of Alibaba Cloud ECS, which collects and analyzes the performance and operational status of your ECS instances. It helps you monitor the usage of your instances, allowing you to optimize resource allocation and troubleshoot system issues.

Table Usage Guide

The alicloud_ecs_instance_metric_cpu_utilization_hourly table provides insights into the hourly CPU utilization of ECS instances within Alibaba Cloud. As a system administrator or DevOps engineer, explore instance-specific details through this table, including CPU usage trends, peak usage times, and overall performance. Utilize it to uncover information about instances, such as those with high CPU usage, the correlation between usage and performance, and the need for resource optimization.

Examples

Basic info

Explore which instances have the highest average CPU utilization over time, allowing you to identify potential areas for performance optimization and resource management.

select
instance_id,
timestamp,
minimum,
maximum,
average
from
alicloud_ecs_instance_metric_cpu_utilization_hourly
order by
instance_id,
timestamp;
select
instance_id,
timestamp,
minimum,
maximum,
average
from
alicloud_ecs_instance_metric_cpu_utilization_hourly
order by
instance_id,
timestamp;

CPU Over 80% average

Determine the areas in which the average CPU utilization exceeds 80% for hourly intervals. This query is useful for identifying potential performance issues or bottlenecks in your system.

select
instance_id,
timestamp,
round(minimum :: numeric, 2) as min_cpu,
round(maximum :: numeric, 2) as max_cpu,
round(average :: numeric, 2) as avg_cpu
from
alicloud_ecs_instance_metric_cpu_utilization_hourly
where
average > 80
order by
instance_id,
timestamp;
select
instance_id,
timestamp,
round(minimum, 2) as min_cpu,
round(maximum, 2) as max_cpu,
round(average, 2) as avg_cpu
from
alicloud_ecs_instance_metric_cpu_utilization_hourly
where
average > 80
order by
instance_id,
timestamp;

Schema for alicloud_ecs_instance_metric_cpu_utilization_hourly

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The Alicloud Account ID in which the resource is located.
averagedouble precisionThe average of the metric values that correspond to the data point.
instance_idtextThe ID of the 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.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
timestamptimestamp with time zoneThe timestamp used 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)" -- alicloud

You can pass the configuration to the command with the --config argument:

steampipe_export_alicloud --config '<your_config>' alicloud_ecs_instance_metric_cpu_utilization_hourly