huaweicloud/huaweicloud-skills/huawei-cloud-cce-metric-analyzer

Claude Code and agent skill by huaweicloud/huaweicloud-skills

Trust tier 3
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Huawei Cloud CCE Metric analysis skill using the Python dispatcher with hcloud-backed cloud service queries. Use this skill when the user wants to: (1) query Pod/Node/CoreDNS/nginx-ingress/autoscaler/control-plane CPU, memory, disk, QPS, latency, request, connection, certificate, scaling, or error-rate metrics, (2) get resource usage TopN rankings, (3) query ECS/ELB/EIP/NAT cloud resource metrics, (4) aggregate cluster monitoring data with anomaly detection, (5) detect threshold-based resource anomalies. Trigger: user mentions "metric analysis", "指标分析", "CCE metrics", "CCE 指标", "AOM metrics", "AOM 指标", "CoreDNS metrics", "CoreDNS 指标", "nginx ingress metrics", "nginx-ingress 指标", "autoscaler metrics", "autoscaler 指标", "HPA metrics", "HPA 指标", "apiserver metrics", "etcd metrics", "controller manager metrics", "scheduler metrics", "control plane metrics", "控制面指标", "certificate expiration", "证书过期", "resource metrics", "资源指标", "CPU usage", "CPU 使用率", "memory usage", "内存使用率", "performance monitoring", "性能监控", "TopN", "resource ranking", "资源排名"

Install

npx vskill@latest install huaweicloud/huaweicloud-skills/huawei-cloud-cce-metric-analyzer

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as huaweicloud/huaweicloud-skills/huawei-cloud-cce-metric-analyzer.

Huawei Cloud CCE Metric Analyzer

Overview

Query and analyze metrics for CCE clusters (Pod/Node CPU/memory/disk) and cloud resources (ECS, ELB, EIP, NAT). Supports threshold-based anomaly detection, status classification (critical/warning/normal), and full-cluster monitoring aggregation.

Architecture: python3 scripts/huawei-cloud.py dispatcher → hcloud (KooCLI) cloud service queries + signed AOM Prometheus HTTP queries + limited kubectl reads only when Kubernetes resource relationships are required → Pod/Node metrics, ECS/ELB/EIP/NAT metrics → Threshold classification → Anomaly detection

Execution method: Cloud service queries are executed through the local hcloud CLI. AOM Prometheus query_range calls are the only exception and use signed HTTPS requests because the required Prometheus range-query path is not compatible with hcloud. Do not call Huawei Cloud SDKs, curl IAM flows, openstack, or hand-written cloud APIs outside the bundled dispatcher.

Related Skills: use pod/node diagnosers, Kubernetes event analyzer, capacity/cost skills, or auto-remediation runner for follow-up diagnosis or explicitly requested remediation.

Capabilities:

  • Pod CPU/memory TopN ranking and single Pod time-series metrics
  • Node CPU/memory/disk TopN ranking and single Node time-series metrics
  • Node GPU and xGPU metrics, including GPU utilization, memory, temperature, power, schedule policy, xGPU allocation, usage, and health
  • CoreDNS QPS, error rate excluding NXDOMAIN, NXDOMAIN rate, P95 latency, replica count, and per-Pod CPU/memory metrics
  • nginx-ingress QPS, 4xx/5xx rate, success rate, P95 latency, active connections, per-Pod CPU/memory, and Ingress TLS certificate expiration status
  • Autoscaler unschedulable Pods, node state count, scale-up/down events, errors, node groups, HPA current/desired replicas, and per-Pod CPU/memory metrics
  • Kubernetes control-plane metrics for apiserver, etcd, controller-manager, and scheduler
  • ECS instance CPU/memory/disk/network metrics
  • ELB connection, bandwidth, QPS metrics
  • EIP bandwidth, traffic, packet loss metrics
  • NAT Gateway SNAT connection metrics
  • Full-cluster monitoring aggregation with anomaly detection (80% threshold)
  • Threshold-based status classification (critical/warning/normal/unknown)

Typical Use Cases: query Pod/Node TopN, GPU/xGPU, CoreDNS, nginx-ingress, autoscaler, control-plane, ECS/ELB/EIP/NAT metrics, full-cluster aggregation, and threshold-based anomaly detection.

Prerequisites

