Install
openclaw skills install huawei-cloud-ces-ecs-monitoringHuawei Cloud ECS monitoring skill using Cloud Eye Service (CES). Provides comprehensive monitoring and metrics query for Elastic Cloud Server instances including CPU, memory, disk, network, and system metrics. Supports real-time monitoring, historical data query, and common metric analysis. Use when users need to monitor ECS instance performance, check resource utilization, analyze trends, or troubleshoot performance issues. Triggers: "Huawei Cloud ECS monitoring", "ECS metrics", "Cloud Eye Service", "CES", "monitor ECS", "CPU usage", "memory usage", "disk IO", "network traffic", "instance performance", "monitoring data", "华为云ECS监控", "云监控", "CES监控", "ECS指标", "CPU使用率", "内存使用率", "磁盘IO", "网络流量"
openclaw skills install huawei-cloud-ces-ecs-monitoringYou are a professional Huawei Cloud monitoring assistant responsible for querying and analyzing ECS instance metrics using Cloud Eye Service (CES). Follow the structured workflow to provide comprehensive monitoring insights.
Huawei Cloud ECS monitoring skill uses Cloud Eye Service (CES) to provide comprehensive monitoring and metric query capabilities for Elastic Cloud Server instances. Supports real-time monitoring of CPU, memory, disk, network, and system metrics, historical data query, and common metric analysis.
User Request → Huawei Cloud CLI (hcloud) → Cloud Eye Service (CES) → ECS Instance
↓
IAM Permission Verification
↓
Monitoring Data Return
Before starting any operations, you must install and verify Huawei Cloud CLI (hcloud):
Verify Installation:
hcloud --version
If not installed, follow the detailed installation guide:
See references/cli-installation-guide.md for complete installation instructions for:
Configure Huawei Cloud credentials:
hcloud configure init
Follow the interactive prompts to set:
[MUST] At the start of the Core Workflow (before any CLI invocation):
hcloud configure list
Security Rules:
echo $HUAWEICLOUD_ACCESS_KEY is FORBIDDEN)hcloud configure list to check credential statusIf no valid configuration exists, STOP here:
hcloud configure init in terminal)hcloud configure list shows valid configurationThis skill requires the following minimum IAM permissions:
ecs:cloudServers:list - List ECS instancesecs:cloudServers:get - Get ECS instance detailsces:metrics:list - List available metricsces:metricData:get - Get metric dataAdditional optional permissions (e.g., ces:alarms:list, ces:alarmTemplates:list) and detailed policy configuration: references/iam-policies.md
When any operation encounters a permission error (e.g., "Access denied", "Insufficient permissions"), refer to references/iam-policies.md for the complete handling process, including required permission list, JSON policy templates, and IAM console configuration steps.
[MUST] Before executing any CLI command, read references/related-commands.md for command format standards.
Key Rules:
hcloud <service> <command> <parameters>--cli-region=<region-id>ecs serviceces service[MUST] Command Format - Every hcloud CLI command should follow Huawei Cloud CLI standards.
First, list all ECS instances in the current region to help users identify the target instance.
hcloud ECS NovaListServers --cli-region=<region-id> --limit=50
Based on user requirements, query relevant monitoring metrics. If no specific metrics are requested, show common metrics:
Common ECS Metrics (Default Display) - SYS.ECS Namespace:
cpu_util)mem_util)disk_read_bytes_rate, disk_write_bytes_rate)network_incoming_bytes_rate_inband, network_outgoing_bytes_rate_inband)disk_util_inband)Note: The above are SYS.ECS (base monitoring) metrics available without an agent. For OS-level monitoring (AGT.ECS namespace), which requires the Telescope agent, see
references/ces-metrics-reference.mdfor the complete metric list includingcpu_usage,mem_usedPercent,disk_usedPercent,load_average1, etc.
Other related metrics can be found in references/ces-metrics-reference.md.
Namespace Selection and Fallback Strategy:
When querying ECS metrics, follow this namespace selection logic:
cpu_util → cpu_usage). See references/ces-metrics-reference.md for the complete fallback mapping table.load_average1, net_tcp_total, disk_readTime, disk_inodesUsedPercent). Query these directly with --metrics.N.namespace="AGT.ECS" and --period=60.Common reasons for SYS.ECS metrics returning no data:
mem_util, disk_util_inband, network_*_inband)Command example - SYS.ECS query:
hcloud CES BatchListMetricData \
--metrics.1.namespace="SYS.ECS" \
--metrics.1.metric_name="cpu_util" \
--metrics.1.dimensions.1.name="instance_id" \
--metrics.1.dimensions.1.value="<instance-id>" \
--from=$(date -d '-1 hour' +%s)000 \
--to=$(date +%s)000 \
--period=300 \
--filter="average" \
--cli-region=<region-id>
Command example - AGT.ECS query (when SYS.ECS has no data, or for AGT.ECS-only metrics):
hcloud CES BatchListMetricData \
--metrics.1.namespace="AGT.ECS" \
--metrics.1.metric_name="cpu_usage" \
--metrics.1.dimensions.1.name="instance_id" \
--metrics.1.dimensions.1.value="<instance-id>" \
--from=$(date -d '-1 hour' +%s)000 \
--to=$(date +%s)000 \
--period=60 \
--filter="average" \
--cli-region=<region-id>
Other relevant commands are documented in references/related-commands.md.
Based on the monitoring data returned:
Present monitoring data in a clear, actionable format:
If users need to view or manage alarms:
# List alarms
hcloud CES ListAlarms --cli-region=<region-id>
# List alarm templates
hcloud CES ListAlarmTemplates --cli-region=<region-id>
refer to '../references/related-commands.md'
| Parameter | Description | Example Value | Default Value |
|---|---|---|---|
--cli-region | Region ID | cn-north-4 | None, must be specified |
--metrics.1.namespace | Namespace for metric 1 (SYS.ECS or AGT.ECS) | SYS.ECS | None, must be specified |
--metrics.1.metric_name | Metric name for metric 1 | cpu_util | None, must be specified |
--metrics.1.dimensions.1.name | Dimension name | instance_id | None, must be specified |
--metrics.1.dimensions.1.value | Dimension value | 3d65c1ac-9a9f-4c5f-a054-35184a087bb2 | None, must be specified |
| Parameter | Description | Example Value | Default Value |
|---|---|---|---|
--from | Start time (Unix timestamp in milliseconds) | $(date -d '-1 hour' +%s)000 | Current time - 1 hour |
--to | End time (Unix timestamp in milliseconds) | $(date +%s)000 | Current time |
--period | Statistics period (seconds) | 300 | 300 |
--filter | Statistical method | average | average |
--project-id | Project ID | project-id | Project ID from configuration file |
Note: period=60 (1-minute granularity) is only available for AGT.ECS metrics. SYS.ECS metrics have a minimum period of 300 (5 minutes).
For detailed namespace descriptions and metric availability, see references/ces-metrics-reference.md.
Value Range: Supports average, variance, min, max, sum
average: Average valuevariance: Variancemin: Minimum valuemax: Maximum valuesum: Sum value## ECS Monitoring Report
**Instance**: <instance-name> (<instance-id>)
**Region**: <region>
**Time Range**: <start-time> to <end-time>
### Key Metrics Summary
- CPU Utilization: XX.XX% (avg), XX.XX% (max), XX.XX% (min)
- Memory Utilization: XX.XX% (avg), XX.XX% (max), XX.XX% (min)
- Disk Read Rate: XX.XX MB/s (avg)
- Disk Write Rate: XX.XX MB/s (avg)
- Network Inbound: XX.XX Mbps (avg)
- Network Outbound: XX.XX Mbps (avg)
### Detailed Metrics
| Time | CPU Usage | Memory Usage | Disk Read | Disk Write | Network In | Network Out |
|------|-----------|--------------|-----------|------------|------------|-------------|
| ... | ... | ... | ... | ... | ... | ... |
### Recommendations
1. [If CPU > 80%] Consider scaling up instance type or optimizing application
2. [If Memory > 85%] Consider adding memory or optimizing memory usage
3. [If Disk > 90%] Consider expanding disk or cleaning up files
4. [Network bottlenecks] Consider optimizing network configuration
Skill verification and testing methods: references/verification-method.md
Please refer to references/best-practices.md for detailed best practices, including metric selection guidelines, alerting strategy, monitoring frequency recommendations, performance optimization, and cost optimization.
Refer to documents in the references/ directory for more information:
cli-installation-guide.md: Huawei Cloud CLI installation and configuration guideces-metrics-reference.md: Complete list of CES metrics for ECSiam-policies.md: Required IAM permissions and policiesbest-practices.md: Monitoring best practices and optimization tipstroubleshooting-guide.md: Common issues and solutionsverification-method.md: Skill verification and testing methodsacceptance-criteria.md: Quality standards and acceptance criteriarelated-commands.md: Related command referenceFor more security best practices (key rotation, IAM conditions, account separation), see references/iam-policies.md.
For specific limits (max data points, query frequency, batch limits), see references/ces-metrics-reference.md.
For common errors and detailed solutions, see references/troubleshooting-guide.md.