← Back to Skills Marketplace
sdk-team

Alibabacloud Cms Alert Rule Create

by alibabacloud-skills-team · GitHub ↗ · v0.0.1 · MIT-0
cross-platform ⚠ suspicious
83
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install alibabacloud-cms-alert-rule-create
Description
Create Alibaba Cloud CMS alert rules via CLI (write-operation skill). Supports CMS 1.0 cloud resource monitoring for ALL CMS-integrated cloud products. This...
README (SKILL.md)

Alibaba Cloud Alert Rule Management

This skill creates and queries alert rules. Intent routing selects CMS 1.0 or CMS 2.0 workflow automatically.


CLI Setup (Required Before Execution)

aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-cms-alert-rule-create"
aliyun plugin update

Step 0: Intent Routing

Identify user's monitoring target → route to the correct workflow. See step0-intent-routing.md.

User Scenario Route To
Cloud product system metrics (ECS, RDS, SLB, OSS, Redis, MongoDB…) CMS 1.0 Workflow
Prometheus / APM / UModel / custom metrics CMS 2.0 Workflow

Supported Alert Types

Version Type Create API Query API
CMS 1.0 Cloud Resource (ECS/RDS/SLB/OSS/Redis/MongoDB…) PutResourceMetricRule DescribeMetricRuleList
CMS 2.0 Prometheus (PROMETHEUS) ManageAlertRules QueryAlertRules
CMS 2.0 APM (APM) ManageAlertRules QueryAlertRules
CMS 2.0 UModel (UMODEL) ManageAlertRules QueryAlertRules

CMS 1.0 Workflow

For query requests → step-query.md

For create requests:

Step Description Reference
1 Context Lock — namespace, region, instances step1-context-lock.md
2 Query Generation — discover metrics via API, match to user intent step2-query-generation.md
3 Detection Config — threshold, frequency (default 1min) step3-detection-config.md
4 Notification — query contacts → select or create step4-notification.md
5 Preview & Execute — show summary → confirm → CLI step5-preview-execute.md
6 Verification — check status step6-verification.md

CMS 2.0 Workflow

For query requests → cms2-step-query.md

For create requests:

Step Description Reference
1 Context Lock — build datasourceConfig (type, instanceId, region) cms2-step1-context-lock.md
2 Query Config — build queryConfig (PromQL / APM measures / UModel entity) cms2-step2-query-config.md
3 Detection Config — build conditionConfig (P1-P4, threshold, duration) cms2-step3-detection-config.md
4 Webhook Query — call list-alert-webhooks, user selects; other types → console cms2-step5-preview-execute.md
5 Preview & Execute — show summary → confirm → manage-alert-rules CLI cms2-step5-preview-execute.md

Critical Rules

Full details → references/critical-rules.md

  1. Intent Routing — Route cloud resource metrics to CMS 1.0, Prometheus/APM/UModel to CMS 2.0. Never mix APIs.
  2. CMS 2.0 API Enforcement — CMS 2.0 alert rules MUST ONLY be created via ManageAlertRules and queried via QueryAlertRules. No other API (e.g. PutResourceMetricRule, DescribeMetricRuleList, ARMS CreateOrUpdateAlertRule, ARMS CreatePrometheusAlertRule) is permitted for CMS 2.0 alert rule creation or query. If ManageAlertRules returns error, DO NOT fallback to other APIs — report the error to user and STOP execution. CLI format: aliyun cms manage-alert-rules --body '{"action":"CREATE",...}'
  3. Contact/Webhook Query First — CMS 1.0: DescribeContactGroupList; CMS 2.0: ListAlertWebhooks is MANDATORY before alert creation. (CMS 2.0 other notification → console). DO NOT use CMS 1.0 APIs as substitute for CMS 2.0. Skipping webhook query is a critical failure.
  4. Resources Parameter — (CMS 1.0) --resources must always be explicitly passed.
  5. Workspace Required — (CMS 2.0) Must ask user for workspace value using AskUser tool. Never auto-construct (e.g. 'default', 'default-cms-{accountId}'). If AskUser fails, retry once with simplified options, then report error and STOP — do NOT proceed with fabricated values.
  6. Prometheus Required Params — (CMS 2.0) cluster_id (instanceId) + workspace MUST ASK USER using AskUser tool. Never guess, omit, or auto-select. PromQL is generated based on user-provided cluster_id + monitoring target. If AskUser fails, STOP execution.
  7. APM Required Params — (CMS 2.0) service_id (for datasourceConfig.instanceId AND queryConfig.serviceIdList) + workspace MUST ASK USER using AskUser tool. Never fabricate, use placeholders, or auto-select from discovered applications (e.g. via ListTraceApps). Discovery APIs are for reference only — final selection MUST come from user input. If AskUser fails, STOP execution.
  8. Required API Calls — Every operation must call designated APIs even if values seem known.
  9. Dynamic Metric Discovery — (CMS 1.0) MUST call describe-metric-meta-list. Use metrics.md only as fallback.
  10. CLI Timeout--read-timeout 30 for queries, --read-timeout 60 for writes.
  11. Duplicate Pre-check — Query existing rules before creation to avoid duplicates.
  12. Mandatory Confirmation — Show config summary and get user confirmation before execution. EVEN in automated/simulated environments, you MUST output a configuration summary block and explicitly state 'Waiting for user confirmation' before proceeding. Do NOT skip this step with excuses about automation. Example format:
