用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/GuanceCloud/ai-skills --skill alert-manager命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | alert_manager |
| author | liurui |
| description | Convert Prometheus alerting rules into Guance monitor JSON and validate all generated DQL. |
Use this skill when the user wants to convert Prometheus alerting rules into Guance monitor configuration.
The input must be an alerting rule definition with fields such as alert, expr, for, labels, and annotations. Do not treat Alertmanager routing configuration such as route, receivers, inhibit_rules, or mute_time_intervals as convertible monitor rules.
Before writing DQL, confirm the metric mapping:
| Required field | Purpose |
|---|---|
component | Output directory and stable monitor identity |
source_metric | Metric name in the source rule |
dataSource | Guance data source or measurement |
field | Guance field name |
groupBy | Monitor grouping tag |
fieldType | Field data type |
fieldFunc | Recommended aggregation function |
If any key mapping is missing, stop and ask for the missing mapping instead of inventing DQL.
monitor skill.checkers[].jsonScript.targets[].dql and checkers[].extend.querylist[].query.q for each rule.checkerOpt.rules and extend.rules synchronized.dqlcheck before final output.Map labels.severity to Guance statuses when possible: critical, warning, error, or info. If severity is missing, default to critical and state that the value was defaulted.
Stop instead of guessing when the expression uses multi-metric binary operations, complex and or or expressions, label_replace, histogram_quantile, complex subqueries, unknown recording rules, or rate semantics that cannot be safely mapped.
基于 SOC 职业分类