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) --- Step 0: Intent Routing Identify user's monitoring target → route to the correct workflow. See . | 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 | |---------|------|---------…

; then\n log_fail \"$label: '$value' is not a valid number\"\n return\n fi\n\n # Percentage metrics must be 0-100\n if echo \"$metric\" | grep -qiE '(Utilization|Usage|Rates)'; then\n local too_low too_high\n too_low=$(echo \"$value \u003c 0\" | bc -l 2>/dev/null || echo 0)\n too_high=$(echo \"$value > 100\" | bc -l 2>/dev/null || echo 0)\n if [ \"$too_low\" = \"1\" ] || [ \"$too_high\" = \"1\" ]; then\n log_fail \"$label: percentage metric '$metric' requires threshold 0-100 (got $value)\"\n return\n fi\n fi\n\n log_ok \"$label: $value\"\n}\n\nvalidate_times() {\n local label=\"$1\"\n local value=\"$2\"\n\n # Allow empty or skipped value\n if [ -z \"$value\" ] || [ \"$value\" = \"-\" ]; then\n log_ok \"$label: skipped (not set)\"\n return\n fi\n\n if ! echo \"$value\" | grep -qE '^[0-9]+

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) --- Step 0: Intent Routing Identify user's monitoring target → route to the correct workflow. See . | 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 | |---------|------|---------…

; then\n log_fail \"$label: '$value' is not a valid integer\"\n return\n fi\n\n if [ \"$value\" -lt 1 ] || [ \"$value\" -gt 10 ]; then\n log_fail \"$label: must be 1-10 (got $value)\"\n return\n fi\n\n log_ok \"$label: $value\"\n}\n\nvalidate_namespace() {\n local ns=\"$1\"\n local known_namespaces=\"acs_ecs_dashboard acs_rds_dashboard acs_slb_dashboard acs_oss_dashboard acs_kvstore acs_k8s acs_fc acs_kafka acs_rocketmq acs_sls_dashboard acs_cdn acs_vpn acs_nat_gateway\"\n\n if [ -z \"$ns\" ]; then\n log_fail \"namespace: cannot be empty\"\n return\n fi\n\n for known in $known_namespaces; do\n if [ \"$ns\" = \"$known\" ]; then\n log_ok \"namespace: $ns\"\n return\n fi\n done\n\n log_warn \"namespace: '$ns' is not in the known list (may still be valid for newer services)\"\n}\n\nvalidate_resources_json() {\n local json=\"$1\"\n\n if [ -z \"$json\" ]; then\n log_fail \"resources: cannot be empty\"\n return\n fi\n\n # Basic JSON array structure check\n if ! echo \"$json\" | grep -qE '^\\[.*\\]

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) --- Step 0: Intent Routing Identify user's monitoring target → route to the correct workflow. See . | 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 | |---------|------|---------…

; then\n log_fail \"resources: must be a JSON array (e.g., [{\\\"resource\\\":\\\"_ALL\\\"}])\"\n return\n fi\n\n # Check for known patterns\n if echo \"$json\" | grep -qE '\"resource\"\\s*:\\s*\"_ALL\"'; then\n log_ok \"resources: all resources\"\n elif echo \"$json\" | grep -qE '\"instanceId\"\\s*:\\s*\"'; then\n log_ok \"resources: specific instance(s)\"\n else\n log_warn \"resources: unrecognized format, please verify\"\n fi\n}\n\nvalidate_contact_group() {\n local group=\"$1\"\n\n if [ -z \"$group\" ]; then\n log_fail \"contact-groups: cannot be empty\"\n return\n fi\n\n # Try to verify against the API (best-effort, don't fail if CLI is unavailable)\n if command -v aliyun >/dev/null 2>&1; then\n local result\n result=$(aliyun cms describe-contact-group-list 2>/dev/null) || true\n if [ -n \"$result\" ]; then\n if echo \"$result\" | grep -q \"\\\"Name\\\": \\\"$group\\\"\"; then\n log_ok \"contact-groups: '$group' (verified exists)\"\n else\n log_warn \"contact-groups: '$group' not found in existing groups\"\n fi\n else\n log_warn \"contact-groups: could not query API, skipping existence check\"\n fi\n else\n log_warn \"contact-groups: aliyun CLI not available, skipping existence check\"\n fi\n}\n\nvalidate_effective_interval() {\n local interval=\"$1\"\n\n if [ -z \"$interval\" ] || [ \"$interval\" = \"-\" ]; then\n return # Optional field\n fi\n\n if echo \"$interval\" | grep -qE '^[0-2][0-9]:[0-5][0-9]-[0-2][0-9]:[0-5][0-9]

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) --- Step 0: Intent Routing Identify user's monitoring target → route to the correct workflow. See . | 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 | |---------|------|---------…