【配置摘要】
告警类型: APM/Prometheus
阈值: 5%
严重级别: P2
通知方式: webhook

请确认以上配置是否正确(回复确认或修改意见):
  1. User-Agent — Set ALIBABA_CLOUD_USER_AGENT="AlibabaCloud-Agent-Skills/alibabacloud-cms-alert-rule-create" for all CLI calls.
  2. Network Restriction — Never access external URLs. Use only references/ files and CLI.
  3. CLI Self-Discovery — Use --help for CLI syntax when uncertain.

Reference Files

File Scope Purpose
step0-intent-routing.md Shared Intent routing — CMS 1.0 or CMS 2.0
step-query.md CMS 1.0 Query alert rules (DescribeMetricRuleList)
step1-context-lock.md CMS 1.0 Context lock
step2-query-generation.md CMS 1.0 Query generation & metric discovery
step3-detection-config.md CMS 1.0 Detection config
step4-notification.md CMS 1.0 Notification & contact handling
step5-preview-execute.md CMS 1.0 Preview & execute
step6-verification.md CMS 1.0 Verification
cms2-step-query.md CMS 2.0 Query alert rules (QueryAlertRules)
cms2-step1-context-lock.md CMS 2.0 Datasource config (Prometheus/APM/UModel)
cms2-step2-query-config.md CMS 2.0 Query config (PromQL, APM, UModel)
cms2-step3-detection-config.md CMS 2.0 Detection condition config (P1-P4)
cms2-step5-preview-execute.md CMS 2.0 Preview, execute & webhook query
metrics.md CMS 1.0 Common metrics quick reference (fallback)
prometheus-metrics.md CMS 2.0 Prometheus PromQL patterns
apm-metrics.md CMS 2.0 APM metrics and operators
critical-rules.md Shared Expanded critical rule details, API tables, examples
ram-policies.md Shared Required RAM permissions
related_apis.yaml Shared API lookup before CLI calls

Cleanup (After Execution)

