用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/clcc2019/dsflow --skill kong-gateway-analyzer命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Calculate incident impact, detection and recovery durations, classify incidents as L0-L3 from service criticality and impact inputs, compute weighted SLA impact and derived availability, and generate post-incident Markdown reports. Use for SLA calculations, incident severity assessment, outage-duration review, availability summaries, postmortems, incident reports, and remediation tracking.
云原生 SRE 值班助理和巡检编排技能。用于基础设施早检、Kubernetes 集群健康检查、Ceph 存储巡检、计算集群巡检、网关故障初筛、异常证据汇总和值班日报生成。触发场景:用户要求早检、巡检、检查集群是否正常、检查 Ceph、检查计算集群、排查网关错误或生成基础设施健康报告。
Create, review, tune, and validate production-grade Prometheus alerting rules and Kubernetes PrometheusRule resources. Use when writing or repairing alert rule YAML, designing PromQL alert expressions, recommending defensible thresholds and for durations, building SLO/error-budget burn-rate alerts, reducing alert noise, standardizing severity/labels/annotations, adding promtool tests, or reviewing an existing Prometheus rule catalog. 用户要求创建、评审或优化 Prometheus 告警规则、PromQL、告警阈值、告警降噪时使用。
基于 SOC 职业分类
正在显示 SKILL.md
| name | kong-gateway-analyzer |
| description | Kong 网关日志查询分析技能。 触发场景: - 查看 Kong 访问日志、排查 API 错误/超时 - 分析域名/路由/服务的流量和错误 - 分析请求延迟和性能瓶颈 反馈机制: 支持用户纠正和补充,持续改进 |
Kong 网关日志查询分析技能。脚本获取数据,Agent 负责分析。
# 查询域名日志
scripts/query_kong_logs.sh -c prod-cluster -H api.example.com -l 100
# 查询 5xx 错误
scripts/query_kong_logs.sh -c prod-cluster --status 5xx -t 1h
# 查询慢请求并统计
scripts/query_kong_logs.sh -c prod-cluster --slow 1000 -t 15m --analyze
关键参数:
| 参数 | 说明 | 默认 |
|---|---|---|
-c | 集群名称 (必需) | - |
-H | 域名过滤 | - |
-t | 时间范围 (5m/1h/24h) | 5m |
--status | 状态码 (200/4xx/5xx) | - |
--slow | 慢请求阈值(ms) | - |
--analyze | 统计分析模式 | false |
# 分析域名流量
scripts/analyze_traffic.sh -c prod-cluster -H api.example.com -t 10m
返回:QPS、状态码分布、延迟统计(p50/p95/p99)、Top URI、慢请求
scripts/diagnose_5xx_errors.sh -c prod-cluster -t 10m
scripts/diagnose_5xx_errors.sh -c prod-cluster -H api.example.com -t 1h
返回:错误总数、状态码分类、按上游/URI/域名分组、时间分布、样本
scripts/diagnose_slow_requests.sh -c prod-cluster --slow 1000 -t 10m
scripts/diagnose_slow_requests.sh -c prod-cluster -H api.example.com --slow 500
返回:慢请求数量占比、延迟分布、按上游/URI 分组、Top 20 慢请求、延迟来源分析
| 指标 | 正常 | 警告 | 严重 |
|---|---|---|---|
| 总响应时间 | <500ms | 500ms-2s | >2s |
| 上游响应时间 | <200ms | 200ms-1s | >1s |
| Kong 处理延迟 | <10ms | 10ms-50ms | >50ms |
| 5xx 错误率 | <0.1% | 0.1%-1% | >1% |
1. 诊断错误分布
scripts/diagnose_5xx_errors.sh -c prod-cluster -t 1h
2. 根据状态码分支
├─ 502 → 检查上游服务状态
├─ 504 → 使用慢请求诊断
└─ 500 → 检查上游服务日志
1. 诊断慢请求
scripts/diagnose_slow_requests.sh -c prod-cluster --slow 1000
2. 分析延迟来源
├─ upstream_caused_percent > 70% → 优化上游服务
└─ kong_time 占比高 → 检查 Kong 资源/插件
VictoriaLogs API: https://victorialogs.example.com
集群标签:
| 名称 | 标签 |
|---|---|
| 生产 | prod-cluster |
| 计算 | compute-cluster |
| 腾讯云 | tencent-cluster |
| 阿里云 | aliyun-cluster |
支持持续改进。发现问题请直接告知:
| 类型 | 示例 |
|---|---|
| 纠正 | "状态码字段应该是 status" |
| 补充 | "缺少 SSL 握手失败的错误模式" |
| 优化 | "排查流程需要补充..." |