; then\n log_ok \"effective-interval: $interval\"\n else\n log_fail \"effective-interval: must be HH:MM-HH:MM format (got '$interval')\"\n fi\n}\n\n# --- Main ---\n\nif [ \"$#\" -lt 7 ]; then\n echo \"Usage: $0 \u003crule-name> \u003cmetric-name> \u003cwarn-threshold> \u003ccritical-threshold> \u003cwarn-times> \u003ccritical-times> \u003ccontact-group> [namespace] [resources-json] [effective-interval]\"\n echo \"\"\n echo \"Use '-' for optional fields you want to skip (e.g., warn-threshold).\"\n echo \"\"\n echo \"Examples:\"\n echo \" $0 ECS-CPU-Alert CPUUtilization 70 85 5 3 Default\"\n echo \" $0 ECS-CPU-Alert CPUUtilization - 85 - 3 Default acs_ecs_dashboard\"\n exit 1\nfi\n\nRULE_NAME=\"$1\"\nMETRIC_NAME=\"$2\"\nWARN_THRESHOLD=\"$3\"\nCRITICAL_THRESHOLD=\"$4\"\nWARN_TIMES=\"$5\"\nCRITICAL_TIMES=\"$6\"\nCONTACT_GROUP=\"$7\"\nNAMESPACE=\"${8:-}\"\nRESOURCES=\"${9:-}\"\nEFFECTIVE_INTERVAL=\"${10:-}\"\n\necho \"==========================================\"\necho \" Parameter Validation\"\necho \"==========================================\"\necho \"\"\n\nvalidate_rule_name \"$RULE_NAME\"\nvalidate_threshold \"warn-threshold\" \"$WARN_THRESHOLD\" \"$METRIC_NAME\"\nvalidate_threshold \"critical-threshold\" \"$CRITICAL_THRESHOLD\" \"$METRIC_NAME\"\nvalidate_times \"warn-times\" \"$WARN_TIMES\"\nvalidate_times \"critical-times\" \"$CRITICAL_TIMES\"\nvalidate_contact_group \"$CONTACT_GROUP\"\n\nif [ -n \"$NAMESPACE\" ]; then\n validate_namespace \"$NAMESPACE\"\nfi\n\nif [ -n \"$RESOURCES\" ]; then\n validate_resources_json \"$RESOURCES\"\nfi\n\nif [ -n \"$EFFECTIVE_INTERVAL\" ]; then\n validate_effective_interval \"$EFFECTIVE_INTERVAL\"\nfi\n\necho \"\"\necho \"==========================================\"\nif [ \"$errors\" -gt 0 ]; then\n log_fail \"Validation failed with $errors error(s)\"\n exit 1\nelse\n log_ok \"All validations passed\"\n exit 0\nfi\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":6585,"content_sha256":"a000c80f280bb061373b6a1d1798c8f3206f78cbd3219d048939e2876211040b"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Alibaba Cloud Alert Rule Management","type":"text"}]},{"type":"paragraph","content":[{"text":"This skill creates and queries alert rules. Intent routing selects CMS 1.0 or CMS 2.0 workflow automatically.","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"CLI Setup (Required Before Execution)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"aliyun configure ai-mode enable\naliyun configure ai-mode set-user-agent --user-agent \"AlibabaCloud-Agent-Skills/alibabacloud-cms-alert-rule-create\"\naliyun plugin update","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Step 0: Intent Routing","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Identify user's monitoring target → route to the correct workflow. See ","type":"text"},{"text":"step0-intent-routing.md","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"User Scenario","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Route To","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cloud product system metrics (ECS, RDS, SLB, OSS, Redis, MongoDB…)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0 Workflow","type":"text","marks":[{"type":"strong"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Prometheus / APM / UModel / custom metrics","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0 Workflow","type":"text","marks":[{"type":"strong"}]}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Supported Alert Types","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Version","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Type","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Create API","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Query API","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cloud Resource (ECS/RDS/SLB/OSS/Redis/MongoDB…)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"PutResourceMetricRule","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"DescribeMetricRuleList","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Prometheus (","type":"text"},{"text":"PROMETHEUS","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ManageAlertRules","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"QueryAlertRules","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"APM (","type":"text"},{"text":"APM","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ManageAlertRules","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"QueryAlertRules","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"UModel (","type":"text"},{"text":"UMODEL","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ManageAlertRules","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"QueryAlertRules","type":"text","marks":[{"type":"code_inline"}]}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"CMS 1.0 Workflow","type":"text"}]},{"type":"paragraph","content":[{"text":"For ","type":"text"},{"text":"query","type":"text","marks":[{"type":"strong"}]},{"text":" requests → ","type":"text"},{"text":"step-query.md","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"paragraph","content":[{"text":"For ","type":"text"},{"text":"create","type":"text","marks":[{"type":"strong"}]},{"text":" requests:","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Step","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Reference","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"1","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Context Lock — namespace, region, instances","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step1-context-lock.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Query Generation — discover metrics via API, match to user intent","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step2-query-generation.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"3","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Detection Config — threshold, frequency (default 1min)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step3-detection-config.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"4","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Notification — query contacts → select or create","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step4-notification.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"5","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Preview & Execute — show summary → confirm → CLI","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step5-preview-execute.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"6","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Verification — check status","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step6-verification.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"CMS 2.0 Workflow","type":"text"}]},{"type":"paragraph","content":[{"text":"For ","type":"text"},{"text":"query","type":"text","marks":[{"type":"strong"}]},{"text":" requests → ","type":"text"},{"text":"cms2-step-query.md","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"paragraph","content":[{"text":"For ","type":"text"},{"text":"create","type":"text","marks":[{"type":"strong"}]},{"text":" requests:","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Step","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Reference","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"1","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Context Lock — build datasourceConfig (type, instanceId, region)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step1-context-lock.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Query Config — build queryConfig (PromQL / APM measures / UModel entity)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step2-query-config.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"3","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Detection Config — build conditionConfig (P1-P4, threshold, duration)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step3-detection-config.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"4","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Webhook Query — call ","type":"text"},{"text":"list-alert-webhooks","type":"text","marks":[{"type":"code_inline"}]},{"text":", user selects; other types → console","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step5-preview-execute.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"5","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Preview & Execute — show summary → confirm → manage-alert-rules CLI","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step5-preview-execute.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Critical Rules","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Full details → ","type":"text"},{"text":"references/critical-rules.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Intent Routing","type":"text","marks":[{"type":"strong"}]},{"text":" — Route cloud resource metrics to CMS 1.0, Prometheus/APM/UModel to CMS 2.0. Never mix APIs.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CMS 2.0 API Enforcement","type":"text","marks":[{"type":"strong"}]},{"text":" — CMS 2.0 alert rules MUST ONLY be created via ","type":"text"},{"text":"ManageAlertRules","type":"text","marks":[{"type":"code_inline"}]},{"text":" and queried via ","type":"text"},{"text":"QueryAlertRules","type":"text","marks":[{"type":"code_inline"}]},{"text":". No other API (e.g. ","type":"text"},{"text":"PutResourceMetricRule","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"DescribeMetricRuleList","type":"text","marks":[{"type":"code_inline"}]},{"text":", ARMS ","type":"text"},{"text":"CreateOrUpdateAlertRule","type":"text","marks":[{"type":"code_inline"}]},{"text":", ARMS ","type":"text"},{"text":"CreatePrometheusAlertRule","type":"text","marks":[{"type":"code_inline"}]},{"text":") is permitted for CMS 2.0 alert rule creation or query. If ","type":"text"},{"text":"ManageAlertRules","type":"text","marks":[{"type":"code_inline"}]},{"text":" returns error, DO NOT fallback to other APIs — report the error to user and STOP execution. CLI format: ","type":"text"},{"text":"aliyun cms manage-alert-rules --body '{\"action\":\"CREATE\",...}'","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Contact/Webhook Query First","type":"text","marks":[{"type":"strong"}]},{"text":" — CMS 1.0: ","type":"text"},{"text":"DescribeContactGroupList","type":"text","marks":[{"type":"code_inline"}]},{"text":"; CMS 2.0: ","type":"text"},{"text":"ListAlertWebhooks","type":"text","marks":[{"type":"code_inline"}]},{"text":" is ","type":"text"},{"text":"MANDATORY before alert creation","type":"text","marks":[{"type":"strong"}]},{"text":". (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.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Resources Parameter","type":"text","marks":[{"type":"strong"}]},{"text":" — (CMS 1.0) ","type":"text"},{"text":"--resources","type":"text","marks":[{"type":"code_inline"}]},{"text":" must always be explicitly passed.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Workspace Required","type":"text","marks":[{"type":"strong"}]},{"text":" — (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.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Prometheus Required Params","type":"text","marks":[{"type":"strong"}]},{"text":" — (CMS 2.0) ","type":"text"},{"text":"cluster_id","type":"text","marks":[{"type":"code_inline"}]},{"text":" (instanceId) + ","type":"text"},{"text":"workspace","type":"text","marks":[{"type":"code_inline"}]},{"text":" ","type":"text"},{"text":"MUST ASK USER","type":"text","marks":[{"type":"strong"}]},{"text":" 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.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"APM Required Params","type":"text","marks":[{"type":"strong"}]},{"text":" — (CMS 2.0) ","type":"text"},{"text":"service_id","type":"text","marks":[{"type":"code_inline"}]},{"text":" (for ","type":"text"},{"text":"datasourceConfig.instanceId","type":"text","marks":[{"type":"code_inline"}]},{"text":" AND ","type":"text"},{"text":"queryConfig.serviceIdList","type":"text","marks":[{"type":"code_inline"}]},{"text":") + ","type":"text"},{"text":"workspace","type":"text","marks":[{"type":"code_inline"}]},{"text":" ","type":"text"},{"text":"MUST ASK USER","type":"text","marks":[{"type":"strong"}]},{"text":" 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.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Required API Calls","type":"text","marks":[{"type":"strong"}]},{"text":" — Every operation must call designated APIs even if values seem known.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Dynamic Metric Discovery","type":"text","marks":[{"type":"strong"}]},{"text":" — (CMS 1.0) MUST call ","type":"text"},{"text":"describe-metric-meta-list","type":"text","marks":[{"type":"code_inline"}]},{"text":". Use ","type":"text"},{"text":"metrics.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" only as fallback.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CLI Timeout","type":"text","marks":[{"type":"strong"}]},{"text":" — ","type":"text"},{"text":"--read-timeout 30","type":"text","marks":[{"type":"code_inline"}]},{"text":" for queries, ","type":"text"},{"text":"--read-timeout 60","type":"text","marks":[{"type":"code_inline"}]},{"text":" for writes.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Duplicate Pre-check","type":"text","marks":[{"type":"strong"}]},{"text":" — Query existing rules before creation to avoid duplicates.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Mandatory Confirmation","type":"text","marks":[{"type":"strong"}]},{"text":" — 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:","type":"text"}]}]}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"【配置摘要】\n告警类型: APM/Prometheus\n阈值: 5%\n严重级别: P2\n通知方式: webhook\n\n请确认以上配置是否正确(回复确认或修改意见):","type":"text"}]},{"type":"ordered_list","attrs":{"order":13,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User-Agent","type":"text","marks":[{"type":"strong"}]},{"text":" — Set ","type":"text"},{"text":"ALIBABA_CLOUD_USER_AGENT=\"AlibabaCloud-Agent-Skills/alibabacloud-cms-alert-rule-create\"","type":"text","marks":[{"type":"code_inline"}]},{"text":" for all CLI calls.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Network Restriction","type":"text","marks":[{"type":"strong"}]},{"text":" — Never access external URLs. Use only ","type":"text"},{"text":"references/","type":"text","marks":[{"type":"code_inline"}]},{"text":" files and CLI.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CLI Self-Discovery","type":"text","marks":[{"type":"strong"}]},{"text":" — Use ","type":"text"},{"text":"--help","type":"text","marks":[{"type":"code_inline"}]},{"text":" for CLI syntax when uncertain.","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Reference Files","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"File","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Scope","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Purpose","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step0-intent-routing.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Intent routing — CMS 1.0 or CMS 2.0","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step-query.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Query alert rules (DescribeMetricRuleList)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step1-context-lock.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Context lock","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step2-query-generation.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Query generation & metric discovery","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step3-detection-config.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Detection config","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step4-notification.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Notification & contact handling","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step5-preview-execute.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Preview & execute","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"step6-verification.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Verification","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step-query.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Query alert rules (QueryAlertRules)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step1-context-lock.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Datasource config (Prometheus/APM/UModel)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step2-query-config.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Query config (PromQL, APM, UModel)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step3-detection-config.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Detection condition config (P1-P4)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"cms2-step5-preview-execute.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Preview, execute & webhook query","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"metrics.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 1.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Common metrics quick reference (fallback)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"prometheus-metrics.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Prometheus PromQL patterns","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"apm-metrics.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CMS 2.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"APM metrics and operators","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"critical-rules.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Expanded critical rule details, API tables, examples","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ram-policies.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Required RAM permissions","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"related_apis.yaml","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"API lookup before CLI calls","type":"text"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Cleanup (After Execution)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"aliyun configure ai-mode disable","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"alibabacloud-cms-alert-rule-create","author":"@skillopedia","source":{"stars":133,"repo_name":"alibabacloud-aiops-skills","origin_url":"https://github.com/aliyun/alibabacloud-aiops-skills/blob/HEAD/skills/middleware/cms/alibabacloud-cms-alert-rule-create/SKILL.md","repo_owner":"aliyun","body_sha256":"1ef89803320309a4390a43e15eab61dfc5d72603d98de1e30de13d5b912dae37","cluster_key":"6e83625adf2caab5055b08afbee15a91eef09c23cdd98ff58272a16d94037d1d","clean_bundle":{"format":"clean-skill-bundle-v1","source":"aliyun/alibabacloud-aiops-skills/skills/middleware/cms/alibabacloud-cms-alert-rule-create/SKILL.md","attachments":[{"id":"8c4bfa3d-6c76-558e-8b08-c5fc7dea2da8","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/8c4bfa3d-6c76-558e-8b08-c5fc7dea2da8/attachment.md","path":"references/apm-metrics.md","size":6909,"sha256":"667a4ca0c3a46e5d88a52ca19e84e02e24cbdeca2f24ca968115025334c07162","contentType":"text/markdown; charset=utf-8"},{"id":"0fa786a4-feff-5035-8fbe-de5a94682cca","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0fa786a4-feff-5035-8fbe-de5a94682cca/attachment.md","path":"references/cms2-step-query.md","size":5299,"sha256":"c442c0fbbb0c2775589ccbc58ea2d34121a4bd423bbdfcff95a307a3ed940b44","contentType":"text/markdown; charset=utf-8"},{"id":"2b117c21-3589-5df1-ab2c-8dfc7128664b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/2b117c21-3589-5df1-ab2c-8dfc7128664b/attachment.md","path":"references/cms2-step1-context-lock.md","size":3821,"sha256":"da8ff5273dfdfde457231b1d80a6328791d8b95ed0a9b0215dbde2bd9492194c","contentType":"text/markdown; charset=utf-8"},{"id":"faac164a-deec-5859-b355-2347fea5b87d","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/faac164a-deec-5859-b355-2347fea5b87d/attachment.md","path":"references/cms2-step2-query-config.md","size":4668,"sha256":"30dd40758da6ed7c509f2c51b7e4eafe6dfe1c0e5ebc7b422f6939165e6df1ef","contentType":"text/markdown; charset=utf-8"},{"id":"7058b00c-87f0-54f0-8662-c59d13b102b5","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7058b00c-87f0-54f0-8662-c59d13b102b5/attachment.md","path":"references/cms2-step3-detection-config.md","size":3445,"sha256":"39cbb920ea0a53a01c30831b88dbf20c1547be91a19c1a8f3319f955207058c8","contentType":"text/markdown; charset=utf-8"},{"id":"f73b3c6f-1141-51f1-ac9b-0737b20eb4d1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f73b3c6f-1141-51f1-ac9b-0737b20eb4d1/attachment.md","path":"references/cms2-step5-preview-execute.md","size":7849,"sha256":"6eff91595aa66feff9c594ec7870a561482ef9f7a0662adb541e137c00f563fb","contentType":"text/markdown; charset=utf-8"},{"id":"e446e3d4-b495-5c54-9a8a-f5773c5e5948","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/e446e3d4-b495-5c54-9a8a-f5773c5e5948/attachment.md","path":"references/critical-rules.md","size":12856,"sha256":"0619110c5c7668f9308cc651efc614c40f9103fee388ae99dbee64e1e4f9fce7","contentType":"text/markdown; charset=utf-8"},{"id":"1eaa0fb8-1b21-507f-953c-c4842d42bebf","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/1eaa0fb8-1b21-507f-953c-c4842d42bebf/attachment.md","path":"references/metrics.md","size":13391,"sha256":"976686de6e45087ec240a7359c284aff183334591e9dc893035ef94afa59d78a","contentType":"text/markdown; charset=utf-8"},{"id":"cee7f49c-163e-5f77-80d5-6f6a51c3a203","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/cee7f49c-163e-5f77-80d5-6f6a51c3a203/attachment.md","path":"references/prometheus-metrics.md","size":5937,"sha256":"e4863099efa105a0d743ef104c9c242eae194b687c742a9faa23b421e214aeb8","contentType":"text/markdown; charset=utf-8"},{"id":"5f3be186-ecba-5652-855f-e1269a364a5e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5f3be186-ecba-5652-855f-e1269a364a5e/attachment.md","path":"references/ram-policies.md","size":1551,"sha256":"91ec08425613130bc7ceeffcb22b5a52b0b10259e76111ed32f1cbf2c555a077","contentType":"text/markdown; charset=utf-8"},{"id":"12b63a13-8ecf-5023-9fbe-b6b7d3ee3241","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/12b63a13-8ecf-5023-9fbe-b6b7d3ee3241/attachment.md","path":"references/step-query.md","size":2257,"sha256":"dc62e3b983c1e4465b9b403f9b207d489a0d554e10f721138f21295b3026f67d","contentType":"text/markdown; charset=utf-8"},{"id":"62f5dc68-988c-543b-9821-2c99fe535f2f","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/62f5dc68-988c-543b-9821-2c99fe535f2f/attachment.md","path":"references/step0-intent-routing.md","size":5711,"sha256":"f7db522ba787e2d1aac2e7593fcfd987735bf9e6fd46ae39c331182a6f7ce905","contentType":"text/markdown; charset=utf-8"},{"id":"637e4fba-bca9-550f-8583-e69a59e2c8f4","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/637e4fba-bca9-550f-8583-e69a59e2c8f4/attachment.md","path":"references/step1-context-lock.md","size":4402,"sha256":"d4a9e335ddb28d0227d4938f8782373dcb9f64558ff899a9fc0136a3ff2a355b","contentType":"text/markdown; charset=utf-8"},{"id":"467711fa-04e6-5328-b1a7-cda1a5e5910c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/467711fa-04e6-5328-b1a7-cda1a5e5910c/attachment.md","path":"references/step2-query-generation.md","size":2623,"sha256":"77d00c9ab57477309c466f7ebc4330471c3211a16fec415d4cbe9501df9c5e9f","contentType":"text/markdown; charset=utf-8"},{"id":"89f206f2-b82d-505f-84c2-76607738f054","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/89f206f2-b82d-505f-84c2-76607738f054/attachment.md","path":"references/step3-detection-config.md","size":1461,"sha256":"8e08fe04b35da4279286c2828b22821c31634abfa596cec8350c2f031b9d98da","contentType":"text/markdown; charset=utf-8"},{"id":"068b6b31-3d6f-52d4-99a8-4e113c36fd9e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/068b6b31-3d6f-52d4-99a8-4e113c36fd9e/attachment.md","path":"references/step4-notification.md","size":2661,"sha256":"027f8d1031d0b752b0c43046d40c106227864b3323e0e303f43a2ae4a9f24b9e","contentType":"text/markdown; charset=utf-8"},{"id":"d0b7d786-3e4d-5a4a-a626-c4ee7443cab7","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d0b7d786-3e4d-5a4a-a626-c4ee7443cab7/attachment.md","path":"references/step5-preview-execute.md","size":4711,"sha256":"68790ca87376a05a864e65c1962d3964e13530c3648bac7b07dabdc9ccb70758","contentType":"text/markdown; charset=utf-8"},{"id":"7666c17a-1b33-5ea8-92d3-41ff9ef0deda","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7666c17a-1b33-5ea8-92d3-41ff9ef0deda/attachment.md","path":"references/step6-verification.md","size":1314,"sha256":"ad23157355986eb55a4a3f4b56457fb0aba859369d00ecffd058d72d6932cfc7","contentType":"text/markdown; charset=utf-8"},{"id":"f92537df-fe5d-51a2-917c-cbb8d8187534","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f92537df-fe5d-51a2-917c-cbb8d8187534/attachment.sh","path":"scripts/validate-params.sh","size":6585,"sha256":"a000c80f280bb061373b6a1d1798c8f3206f78cbd3219d048939e2876211040b","contentType":"application/x-sh; charset=utf-8"}],"bundle_sha256":"d1e6c7a52924619e1de5a8226fd01dc6ab15656aa72deeffae41c1c636d8e76c","attachment_count":19,"text_attachments":19,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/middleware/cms/alibabacloud-cms-alert-rule-create/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"devops-infrastructure","category_label":"DevOps"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"devops-infrastructure","import_tag":"clean-skills-v1","description":"Create and query Alibaba Cloud alert rules via CLI. Supports CMS 1.0 cloud resource \nmonitoring (ECS, RDS, SLB, etc.) and CMS 2.0 advanced monitoring (Prometheus, APM, UModel).\nIntent routing automatically selects the correct workflow based on alert type.\nUse this skill when users mention: create alert, setup monitoring, configure alarm, \nECS/RDS/SLB alert, Prometheus alert, PromQL, K8s monitoring, APM alert, UModel alert,\nlist alerts, query rules, 告警规则, 创建告警, 监控报警, Prometheus告警, 应用监控, 查看告警.\n"}},"renderedAt":1782981565449}

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) --- Step 0: Intent Routing Identify user's monitoring target → route to the correct workflow. See . | 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 | |---------|------|---------…