aliyun configure ai-mode disable
Usage Guidance
This skill appears to implement exactly what it claims (creating Alibaba Cloud CMS alert rules) and includes a parameter validator script and a clear step-by-step workflow. However, before installing or running it: 1) be aware the skill requires the Alibaba `aliyun` CLI and valid Alibaba Cloud credentials with write permissions (cms:PutResourceMetricRule, cms:PutContact, cms:PutContactGroup, etc.); those are not declared in the metadata — confirm you have the CLI and credentials configured locally (or the agent environment) and use least-privilege RAM policies. 2) Review references/ram-policies.md and only grant the listed permissions to the principal this skill will use. 3) Note the workflow often uses --resources '[{"resource":"_ALL"}]' which scopes alerts to all resources in a product/region — confirm you want that broad scope. 4) The included validate-params.sh will attempt to run `aliyun cms describe-contact-group-list` (if `aliyun` is present) to verify contact groups; run the script manually to inspect behavior first. 5) Because the package metadata omitted required binaries/credentials, treat this as a metadata quality issue (likely accidental) — if you need high assurance, ask the publisher to update the metadata to declare required binaries and the primary credential, or run the skill in a controlled environment with limited permissions.
Capability Analysis
Type: OpenClaw Skill Name: alibabacloud-cms-alert-rule-create Version: 0.0.1 The skill bundle is a well-structured tool for managing Alibaba Cloud CMS alert rules. It includes comprehensive documentation, a dedicated parameter validation script (scripts/validate-params.sh), and mandatory safety workflows such as dynamic metric discovery and explicit user confirmation before executing write operations. No evidence of malicious intent, data exfiltration, or unauthorized execution was found; the skill aligns strictly with its stated purpose of cloud monitoring management.
Capability Assessment
Purpose & Capability
Skill purpose (create CMS alert rules) matches the instructions and the included RAM permissions document. However the registry metadata lists no required binaries or primary credential while the runtime relies heavily on the `aliyun` CLI and valid Alibaba Cloud credentials/permissions (cms:PutResourceMetricRule, PutContact, etc.). The capability itself is coherent for alert creation, but the metadata omission is inconsistent.
Instruction Scope
SKILL.md provides a constrained, stepwise workflow limited to CloudMonitor APIs (describe-project-meta, describe-metric-meta-list, describe-contact-group-list, put-resource-metric-rule, etc.). It mandates explicit user confirmation before write, avoids hardcoding metrics (calls describe-metric-meta-list), and restricts allowed network targets to Alibaba domains. The included script only validates parameters and (optionally) calls the aliyun CLI to check contact group existence — this is within the stated purpose.
Install Mechanism
No install spec is provided (instruction-only), so nothing will be fetched or executed automatically on install. The skill includes a helper script (validate-params.sh) which will run locally if invoked; this script is readable and not obfuscated. Low install risk, but runtime requires local tooling (aliyun CLI, bc, uuidgen) that are not declared in metadata.
Credentials
The skill is a write-operation that requires IAM permissions to create alerts, contacts, and contact groups, but the package does not declare a primary credential or required environment variables. There is no mention in metadata that the user must supply Alibaba credentials or where they must be configured. That omission is disproportionate: the skill should declare that it requires configured Alibaba Cloud credentials (or an API key) and the minimal RAM actions required (which are documented in references/ram-policies.md).
Persistence & Privilege
The skill does not request permanent platform presence (always: false) and does not modify other skills or system-wide settings. Autonomous invocation is allowed by default but not combined here with other high-risk flags.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install alibabacloud-cms-alert-rule-create
  3. After installation, invoke the skill by name or use /alibabacloud-cms-alert-rule-create
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.0.1
- Initial release of the Alibaba Cloud CMS Alert Rule Creation skill. - Enables creation of CMS 1.0 alert rules for all CMS-integrated cloud products via CLI. - Enforces dynamic metric discovery (no hardcoded metrics); must call relevant APIs for up-to-date info. - Implements strict pre-flight API checks, duplicate detection, notification/contact management, and explicit user confirmation prior to creating any alert. - Provides step-by-step workflow and critical rules for safe, reliable, and consistent alert rule creation.
Metadata
Slug alibabacloud-cms-alert-rule-create
Version 0.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Alibabacloud Cms Alert Rule Create?

Create Alibaba Cloud CMS alert rules via CLI (write-operation skill). Supports CMS 1.0 cloud resource monitoring for ALL CMS-integrated cloud products. This... It is an AI Agent Skill for Claude Code / OpenClaw, with 83 downloads so far.

How do I install Alibabacloud Cms Alert Rule Create?

Run "/install alibabacloud-cms-alert-rule-create" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Alibabacloud Cms Alert Rule Create free?

Yes, Alibabacloud Cms Alert Rule Create is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Alibabacloud Cms Alert Rule Create support?

Alibabacloud Cms Alert Rule Create is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Alibabacloud Cms Alert Rule Create?

It is built and maintained by alibabacloud-skills-team (@sdk-team); the current version is v0.0.1.

💬 Comments