Loading...
Loading...
Comprehensive Alibaba Cloud ECS instance diagnostics skill. Performs systematic troubleshooting including cloud platform status checks and GuestOS internal diagnostics via Cloud Assistant. Use when users report server connectivity issues, SSH timeout, instance lag, website unavailability, disk full, CPU/memory alerts, system event notifications, or abnormal instance status. Triggers: "ECS", "instance", "server", "cannot connect", "SSH", "timeout", "slow", "disk full", "network", "CPU high", "memory high", "status check", "system event", "diagnose", "troubleshoot"
npx skill4agent add aliyun/alibabacloud-aiops-skills alibabacloud-ecs-diagnosePre-check: Aliyun CLI >= 3.3.1 required Runto verify >= 3.3.1. If not installed or version too low, seealiyun versionfor installation instructions. Then [MUST] runreferences/cli-installation-guide.mdto enable automatic plugin installation.aliyun configure set --auto-plugin-install true
Pre-check: Alibaba Cloud Credentials RequiredSecurity Rules:
- NEVER read, echo, or print AK/SK values (e.g.,
is FORBIDDEN)echo $ALIBABA_CLOUD_ACCESS_KEY_ID- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
with literal credential valuesaliyun configure set- ONLY use
to check credential statusaliyun configure listbashaliyun configure listCheck the output for a valid profile (AK, STS, or OAuth identity).If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session (via
in terminal or environment variables in shell profile)aliyun configure- Return and re-run after
shows a valid profilealiyun configure list
[MUST] Before executing any CLI command, readfor command format standards.references/related-commands.mdKey Rules:
- Use kebab-case command names:
(notrun-command)RunCommand- Region parameter varies by command type:
- Cloud Assistant commands:
--biz-region-id- All other commands:
--region-id- Instance ID format varies:
,--instance-id.1, or--instance-ids '["..."]'--instance-id- Always include
--user-agent AlibabaCloud-Agent-Skills
ecs:DescribeInstancesecs:DescribeInstanceAttributeecs:DescribeInstanceStatusecs:DescribeInstancesFullStatusecs:DescribeSecurityGroupAttributeecs:DescribeInstanceHistoryEventsvpc:DescribeVpcsvpc:DescribeEipAddressescms:DescribeMetricLastecs:RunCommandecs:DescribeInvocationResultsreferences/ram-policies.md[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
- Read
to get the full list of permissions required by this SKILLreferences/ram-policies.md- Use
skill to guide the user through requesting the necessary permissionsram-permission-diagnose- Pause and wait until the user confirms that the required permissions have been granted
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, instance IDs, IP addresses, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
| Parameter Name | Required/Optional | Description | Default Value |
|---|---|---|---|
| Required | ECS instance ID to diagnose | N/A |
| Required | Region where the instance is located | N/A |
| Optional | Instance name (alternative to InstanceId) | N/A |
| Optional | Private IP (alternative to InstanceId) | N/A |
| Optional | Public IP (alternative to InstanceId) | N/A |
IMPORTANT: Before starting diagnostics, identify the problem scenario and follow the appropriate diagnostic approach.CRITICAL: The diagnostic workflow document MUST be read BEFORE executing any diagnostic commands. This is not optional — skip this step will result in incorrect diagnosis.
| Problem Scenario | Trigger Keywords | Diagnostic Approach |
|---|---|---|
| Remote Connection Failure / Service Inaccessible | "cannot connect", "SSH timeout", "RDP failure", "connection refused", "port unreachable", "website inaccessible", "service unavailable", "HTTP/HTTPS not working", "workbench" | STEP 1: Read |
| Performance Issues | "slow", "lag", "high CPU", "high memory", "unresponsive" | STEP 1: Read |
| Disk Issues | "disk full", "cannot write", "storage exhausted" | STEP 1: Read |
| Instance Status Abnormal | "stopped", "locked", "expired", "system event" | STEP 1: Read |
================== ECS Diagnostic Report ==================
【Basic Information】Instance ID, Name, Status, OS, IPs, Time
【Basic Diagnostics】Instance Status, System Events, Security Group, Network, Metrics
【Deep Diagnostics】System Load, Disk, Network, Logs, Processes
【Issue Summary】List all discovered issues
【Recommendations】Specific remediation steps
【Risk Warnings】Security risks requiring attention
===========================================================references/verification-method.mdRunPowerShellScript| Document | Description |
|---|---|
| Related Commands | CLI command standards and all commands reference |
| RAM Policies | Required RAM permissions list |
| Verification Method | Success verification method for each step |
| CLI Installation Guide | Aliyun CLI installation instructions |
| Acceptance Criteria | Skill testing acceptance criteria |
| Remote Connection Diagnose Design | Specialized diagnostic design for remote connection and service access issues |
| Generic Diagnostics Workflow | Standard two-level diagnostic workflow for general ECS issues |