executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
byted-volcengine-alert-inspection-analyzer面向日常运维巡检场景,对告警、体检等信息进行按日采集、结构化沉淀和周期输出(日报/周报/月报)。
Independent GitHub snapshot · Automated classification · Original documentation governs
把“飞书群告警消息拉取 + 过滤 + 去重 + 事件聚合 + 风险分析 + 报告输出”固化为标准技能。
当用户提出以下类型需求时使用本技能:
至少需要以下三类信息:
chat_id:飞书群 ID,例如 oc_xxxtime:时间范围
today、yesterday、last_24_hours、this_weekstart_time + end_time,ISO 8601 格式,例如 2026-06-05T00:00:00+08:00bot:机器人标识
bot_sender_id / app id,例如 cli_xxx可选信息:
output_dir:输出目录,默认 output/alert_inspection_<日期>_<chat_id>/report_format:json、markdown,默认同时生成keyword:内容关键词过滤,例如“火山引擎云监控告警通知”chat_id、time 或 bot 时,先向用户补齐。start_time + end_time。优先使用 feishu_im_user_get_messages 工具:
{
"chat_id": "oc_xxx",
"start_time": "2026-06-05T00:00:00+08:00",
"end_time": "2026-06-05T23:59:59+08:00",
"page_size": 50,
"sort_rule": "create_time_asc"
}
分页规则:
has_more=true,继续使用 page_token 拉取下一页。message_id 去重。过滤优先级:
bot_sender_id:按 sender.id 精确过滤。sender.sender_type == app 的候选 sender id。filter_mode=identified_sender_id。filter_mode=keyword_only,说明可能不完整或不精确。使用 scripts/alert_inspection.py 对原始消息 JSON 做标准化。标准字段:
message_idcreate_timestatus:警告 / 已恢复 / 严重 / 未知policyresourcemetriccurrent_valuecontentsender从飞书卡片内容中尽量提取:
分析维度:
风险判断建议:
默认输出到:
output/alert_inspection_<YYYY-MM-DD>_<chat_id>/
应生成:
raw_messages.json:原始消息normalized_messages.json:标准化消息analysis.json:统计与分析结构化数据report.md:面向用户的中文分析报告run_meta.json:运行元数据如用户要求发送压缩包,则将输出目录打包为 .zip 后用 message 工具发送。
将工具返回结果保存为原始 JSON:
python scripts/alert_inspection.py \
--input raw_messages.json \
--chat-id oc_xxx \
--bot-name 云告警通知 \
--start-time 2026-06-05T00:00:00+08:00 \
--end-time 2026-06-05T23:59:59+08:00 \
--output-dir output/alert_inspection_2026-06-05_oc_xxx
feishu_im_user_get_messages 按群和时间分页拉取。raw_messages.json。scripts/alert_inspection.py 生成分析文件。message 工具发送,不要只返回 MEDIA: 标签。已完成告警巡检分析。
结果摘要:
- 时间范围:...
- 命中消息:... 条
- 警告:... 条,恢复:... 条,未闭环:... 条
- 主要资源:...
- 风险等级:...
- 输出目录:...
核心判断:...
建议:...
message 工具发送本地绝对路径。