Alibaba Cloud EBS Disk Monitoring and Metric Analysis
This skill enables you to query and analyze monitoring metrics for Alibaba Cloud Elastic Block Storage (EBS) disks. It supports querying single or multiple disks, performing time-series aggregation, and cross-disk metric analysis.
Scenario Description
Monitor and analyze cloud disk performance metrics to:
Track disk IOPS (read/write operations per second)
Monitor disk bandwidth (BPS - bytes per second)
Analyze disk performance trends over time
Compare performance across multiple disks
Aggregate metrics by disk type, instance, or availability zone
Identify performance bottlenecks and optimization opportunities
disk_bps_percent - Disk bandwidth utilization percentage
disk_iops_percent - Disk IOPS utilization percentage
disk_read_block_size - Average read block size
disk_read_bps - Read bandwidth (bytes per second)
disk_read_iops - Read IOPS
disk_write_block_size - Average write block size
disk_write_bps - Write bandwidth (bytes per second)
disk_write_iops - Write IOPS
Aggregation Capabilities:
Time Dimension: SUM, COUNT, AVG, MAX, MIN over time periods
Cross-Disk Dimension: Aggregate metrics across multiple disks by SUM, AVG, COUNT, MAX, MIN
Grouping: Group by DiskId, DeviceType, DeviceCategory, EcsInstanceId, or Availability Zone
Installation
Pre-check: Aliyun CLI >= 3.3.3 required
Run aliyun version to verify >= 3.3.3. If not installed or version too low,
run curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash to install/update,
or see references/cli-installation-guide.md for installation instructions.
Pre-check: Aliyun CLI plugin update required
[MUST] run aliyun configure set --auto-plugin-install true to enable automatic plugin installation.
[MUST] run aliyun plugin update to ensure that any existing plugins are always up-to-date.
Authentication
Pre-check: Alibaba Cloud Credentials Required
Security Rules:
NEVER read, echo, or print AK/SK values (e.g., echo $ALIBABA_CLOUD_ACCESS_KEY_ID is FORBIDDEN)
NEVER ask the user to input AK/SK directly in the conversation or command line
NEVER use aliyun configure set with literal credential values
ONLY use aliyun configure list to check credential status
bash
aliyun configure list
Check the output for a valid profile (AK, STS, or OAuth identity).
Configure credentials outside of this session (via aliyun configure in terminal or environment variables in shell profile)
Return and re-run after aliyun configure list shows a valid profile
RAM Policy
This skill requires the following Alibaba Cloud RAM permissions. See references/ram-policies.md for the complete permission policy.
Required API Permissions:
ebs:DescribeMetricData - Query disk monitoring metrics
[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
Read references/ram-policies.md to get the full list of permissions required by this SKILL
Use ram-permission-diagnose skill to guide the user through requesting the necessary permissions
Pause and wait until the user confirms that the required permissions have been granted
Parameter Confirmation
IMPORTANT: Parameter Confirmation — Before executing any command or API call,
ALL user-customizable parameters (e.g., RegionId, DiskId, MetricName, time ranges,
aggregation methods, etc.) MUST be confirmed with the user. Do NOT assume or use
default values without explicit user approval.
Required and Optional Parameters
Parameter Name
Required/Optional
Description
Default Value
--metric-name
Required
Metric to query (e.g., disk_read_iops, disk_write_bps)
N/A
--biz-region-id
Required
Region ID (e.g., cn-hangzhou, cn-shanghai)
N/A
--start-time
Optional
Query start time in ISO 8601 format (yyyy-MM-ddTHH:mm:ssZ)
Last period if both start/end empty
--end-time
Optional
Query end time in ISO 8601 format (yyyy-MM-ddTHH:mm:ssZ)
Current time
--period
Optional
Data granularity in seconds (5, 10, 60, 300, 600, 3600)
5
--dimensions
Optional
JSON filter for DiskId, DeviceType, DeviceCategory, EcsInstanceId, Azone
Empty (all disks)
--aggre-ops
Optional
Time aggregation method (AVG_OVER_TIME, SUM_OVER_TIME, MAX_OVER_TIME, etc.)
Group by labels (DiskId, DeviceType, DeviceCategory, EcsInstanceId, Azone)
No grouping
Core Workflow
At the start of the Core Workflow (before any CLI invocation):
[MUST] Enable AI-Mode — AI-mode is required for Agent Skill execution.
Run the following commands before any CLI invocation:
[MUST] Disable AI-Mode at EVERY exit point — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed.
AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.
bash
aliyun configure ai-mode disable
Success Verification Method
After querying metrics, verify:
Response Status: Check that RequestId is present (indicates successful API call)
Data Presence: Verify DataList contains expected entries
Time Range: Confirm Datapoints timestamps match the requested time range
Metric Values: Validate metric values are within expected ranges (e.g., percentages 0-100)
No Warnings: Check that Warnings array is empty or review any warnings
For detailed verification steps, see references/verification-method.md.
Cleanup
This skill only queries monitoring data and does not create any resources. No cleanup is required.
Best Practices
Choose Appropriate Period: Use smaller periods (5s, 10s) for short-term analysis, larger periods (300s, 3600s) for long-term trends
Time Range Limits: Respect period-specific time range limits (e.g., 5s period supports max 12 hours)
Use Filters Wisely: Apply dimensions filters to reduce data volume and improve query performance
Aggregation Selection: Choose aggregation methods based on analysis goals (AVG for trends, MAX for peak detection, SUM for totals)
Group by Relevant Dimensions: Group by DeviceCategory to compare disk types, by Azone for regional analysis
Handle Warnings: Review the Warnings array if present - it may indicate incomplete data
Time Zone Awareness: All timestamps use UTC+0 (ISO 8601 format)
Batch Queries: For multiple disks, use array filters in dimensions instead of multiple API calls
Result Parsing: Parse JSON Datapoints field to extract timestamp-value pairs programmatically
Monitor Quota: Be aware of API rate limits when querying large time ranges or many disks