huaweicloud-devkit 1.0.2-dev.9 → 1.0.2-next.0

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 (97) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +163 -138
  4. package/README.zh-CN.md +161 -138
  5. package/bin/setup.cjs +8 -8
  6. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  7. package/integrations/opencode/opencode.json +14 -14
  8. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
  9. package/package.json +46 -44
  10. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +44 -44
  11. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +43 -43
  12. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +44 -44
  13. package/plugins/huaweicloud-core/.mcp.json +15 -15
  14. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +44 -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 +99 -99
  18. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +199 -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 +101 -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 +190 -190
  25. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +124 -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 +56 -56
  29. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +97 -97
  30. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +29 -29
  31. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +23 -23
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +185 -185
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +133 -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 +55 -55
  36. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +131 -131
  38. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +58 -58
  39. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +71 -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 +65 -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 +122 -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 +133 -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 +26 -26
  51. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +100 -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 +224 -224
  55. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +135 -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 +76 -76
  59. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +59 -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 +51 -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 +128 -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 +110 -95
  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 +19 -19
  71. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +27 -27
  72. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +60 -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 +105 -87
  77. package/plugins/huaweicloud-core/src/auth/credentials.mjs +95 -95
  78. package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
  79. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +265 -265
  80. package/plugins/huaweicloud-core/src/mcp-server.mjs +129 -129
  81. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +155 -0
  82. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +87 -0
  83. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +137 -137
  84. package/plugins/huaweicloud-core/src/safety-policy.mjs +302 -302
  85. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +91 -87
  86. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +162 -153
  87. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +112 -105
  88. package/plugins/huaweicloud-core/src/search-market.mjs +174 -169
  89. package/plugins/huaweicloud-core/src/setup-cli.mjs +2017 -1594
  90. package/plugins/huaweicloud-core/src/tools.mjs +1008 -993
  91. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +427 -427
  92. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +132 -132
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +227 -227
  94. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +202 -202
  95. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +158 -158
  96. package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
  97. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
@@ -1,101 +1,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
- | **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
+ | **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,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