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.
Files changed (99) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +178 -138
  4. package/README.zh-CN.md +176 -138
  5. package/bin/setup.cjs +10 -8
  6. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  7. package/integrations/opencode/opencode.json +11 -14
  8. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
  9. package/package.json +60 -44
  10. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
  11. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
  12. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
  13. package/plugins/huaweicloud-core/.mcp.json +13 -15
  14. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
  15. package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
  16. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
  17. package/plugins/huaweicloud-core/safety/policy.json +76 -100
  18. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
  19. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
  20. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
  21. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
  22. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
  23. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
  24. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
  25. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
  26. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
  27. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
  28. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
  29. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
  30. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
  31. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
  34. package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
  35. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
  36. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
  38. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
  39. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
  40. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
  41. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
  42. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
  43. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
  44. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
  45. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
  46. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
  47. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
  48. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
  49. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
  50. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
  51. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
  52. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
  53. package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
  54. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
  55. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
  56. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
  57. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
  58. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
  59. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
  60. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
  61. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
  62. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
  63. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
  64. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
  65. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
  66. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
  67. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
  68. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
  69. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
  70. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
  71. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
  72. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
  73. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
  74. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
  75. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
  76. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
  77. package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
  78. package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
  79. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  80. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
  81. package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
  82. package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
  83. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
  84. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
  85. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
  86. package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
  87. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
  88. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
  89. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
  90. package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
  91. package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
  92. package/plugins/huaweicloud-core/src/tools.mjs +463 -111
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
  94. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
  95. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
  96. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
  97. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
  98. package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
  99. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
@@ -1,101 +1,103 @@
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
- | **KooCLI 7.x: CreateCluster/CreateNodePool broken** | OPENAPI_ERROR in KooCLI 7.2.12. Use `CreateAutopilotCluster` for serverless, or Python SDK for VM clusters |
22
- | Cluster type immutable | Cannot change hybrid/traditional after creation |
23
- | Master managed by Huawei | No SSH to master. Use kubectl or kubectl-cce |
24
- | Network model affects pod IP | VPC network gives pods VPC IPs |
25
- | Addon ops use UID not name | `ShowAddonInstance` returns `metadata.uid` for install/uninstall/update |
26
- | SWR enterprise instance costs | `postPaid` billing. One-time activation at console required |
27
-
28
- ## Common Workflows
29
-
30
- | Task | Operation | Service |
31
- |------|-----------|---------|
32
- | List clusters | `ListClusters` | CCE |
33
- | Create cluster | `CreateCluster` | CCE |
34
- | Delete cluster | `DeleteCluster` | CCE |
35
- | Hibernate cluster | `HibernateCluster` | CCE |
36
- | List node pools | `ListNodePools` | CCE |
37
- | Create node pool | `CreateNodePool` | CCE |
38
- | List nodes | `ListNodes` | CCE |
39
- | Get kubeconfig | `CreateKubernetesClusterCert` | CCE |
40
- | List addons | `ListAddonInstances` | CCE |
41
- | Docker login (SWR) | `CreateAuthorizationToken` | SWR |
42
- | Create SWR org | `CreateNamespace` | SWR |
43
- | Create SWR repo | `CreateRepo` | SWR |
44
- | List repos | `ListReposDetails` | SWR |
45
-
46
- ## SWR Image Push Workflow
47
-
48
- **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.
49
-
50
- ```bash
51
- # 1. Docker login to SWR
52
- hcloud SWR CreateAuthorizationToken --help
53
- docker login -u <region>@<AK> -p <token> swr.<region>.myhuaweicloud.com
54
-
55
- # 2. Tag and push
56
- docker tag my-app:latest swr.<region>.myhuaweicloud.com/<org>/my-app:latest
57
- docker push swr.<region>.myhuaweicloud.com/<org>/my-app:latest
58
-
59
- # 3. Verify
60
- hcloud SWR ListReposDetails --cli-region=<r>
61
- ```
62
-
63
- > SWR Auth token valid 12h. For CCE node pull access, create long-term credential with `CreateSecret` (valid 1 year).
64
-
65
- ## Serverless Containers (CCI)
66
-
67
- For serverless containers without managing clusters, use CCI (Cloud Container Instance):
68
-
69
- - No cluster needed — just namespace + network + workload
70
- - Key ops: `CCI createCoreV1Namespace`, `CCI createNetworkingCciIoV1beta1NamespacedNetwork`, `CCI createAppsV1NamespacedDeployment`
71
- - Namespace MUST include `namespace-kubernetes-io/flavor` annotation
72
- - `limits == requests` strictly enforced (no overcommit)
73
-
74
- See `hcloud CCI --help` for full operation list.
75
-
76
- ## Troubleshooting
77
-
78
- | Error | Fix |
79
- |-------|-----|
80
- | kubectl connection refused | Verify cluster Running; use `kubectl cce` (no EIP needed) |
81
- | Node pool creation failed | Check VPC/subnet availability and flavor capacity |
82
- | Docker push 401 | Re-run `CreateAuthorizationToken` (token expired) |
83
- | SVCSTG.SWR.4030170 | Missing `sts::createServiceBearerToken` IAM permission. Grant SWR Admin role or add policy |
84
- | Addon install fails | Use `metadata.uid` from `ShowAddonInstance`, not name |
85
- | `kubectl cce` not found | Install plugin: `kubectl cce` uses AK/SK, no kubeconfig required |
86
-
87
- ## Security Considerations
88
-
89
- - MUST restrict kubeconfig file permissions (0600)
90
- - MUST use IAM RBAC for cluster access, not cluster-admin
91
- - MUST store container images in private SWR repositories
92
-
93
- ## Cross-Skill References
94
-
95
- - **VPC/Subnet**: See `huawei-vpc` for network prerequisites
96
- - **EIP**: See `huawei-vpc` for cluster public access
97
-
98
- ## References
99
-
100
- - CCE Docs: https://support.huaweicloud.com/cce/
101
- - SWR Docs: https://support.huaweicloud.com/swr/
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: "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
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