⚠️ Execution Method (Must Read): This skill executes actions via local Python scripts using the
scripts/huawei-cloud.pydispatcher. Using hcloud, kubectl, or other CLI tools or direct API calls is prohibited.
- All actions are dispatched through
scripts/huawei-cloud.pywith--action <action_name>and--params <json_params>- All scripts and environment check scripts are inside the skill package. You must use
skill action=execto execute them; do not run them directly in a shell- For action names and parameters, see the Core Tools section below
- Do not attempt hcloud, kubectl, curl IAM, or other CLI/API methods. This skill does not depend on these tools
- All paths are relative to the skill directory, which is the directory where this SKILL.md resides
This skill consolidates scattered fault signals into a structured, diagnosable context package. It first collects the time window, cluster, namespace, workload, Pod, node, and alarm scope, then gathers evidence by type (alarms, events, metrics, logs), merges signals along a timeline, and identifies gaps and the appropriate next diagnostic skill for hand-off. This skill is strictly read-only — it never executes remediation actions.
Architecture: python3 scripts/huawei-cloud.py dispatcher → Huawei Cloud Python SDK + AOM/LTS API → alarms, metrics, logs, events aggregation
Related Skills:
huawei-cloud-cce-pod-failure-diagnoser - Pod CrashLoopBackOff, ImagePullBackOff, OOMKilled diagnosishuawei-cloud-cce-node-failure-diagnoser - Node health, resource pressure, NPD events diagnosishuawei-cloud-cce-network-failure-diagnoser - Network connectivity, DNS, ELB diagnosishuawei-cloud-cce-storage-failure-diagnoser - PVC/PV mount, storage provisioning diagnosishuawei-cloud-cce-root-cause-analyzer - Cross-domain root cause analysis and reportshuawei-cloud-cce-auto-remediation-runner - Remediation actions (scale, drain, rollback, etc.)huawei-cloud-cce-alarm-correlation-engine - Alarm deduplication and correlationhuawei-cloud-cce-metric-analyzer - Deep metric trend analysishuawei-cloud-cce-log-analyzer - Deep log pattern analysisCapabilities:
huawei_list_aom_alarms, huawei_analyze_aom_alarms)huawei_get_cce_events)huawei_get_cce_pod_metrics_topN, huawei_get_cce_node_metrics_topN)huawei_query_aom_logs, huawei_get_recent_logs)huawei_get_pod_logs)huawei_get_aom_metrics, huawei_list_aom_instances)huawei_generate_monitor_dashboard)Typical Use Cases:
huaweicloudsdkcce, huaweicloudsdkcore, huaweicloudsdkaom, huaweicloudsdklts packagesValid Huawei Cloud credentials (AK/SK mode)
Security Rules:
echo $HUAWEI_AK or echo $HUAWEI_SK to check credentialsHUAWEI_AK, HUAWEI_SK, HUAWEI_REGIONConfiguration Method (Environment Variables Only):
bash
export HUAWEI_AK=<your-ak>
export HUAWEI_SK=<your-sk>
export HUAWEI_REGION=cn-north-4
Important Security Notes:
API ActionPermissionPurposecce:cluster:getGet clusterView CCE cluster detailscce:cluster:createCertCreate certificateObtain kubeconfig for kubectl accessaom:alarm:listList alarmsQuery AOM active/history alarmsaom:alarm:analyzeAnalyze alarmsDeduplicate and group alarmsaom:metricsData:getGet metrics dataQuery Pod/node CPU/memory metricsaom:instance:listList AOM instancesDiscover AOM Prom instanceaom:logData:getGet log dataQuery AOM/LTS log datalts:log:listList LTS logsQuery LTS log streamscce:event:listList eventsQuery Kubernetes Events
Permission Failure Handling:
All actions are dispatched through scripts/huawei-cloud.py using skill action=exec.
ActionRequired ParametersDescriptionhuawei_list_aom_alarmsregion, cluster_idCollect active + history AOM alarms for the clusterhuawei_analyze_aom_alarmsregion, cluster_idDeduplicate alarms and group by severity level
ActionRequired ParametersDescriptionhuawei_get_cce_eventsregion, cluster_idRetrieve Kubernetes Events grouped by object and reasonhuawei_get_cce_pod_metrics_topNregion, cluster_id, namespaceTopN Pod metrics (CPU/memory) for anomaly detectionhuawei_get_cce_node_metrics_topNregion, cluster_idTopN Node metrics for resource pressure detectionhuawei_get_aom_metricsregion, cluster_id, namespaceQuery AOM metrics for specific resourceshuawei_list_aom_instancesregionDiscover AOM Prom instance for metrics queries
ActionRequired ParametersDescriptionhuawei_query_aom_logsregion, cluster_id, namespaceQuery AOM structured log datahuawei_get_recent_logsregion, cluster_id, namespaceGet recent log entries (LTS)huawei_get_pod_logsregion, cluster_id, pod_name, namespaceFetch Pod container logs (previous or current)
ActionRequired ParametersDescriptionhuawei_generate_monitor_dashboardregion, cluster_idGenerate monitoring dashboard from collected data
ParameterRequiredDescriptionDefaultregionYesHuawei Cloud regionHUAWEI_REGION``cluster_idYesCCE cluster IDN/AnamespaceNoKubernetes namespaceN/AakOptionalOverride AKHUAWEI_AK``skOptionalOverride SKHUAWEI_SK``project_idOptionalProject IDAuto from IAM
ParameterRequiredDescriptionDefaultalarm_idNoSpecific alarm ID to queryN/Aalarm_levelNoAlarm severity filterAllhoursNoHistory lookback window (hours)1
ParameterRequiredDescriptionDefaultpod_nameYes*Pod name (for huawei_get_pod_logs)N/AcontainerNoContainer nameFirstpreviousNoFetch previous (crashed) logsfalse``tail_linesNoNumber of log tail lines100
ParameterRequiredDescriptionDefaulttop_nNoNumber of top results10hoursNoMetrics lookback window (hours)1
*Required for specific actions as noted.
region, cluster_id, namespace, workload, pod, node, and alarm_id provided by the userhuawei_list_aom_alarms to collect active + history alarms, then use huawei_analyze_aom_alarms for deduplication and severity groupinghuawei_get_cce_events to retrieve Kubernetes Events grouped by involved object and reasonhuawei_query_aom_logs, then supplement with Pod-side logs from huawei_get_recent_logs or huawei_get_pod_logsFor the complete evidence-gathering workflow, see references/workflow.md.
See references/output-schema.md for the complete JSON response structure.
Context Package Output:
json
{
"summary": "one paragraph context summary",
"scope": {
"region": "cn-north-4",
"cluster_id": "optional",
"namespace": "optional",
"workload": "optional",
"time_window": "optional"
},
"signals": {
"alarms": [],
"events": [],
"metrics": [],
"logs": []
},
"timeline": [],
"gaps": [],
"next_skill": "huawei-cloud-cce-pod-failure-diagnoser | huawei-cloud-cce-node-failure-diagnoser | huawei-cloud-cce-network-failure-diagnoser | huawei-cloud-cce-root-cause-analyzer"
}
Key output fields:
summary — one paragraph summarizing the collected observability contextscope — region, cluster, namespace, workload, and time windowsignals — collected evidence grouped by type (alarms, events, metrics, logs)timeline — merged signal timeline showing event chronologygaps — missing data that could improve diagnosisnext_skill — recommended diagnostic skill for hand-off based on signal analysisThis skill is strictly read-only observability — no mutations allowed.
confirm=true — no mutations allowedFor complete risk classification, see references/risk-rules.md.
python3 scripts/huawei-cloud.py huawei_list_aom_alarms region=cn-north-4 cluster_id=<cluster-id> to verify alarm query connectivitypython3 scripts/huawei-cloud.py huawei_get_cce_events region=cn-north-4 cluster_id=<cluster-id> limit=10 to verify Event query workspython3 scripts/huawei-cloud.py huawei_get_cce_pod_metrics_topN region=cn-north-4 cluster_id=<cluster-id> namespace=default top_n=5 to verify metrics TopNscope, signals, timeline, gaps, and next_skill fieldshuawei_list_aom_alarms and huawei_analyze_aom_alarms — alarms provide the most direct fault signalshuawei_get_cce_pod_metrics_topN and huawei_get_cce_node_metrics_topN efficiently highlight resource peaks without scanning all resourceshuawei_query_aom_logs provides structured log data; use huawei_get_pod_logs or huawei_get_recent_logs for Pod-side container log detailsgaps field — this guides the next diagnostic skill on what additional evidence to collecthuawei-cloud-cce-auto-remediation-runnerhuawei-cloud-cce-pod-failure-diagnoser, node issues → huawei-cloud-cce-node-failure-diagnoser, network → huawei-cloud-cce-network-failure-diagnoser, cross-domain → huawei-cloud-cce-root-cause-analyzerDocumentDescriptionWorkflowEvidence-gathering workflow and step sequenceRisk RulesSafety constraints and risk classificationOutput SchemaJSON response format for context package
huawei-cloud-cce-auto-remediation-runnerconfirm=true is ever neededscripts/huawei-cloud.py) is the only execution method — do not use hcloud CLI or direct API callsnext_skill field in the output uses huawei-cloud-cce-* naming for cross-skill hand-offhuawei-cloud-cce-alarm-correlation-enginePitfallSymptomQuick FixMissing cluster_idAll actions fail immediatelyProvide cluster_id from cluster listNo time window specifiedBroad, noisy resultsDefault to last 1 hour; note assumption in outputSkipping alarm collectionMissing critical fault signalsAlways start with huawei_list_aom_alarmsNot merging signals on timelineIsolated data points, no causal chainChronologically merge alarms, events, metricsSuggesting mutation actionsUnsafe recommendationsAll mutations → huawei-cloud-cce-auto-remediation-runnerNot marking data gapsDiagnosis skill lacks directionAlways populate the gaps fieldQuerying all namespacesSlow response, too many resultsScope with namespace and workloadAOM Prom instance not foundMetrics queries return emptyVerify with huawei_list_aom_instances first