huaweicloud-devkit 1.0.2-dev.9 → 1.0.2-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -20
- package/LICENSE +201 -201
- package/README.md +178 -138
- package/README.zh-CN.md +176 -138
- package/bin/setup.cjs +10 -8
- package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
- package/integrations/opencode/opencode.json +11 -14
- package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
- package/package.json +60 -44
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/.mcp.json +13 -15
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
- package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
- package/plugins/huaweicloud-core/safety/policy.json +76 -100
- package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
- package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
- package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
- package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
- package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
- package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
- package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
- package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
- package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
- package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
- package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
- package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
- package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
- package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
- package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
- package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
- package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
- package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
- package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
- package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
- package/plugins/huaweicloud-core/src/tools.mjs +463 -111
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
- package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
- package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
|
@@ -1,101 +1,103 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-cce
|
|
3
|
-
description:
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud CCE
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
Domain expertise for CCE (Cloud Container Engine) and SWR (Software Repository for Container). CCE uses two hcloud services: `CCE` for clusters and `SWR` for container images.
|
|
16
|
-
|
|
17
|
-
## Critical Warnings
|
|
18
|
-
|
|
19
|
-
| Trap
|
|
20
|
-
|
|
21
|
-
| **
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| Create SWR
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
docker
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- MUST
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
1
|
+
---
|
|
2
|
+
name: huawei-cce
|
|
3
|
+
description: 'Use when creating or managing CCE Kubernetes clusters. Covers cluster creation, node pools, SWR registry, autoscaling. Triggers: CCE, Kubernetes, K8s, cluster, node pool, container, SWR. NOT for: serverless functions (use huawei-functiongraph), serverless containers (use huawei-cce for CCI redirect).'
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud CCE
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud <Service> <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for CCE (Cloud Container Engine) and SWR (Software Repository for Container). CCE uses two hcloud services: `CCE` for clusters and `SWR` for container images.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
| ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| **Huawei Cloud API returns errors one field at a time** | When creating clusters/services with multiple invalid fields, the API reports only the first error, not all errors at once. After fixing one field and resubmitting, the next call reveals the next error — iterating N times for N bad fields. This compounds with long cluster creation times (~10 min). To avoid this loop, run `hcloud CCE <Operation> --help` and validate every parameter with its constraints before the first call. Use `--cli-jsonInput` with a validated JSON file to reduce reformatting overhead between retries. |
|
|
22
|
+
| **KooCLI 7.x: CreateCluster/CreateNodePool broken** | OPENAPI_ERROR in KooCLI 7.2.12. Use `CreateAutopilotCluster` for serverless, or Python SDK for VM clusters |
|
|
23
|
+
| Cluster type immutable | Cannot change hybrid/traditional after creation |
|
|
24
|
+
| Master managed by Huawei | No SSH to master. Use kubectl or kubectl-cce |
|
|
25
|
+
| Network model affects pod IP | VPC network gives pods VPC IPs |
|
|
26
|
+
| Addon ops use UID not name | `ShowAddonInstance` returns `metadata.uid` for install/uninstall/update |
|
|
27
|
+
| SWR enterprise instance costs | `postPaid` billing. One-time activation at console required |
|
|
28
|
+
|
|
29
|
+
## Common Workflows
|
|
30
|
+
|
|
31
|
+
| Task | Operation | Service |
|
|
32
|
+
| ------------------ | ----------------------------- | ------- |
|
|
33
|
+
| List clusters | `ListClusters` | CCE |
|
|
34
|
+
| Create cluster | `CreateCluster` | CCE |
|
|
35
|
+
| Delete cluster | `DeleteCluster` | CCE |
|
|
36
|
+
| Hibernate cluster | `HibernateCluster` | CCE |
|
|
37
|
+
| List node pools | `ListNodePools` | CCE |
|
|
38
|
+
| Create node pool | `CreateNodePool` | CCE |
|
|
39
|
+
| List nodes | `ListNodes` | CCE |
|
|
40
|
+
| Get kubeconfig | `CreateKubernetesClusterCert` | CCE |
|
|
41
|
+
| List addons | `ListAddonInstances` | CCE |
|
|
42
|
+
| Docker login (SWR) | `CreateAuthorizationToken` | SWR |
|
|
43
|
+
| Create SWR org | `CreateNamespace` | SWR |
|
|
44
|
+
| Create SWR repo | `CreateRepo` | SWR |
|
|
45
|
+
| List repos | `ListReposDetails` | SWR |
|
|
46
|
+
|
|
47
|
+
## SWR Image Push Workflow
|
|
48
|
+
|
|
49
|
+
**Prerequisite**: User/agency must have `sts::createServiceBearerToken` IAM permission. Without it, `CreateAuthorizationToken` returns `SVCSTG.SWR.4030170 Insufficient permissions`. Grant via IAM console or attach SWR Admin role.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# 1. Docker login to SWR
|
|
53
|
+
hcloud SWR CreateAuthorizationToken --help
|
|
54
|
+
docker login -u <region>@<AK> -p <token> swr.<region>.myhuaweicloud.com
|
|
55
|
+
|
|
56
|
+
# 2. Tag and push
|
|
57
|
+
docker tag my-app:latest swr.<region>.myhuaweicloud.com/<org>/my-app:latest
|
|
58
|
+
docker push swr.<region>.myhuaweicloud.com/<org>/my-app:latest
|
|
59
|
+
|
|
60
|
+
# 3. Verify
|
|
61
|
+
hcloud SWR ListReposDetails --cli-region=<r>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
> SWR Auth token valid 12h. For CCE node pull access, create long-term credential with `CreateSecret` (valid 1 year).
|
|
65
|
+
|
|
66
|
+
## Serverless Containers (CCI)
|
|
67
|
+
|
|
68
|
+
For serverless containers without managing clusters, use CCI (Cloud Container Instance):
|
|
69
|
+
|
|
70
|
+
- No cluster needed — just namespace + network + workload
|
|
71
|
+
- Key ops: `CCI createCoreV1Namespace`, `CCI createNetworkingCciIoV1beta1NamespacedNetwork`, `CCI createAppsV1NamespacedDeployment`
|
|
72
|
+
- Namespace MUST include `namespace-kubernetes-io/flavor` annotation
|
|
73
|
+
- `limits == requests` strictly enforced (no overcommit)
|
|
74
|
+
|
|
75
|
+
See `hcloud CCI --help` for full operation list.
|
|
76
|
+
|
|
77
|
+
## Troubleshooting
|
|
78
|
+
|
|
79
|
+
| Error | Fix |
|
|
80
|
+
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
81
|
+
| kubectl connection refused | Verify cluster Running; use `kubectl cce` (no EIP needed) |
|
|
82
|
+
| Node pool creation failed | Check VPC/subnet availability and flavor capacity |
|
|
83
|
+
| Docker push 401 | Re-run `CreateAuthorizationToken` (token expired) |
|
|
84
|
+
| SVCSTG.SWR.4030170 | Missing `sts::createServiceBearerToken` IAM permission. Grant SWR Admin role or add policy |
|
|
85
|
+
| Addon install fails | Use `metadata.uid` from `ShowAddonInstance`, not name |
|
|
86
|
+
| `kubectl cce` not found | Install plugin: `kubectl cce` uses AK/SK, no kubeconfig required |
|
|
87
|
+
| Serial field-by-field API errors | The API reports errors one field at a time. Fix a field, retry, get the next error — each cycle ~10 min for cluster operations. Mitigation: validate all parameters against `--help` constraints before the first call; use `--cli-jsonInput` for faster retries. |
|
|
88
|
+
|
|
89
|
+
## Security Considerations
|
|
90
|
+
|
|
91
|
+
- MUST restrict kubeconfig file permissions (0600)
|
|
92
|
+
- MUST use IAM RBAC for cluster access, not cluster-admin
|
|
93
|
+
- MUST store container images in private SWR repositories
|
|
94
|
+
|
|
95
|
+
## Cross-Skill References
|
|
96
|
+
|
|
97
|
+
- **VPC/Subnet**: See `huawei-vpc` for network prerequisites
|
|
98
|
+
- **EIP**: See `huawei-vpc` for cluster public access
|
|
99
|
+
|
|
100
|
+
## References
|
|
101
|
+
|
|
102
|
+
- CCE Docs: https://support.huaweicloud.com/cce/
|
|
103
|
+
- SWR Docs: https://support.huaweicloud.com/swr/
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: huawei-cloud-eye
|
|
3
|
-
description:
|
|
4
|
-
version: 1
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Huawei Cloud Cloud Eye (CES)
|
|
8
|
-
|
|
9
|
-
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
-
|
|
11
|
-
Always run `hcloud CES <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
Domain expertise for Cloud Eye (CES). Covers metric queries, alarm rules, dashboards, and monitoring agent management.
|
|
16
|
-
|
|
17
|
-
## Critical Warnings
|
|
18
|
-
|
|
19
|
-
| Trap
|
|
20
|
-
|
|
21
|
-
| Telescope agent required for detailed metrics | Without agent: only basic CPU/network metrics. Memory, disk require agent installation on ECS
|
|
22
|
-
| Alarm needs SMN topic first
|
|
23
|
-
| Cost metrics incur charges
|
|
24
|
-
| CES endpoint may vary by region
|
|
25
|
-
| Metric granularity minimum 300s
|
|
26
|
-
|
|
27
|
-
## Prerequisites
|
|
28
|
-
|
|
29
|
-
- ECS instances need the **Telescope agent** installed for detailed metrics (memory, disk, network)
|
|
30
|
-
- Without agent: only SYS.ECS namespace metrics available (CPU, network bytes, disk read/write)
|
|
31
|
-
- Alarm notifications require an SMN topic (see `huawei-smn-dms`)
|
|
32
|
-
|
|
33
|
-
## Common Workflows
|
|
34
|
-
|
|
35
|
-
| Task
|
|
36
|
-
|
|
37
|
-
| List metrics
|
|
38
|
-
| Get metric data
|
|
39
|
-
| List alarms
|
|
40
|
-
| Create alarm
|
|
41
|
-
| Delete alarm
|
|
42
|
-
| List dashboards
|
|
43
|
-
| Create dashboard | `CreateDashboard --cli-region=<r> --project_id=<p>`
|
|
44
|
-
|
|
45
|
-
## Create Alarm Rule — Param Structure
|
|
46
|
-
|
|
47
|
-
CES uses **nested object prefixes** for alarm creation. Always verify with `--help`:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
hcloud CES CreateAlarm --help
|
|
51
|
-
# Key params: --alarm_name, --metric.metric_name, --metric.namespace,
|
|
52
|
-
# --condition.period, --condition.filter, --condition.value,
|
|
53
|
-
# --condition.comparison_operator, --condition.count
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### `--condition.comparison_operator` Legal Values
|
|
57
|
-
|
|
58
|
-
For metric alarms use **symbols** (NOT words like `gt`/`lt`):
|
|
59
|
-
|
|
60
|
-
| Value | Meaning
|
|
61
|
-
|
|
62
|
-
| `>`
|
|
63
|
-
| `>=`
|
|
64
|
-
| `<`
|
|
65
|
-
| `<=`
|
|
66
|
-
| `=`
|
|
67
|
-
| `!=`
|
|
68
|
-
|
|
69
|
-
For event alarms: `cycle_decrease`, `cycle_increase`, `cycle_wave`.
|
|
70
|
-
|
|
71
|
-
> **Trap**: Shell may interpret `>` and `<` as redirect operators. Always quote: `--condition.comparison_operator=">="` or use `--cli-jsonInput=<file>`.
|
|
72
|
-
|
|
73
|
-
## Troubleshooting
|
|
74
|
-
|
|
75
|
-
| Error
|
|
76
|
-
|
|
77
|
-
| No metric data
|
|
78
|
-
| Alarm not triggering
|
|
79
|
-
| CES network timeout in region | Some regions may have CES endpoint issues. Try a different region
|
|
80
|
-
|
|
81
|
-
## Security
|
|
82
|
-
|
|
83
|
-
- MUST use role-based alarm notifications
|
|
84
|
-
- MUST not expose alarm action endpoints publicly
|
|
85
|
-
- SHOULD enable CES alarm history for audit
|
|
86
|
-
|
|
87
|
-
## Cross-Skill References
|
|
88
|
-
|
|
89
|
-
- **SMN topics**: See `huawei-smn-dms` for alarm notification setup
|
|
90
|
-
- **ECS monitoring**: See `huawei-ecs` for instance creation
|
|
1
|
+
---
|
|
2
|
+
name: huawei-cloud-eye
|
|
3
|
+
description: 'Use when setting up monitoring, alarms, dashboards, or event rules on Huawei Cloud Eye (CES). Triggers: Cloud Eye, CES, monitoring, alarm, metrics, dashboard, event monitoring. NOT for: CTS audit logs (use huawei-cts), AAD anti-DDoS (use huawei-waf-aad).'
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud Cloud Eye (CES)
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud CES <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for Cloud Eye (CES). Covers metric queries, alarm rules, dashboards, and monitoring agent management.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
21
|
+
| Telescope agent required for detailed metrics | Without agent: only basic CPU/network metrics. Memory, disk require agent installation on ECS |
|
|
22
|
+
| Alarm needs SMN topic first | Alarm notifications fail silently without a configured SMN topic |
|
|
23
|
+
| Cost metrics incur charges | Custom metrics and high-frequency alarms have billing implications |
|
|
24
|
+
| CES endpoint may vary by region | Some older regions use different endpoint URLs. Check `https://developer.huaweicloud.com/endpoint?CES` |
|
|
25
|
+
| Metric granularity minimum 300s | Free tier has 5-minute minimum. Higher resolution requires paid tier |
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
- ECS instances need the **Telescope agent** installed for detailed metrics (memory, disk, network)
|
|
30
|
+
- Without agent: only SYS.ECS namespace metrics available (CPU, network bytes, disk read/write)
|
|
31
|
+
- Alarm notifications require an SMN topic (see `huawei-smn-dms`)
|
|
32
|
+
|
|
33
|
+
## Common Workflows
|
|
34
|
+
|
|
35
|
+
| Task | Operation |
|
|
36
|
+
| ---------------- | --------------------------------------------------------- |
|
|
37
|
+
| List metrics | `ListMetrics --cli-region=<r> --project_id=<p>` |
|
|
38
|
+
| Get metric data | `BatchListMetricData --cli-region=<r> --project_id=<p>` |
|
|
39
|
+
| List alarms | `ListAlarms --cli-region=<r> --project_id=<p>` |
|
|
40
|
+
| Create alarm | `CreateAlarm` (see below) |
|
|
41
|
+
| Delete alarm | `BatchDeleteAlarmRules --cli-region=<r> --project_id=<p>` |
|
|
42
|
+
| List dashboards | `ListDashboardWidgets --cli-region=<r> --project_id=<p>` |
|
|
43
|
+
| Create dashboard | `CreateDashboard --cli-region=<r> --project_id=<p>` |
|
|
44
|
+
|
|
45
|
+
## Create Alarm Rule — Param Structure
|
|
46
|
+
|
|
47
|
+
CES uses **nested object prefixes** for alarm creation. Always verify with `--help`:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
hcloud CES CreateAlarm --help
|
|
51
|
+
# Key params: --alarm_name, --metric.metric_name, --metric.namespace,
|
|
52
|
+
# --condition.period, --condition.filter, --condition.value,
|
|
53
|
+
# --condition.comparison_operator, --condition.count
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `--condition.comparison_operator` Legal Values
|
|
57
|
+
|
|
58
|
+
For metric alarms use **symbols** (NOT words like `gt`/`lt`):
|
|
59
|
+
|
|
60
|
+
| Value | Meaning |
|
|
61
|
+
| ----- | --------------------- |
|
|
62
|
+
| `>` | Greater than |
|
|
63
|
+
| `>=` | Greater than or equal |
|
|
64
|
+
| `<` | Less than |
|
|
65
|
+
| `<=` | Less than or equal |
|
|
66
|
+
| `=` | Equal |
|
|
67
|
+
| `!=` | Not equal |
|
|
68
|
+
|
|
69
|
+
For event alarms: `cycle_decrease`, `cycle_increase`, `cycle_wave`.
|
|
70
|
+
|
|
71
|
+
> **Trap**: Shell may interpret `>` and `<` as redirect operators. Always quote: `--condition.comparison_operator=">="` or use `--cli-jsonInput=<file>`.
|
|
72
|
+
|
|
73
|
+
## Troubleshooting
|
|
74
|
+
|
|
75
|
+
| Error | Fix |
|
|
76
|
+
| ----------------------------- | -------------------------------------------------------------------------------- |
|
|
77
|
+
| No metric data | Telescope agent not installed or ECS stopped. Install agent for detailed metrics |
|
|
78
|
+
| Alarm not triggering | Check metric period (minimum 300s), verify condition threshold |
|
|
79
|
+
| CES network timeout in region | Some regions may have CES endpoint issues. Try a different region |
|
|
80
|
+
|
|
81
|
+
## Security
|
|
82
|
+
|
|
83
|
+
- MUST use role-based alarm notifications
|
|
84
|
+
- MUST not expose alarm action endpoints publicly
|
|
85
|
+
- SHOULD enable CES alarm history for audit
|
|
86
|
+
|
|
87
|
+
## Cross-Skill References
|
|
88
|
+
|
|
89
|
+
- **SMN topics**: See `huawei-smn-dms` for alarm notification setup
|
|
90
|
+
- **ECS monitoring**: See `huawei-ecs` for instance creation
|