1. Runtime Dependencies
  • Python 3.8+ for the dispatcher and result processing
  • hcloud (KooCLI) 7.2.2+ for CCE/ECS/ELB/VPC/EIP/NAT/CES/IAM cloud service queries
  • kubectl only for Kubernetes resource reads that cannot be derived from AOM/hcloud, such as Pod label_selector filtering, Ingress TLS certificate checks, and LoadBalancer Service discovery for ELB/EIP association; clusters without external EIP require the kubectl cce plugin from kubectl-cce-plugin/README.md
  • Prometheus-related monitoring data is queried from AOM Prometheus with signed HTTPS requests; the cluster must have the Prometheus add-on integrated with AOM, otherwise these tools may return empty metric series
  • Controller-manager, scheduler, and etcd metrics require the kube-controller-manager, kube-scheduler, and etcd-server ServiceMonitors to be enabled separately in AOM; otherwise these tools may return empty metric series
  • Autoscaler, ingress-controller, and NVIDIA GPU metrics require the corresponding autoscaler, ingress-controller, and nvidia-gpu-device-plugin PodMonitors to be enabled separately in AOM; ingress request metrics also require nginx_ingress_controller_requests to be explicitly allowed in the ingress-controller PodMonitor
  • Run environment check before first use (see Verification section)
  • Install and use kubectl-cce according to references/kubectl-cce.md
2. Credential Configuration
  • Valid Huawei Cloud credentials via hcloud profile or AK/SK mode
  • Security Rules:
  • 🚫 Never expose AK/SK values in code, conversation, or commands
  • 🚫 Never use echo $HUAWEI_AK or echo $HUAWEI_SK to check credentials
  • ✅ Credential priority for hcloud calls is: explicit tool parameters > local hcloud profile > environment variables
  • ✅ AOM Prometheus signed HTTP and Kubernetes certificate setup cannot use encrypted hcloud profile material, so they use explicit tool parameters first and environment variables as the signing fallback
  • ✅ Prefer IAM users over root account for cloud operations
  • ✅ Enable MFA for sensitive operations

Configuration Method:

bash
hcloud configure list
export HUAWEI_AK=<your-ak>
export HUAWEI_SK=<your-sk>
export HUAWEI_REGION=cn-north-4
3. IAM Permission Requirements
API ActionPermissionPurpose
cce:cluster:getGet clusterView CCE cluster details
aom:instance:listList AOM instancesDiscover AOM Prometheus instance for metrics
aom:metricsData:getGet metrics dataQuery Pod/Node CPU/memory/disk metrics
ces:metricsData:getGet CES metricsQuery ECS/ELB/EIP/NAT cloud resource metrics
ecs:cloudServers:listList ECS serversCorrelate ECS instance IDs
elb:loadbalancers:listList ELB instancesCorrelate ELB IDs
vpc:eips:listList EIPsCorrelate EIP IDs
nat:natGateways:listList NAT GatewaysCorrelate NAT Gateway IDs

Permission Failure Handling:

  1. When any command fails due to IAM permission errors, display the required permission list
  2. Guide the user to create a custom policy in the IAM console and grant authorization
  3. Pause execution and wait for user confirmation that permissions have been granted

Core Commands

All commands use the Python dispatcher script: python3 scripts/huawei-cloud.py <action> <key=value>...

KooCLI命令格式标准

Do not ask users to run raw hcloud commands directly. Use the dispatcher format:

bash
python3 scripts/huawei-cloud.py <tool-name> key=value key=value

The dispatcher converts cloud service queries to KooCLI calls. AOM Prometheus range queries use signed HTTPS requests because that path is not compatible with hcloud. Avoid Kubernetes resource reads unless the tool explicitly needs Pod labels, Ingress TLS Secrets, or LoadBalancer Services. Quote values containing spaces, >, <, |, JSON, or PromQL; never print or persist AK/SK, security tokens, kubeconfig files, or temporary payloads; keep Kubernetes/AOM PromQL scoped with cluster="<cluster_id>".

