huawei-cloud-alarm-bind-inspection
Huawei Cloud alarm baseline configuration read and inspection analysis skill. Fetches all alarm rules for the current account via CES SDK and hcloud AOM CLI…
от huaweicloudskill438 установок в других каталогах
Установить huawei-cloud-alarm-bind-inspection в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Alarm Bind Inspection
Overview
Alarm bind inspection: fetches all alarm rules for the current account via CES (Cloud Eye Service) SDK and hcloud AOM CLI, extracts CES and AOM baseline metrics/events from the alarm baseline Excel, and compares and analyzes alarm binding status. Two merged analysis dimensions (CES + AOM data merged into the same tab, distinguished by a "monitoring system" column):
- Metric baseline: analyzes baseline metric binding rate per instance + metric dimension (CES metrics + AOM metrics; AOM services without core instances are skipped)
- Event baseline: analyzes baseline event binding rate per instance (CES events + AOM events; AOM services without core instances are skipped)
Uses AK/SK authentication (current account only, no multi-customer mode). AK/SK are read from environment variables (HW_ACCESS_KEY, HW_SECRET_KEY). Regions are auto-extracted from core_instances.json (multi-region supported). Project ID is auto-fetched via hcloud CLI per target region — no manual configuration needed.
Workflow
Step 1: Check Python Environment and Dependencies
- Check Python: run
python --version, confirm Python exists and version > 3.9 - Install dependencies:
python -m pip install -r requirements.txt
Prerequisites:
- Python version > 3.9
- AK/SK configured in environment variables (
HW_ACCESS_KEY,HW_SECRET_KEY) hcloudCLI available (used to auto-fetch Project ID)- Third-party dependencies: see
requirements.txt(includeshuaweicloudsdkces,huaweicloudsdkcore)
Step 2: Fetch All Instances via RMS API
python scripts/generate_instance.py
Fetches all cloud resource instances via RMS (Resource Management Service) API and converts them directly to core_instances.json format. No intermediate instances.json file is produced.
Flow:
CollectAllResourcesSummary— get resource overview (which provider+type pairs exist in the account)- Intersect with
PROVIDER_TYPES(indicator-baseline-supported provider+type list) - Concurrent
ListAllResourcesper provider.type (10 threads, auto-paginate) - In-memory convert: map each resource's
(provider, type)to service short name (e.g.ecs→ECS,vpc+publicips→EIP), filter sub-resources (e.g. RDS nodes/proxies), output{instance_id, raw_service, region}per instance
Pre-checks:
hcloudCLI available and configured with AK/SK- RMS API accessible in the target region
Output: <WORKSPACE_DIR>/intermediate/core_instances.json
Output structure:
{"source": "RMS API (generate_instance.py)", "instances": {"ECS": [...], "RDS": [...], ...}, "instance_counts": <total>}
Step 3: Enrich Core Instances with metric_dimension
python scripts/enrich_metric_dimension.py
Calls each service's ShowInstance API via hcloud CLI to fetch instance attributes (engine, cache_mode, type, etc.) and infer the most specific metric dimension route. Depends only on Step 2 (core_instances.json) — does not depend on alarm rules or baseline data. Dimension values are sourced from module-level constants (SINGLE_DIM_CONSTANTS, MULTI_DIM_CONSTANTS) and hcloud ShowInstance APIs.
metric_dimension is a single-value string representing the instance's most specific dimension route, e.g. "dcs_instance_id,dcs_cluster_redis_node". bind_analysis.py uses exact matching: a baseline dimension must exactly equal the instance's metric_dimension to be a hit (e.g. dcs_instance_id matches only instances with metric_dimension == "dcs_instance_id", not "dcs_instance_id,dcs_cluster_redis_node").
Service coverage (46 baseline services):
| Category | Services | Approach | API Calls |
|---|---|---|---|
| B single-dimension | 22 | Read unique dimension from module-level constants | 0 |
| C multi-dim + ShowInstance | 18 | Call hcloud ShowInstance to infer | 1 per instance |
| D multi-dim + indirect | 2 | GAUSSDB/ROMA indirect query or fallback | 1 per instance |
| A no hcloud | 4 | OBS uses bucket_name; MaaS not available | 0 |
Verified services:
- DCS: engine=Redis + cache_mode=ha →
dcs_instance_id,dcs_cluster_redis_node(22 baseline metrics) - ELB: ShowLoadBalancer/v3 includes
listeners[]andpools[]— no extra API needed - VPC/EIP: ShowPublicip/v3 includes
bandwidthobject — no extra API needed - EG: ShowDetailOfChannel does not include subscription info — sub-dimensions need extra API
- GAUSSDB: hcloud only has GaussMySql API, cannot query openGauss — fallback handling
- ROMA: ListMqsInstance requires
include_internalparam — fallback on 0 instances
Output: updates <WORKSPACE_DIR>/intermediate/core_instances.json
Step 4: Extract Alarm Baseline from Excel
python scripts/generate_alarm_baseline.py
Extracts two types of baseline data from the alarm baseline Excel:
CES指标基线sheet: filter by指标级别=底线指标, exclude records containing "环比" in column R (comparison relation), extract 19 columns
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-alarm-bind-inspection?
Huawei Cloud alarm baseline configuration read and inspection analysis skill. Fetches all alarm rules for the current account via CES SDK and hcloud AOM CLI, extracts CES and AOM baseline metrics/events from the alarm baseline Excel, compares and analyzes alarm binding status, and generates instance-level binding rate reports and remediation suggestions (Excel + HTML). Use this skill when the user needs to inspect alarm binding coverage, read alarm baselines, analyze alarm rules, or generate alarm binding reports. Triggers include: "告警基线", "告警配置", "告警阈值", "告警巡检", "告警绑定巡检", "alarm bind inspection", "读取告警基线", "生成告警JSON", "分析告警规则", "告警收敛", "CES告警", "AOM告警"
Как установить скилл huawei-cloud-alarm-bind-inspection?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-alarm-bind-inspection запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…