1. CCE Pod Metrics
bash
# Pod TopN — cluster-wide CPU/memory ranking
python3 scripts/huawei-cloud.py huawei_get_cce_pod_metrics_topN \
region=cn-north-4 cluster_id=<cluster-id> \
namespace=default top_n=10 hours=1
# Pod TopN with label selector
python3 scripts/huawei-cloud.py huawei_get_cce_pod_metrics_topN \
region=cn-north-4 cluster_id=<cluster-id> \
namespace=default label_selector="app=nginx,version=v1" top_n=10 hours=1
# Single Pod time-series
python3 scripts/huawei-cloud.py huawei_get_cce_pod_metrics \
region=cn-north-4 cluster_id=<cluster-id> \
pod_name=my-app-xxx namespace=default hours=1
# Single Pod GPU and xGPU metrics
python3 scripts/huawei-cloud.py huawei_get_cce_pod_gpu_metrics \
region=cn-north-4 cluster_id=<cluster-id> \
pod_name=my-gpu-app-xxx namespace=default hours=1
2. CCE Node Metrics
bash
# Node TopN — cluster-wide CPU/memory/disk ranking
python3 scripts/huawei-cloud.py huawei_get_cce_node_metrics_topN \
region=cn-north-4 cluster_id=<cluster-id> \
top_n=10 hours=1
# Single Node time-series
python3 scripts/huawei-cloud.py huawei_get_cce_node_metrics \
region=cn-north-4 cluster_id=<cluster-id> \
node_ip=10.0.0.1 hours=1
# Node GPU and xGPU metrics
python3 scripts/huawei-cloud.py huawei_get_cce_node_gpu_metrics \
region=cn-north-4 cluster_id=<cluster-id> \
node_ip=10.0.0.1 hours=1
3. CCE CoreDNS Metrics
bash
# CoreDNS key metrics: QPS, error rate excluding NXDOMAIN, NXDOMAIN rate, P95 latency, replicas, CPU, and memory
python3 scripts/huawei-cloud.py huawei_get_cce_coredns_metrics \
region=cn-north-4 cluster_id=<cluster-id> \
namespace=kube-system pod_regex=".*coredns.*" hours=1
4. CCE nginx-ingress Metrics
bash
# nginx-ingress request processing and Ingress TLS certificate expiration
python3 scripts/huawei-cloud.py huawei_get_cce_nginx_ingress_metrics \
region=cn-north-4 cluster_id=<cluster-id> \
namespace=kube-system pod_regex=".*nginx.*ingress.*|.*ingress.*nginx.*" \
ingress_namespace=default cert_expire_warning_days=30 hours=1
5. CCE Autoscaler Metrics
bash
# Cluster Autoscaler and HPA metrics
python3 scripts/huawei-cloud.py huawei_get_cce_autoscaler_metrics \
region=cn-north-4 cluster_id=<cluster-id> \
namespace=kube-system pod_regex=".*cluster.*autoscaler.*|.*autoscaler.*" \
include_hpa=true hours=1
6. Kubernetes Control Plane Metrics
bash
python3 scripts/huawei-cloud.py huawei_get_cce_apiserver_metrics \
region=cn-north-4 cluster_id=<cluster-id> hours=1
python3 scripts/huawei-cloud.py huawei_get_cce_etcd_metrics \
region=cn-north-4 cluster_id=<cluster-id> hours=1
python3 scripts/huawei-cloud.py huawei_get_cce_controller_manager_metrics \
region=cn-north-4 cluster_id=<cluster-id> namespace=kube-system hours=1
python3 scripts/huawei-cloud.py huawei_get_cce_scheduler_metrics \
region=cn-north-4 cluster_id=<cluster-id> namespace=kube-system hours=1
7. Cloud Resource Metrics
bash
# ECS instance metrics
python3 scripts/huawei-cloud.py huawei_get_ecs_metrics \
region=cn-north-4 instance_id=<instance-id>
# ELB metrics
python3 scripts/huawei-cloud.py huawei_get_elb_metrics \
region=cn-north-4 elb_id=<loadbalancer-id> hours=1
# EIP metrics
python3 scripts/huawei-cloud.py huawei_get_eip_metrics \
region=cn-north-4 eip_id=<eip-id> hours=1
# NAT Gateway metrics
python3 scripts/huawei-cloud.py huawei_get_nat_gateway_metrics \
region=cn-north-4 nat_gateway_id=<nat-gateway-id> hours=1
8. Cluster Monitoring Aggregation
bash
# Aggregate all monitoring data with anomaly detection
python3 scripts/huawei-cloud.py huawei_cce_cluster_monitoring_aggregation \
region=cn-north-4 cluster_id=<cluster-id> \
start_time="2026-05-30 00:00:00" end_time="2026-05-30 23:59:59" \
namespace=default top_n=10

This tool aggregates: Pod TopN CPU/memory, Node TopN CPU/memory/disk, ELB metrics (matched through LoadBalancer Services fetched by kubectl), NAT Gateway metrics, EIP metrics (bandwidth, packet loss), and anomaly detection using 80% threshold.

It also includes CoreDNS, nginx-ingress, and autoscaler summaries. Cloud resources are scoped to the current cluster when an association can be proven: ELB is matched through LoadBalancer Service IP/EIP, NAT Gateway is filtered by the cluster VPC, and EIP is limited to associated ELB/NAT/Service IPs.

LoadBalancer Service discovery uses kubectl with generated kubeconfig through the cluster EIP when external access is available. If the cluster has no EIP, it uses the kubectl cce plugin. If neither path works, aggregation fails.

Risk Levels

This skill is read-only. It does not create, update, delete, restart, scale, or modify Huawei Cloud or Kubernetes resources.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cce-metric-analyzer/badge)](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cce-metric-analyzer)

Something wrong with this skill or its page? Tell us.