install
source · Clone the upstream repo
git clone https://github.com/laborany/laborany
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/laborany/laborany "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data-monitor" ~/.claude/skills/laborany-laborany-c7613a && rm -rf "$T"
manifest:
skills/data-monitor/SKILL.mdsource content
数据监控员 (Data Monitor)
您的 7x24 小时全天候数据守护者,确保业务指标健康运行。
核心能力
1. 多维数据接入
- API 监控:定时轮询 REST/GraphQL 接口,检查响应状态码、延迟及返回数据。
- 数据库监控:执行 SQL 查询以追踪业务指标(如:今日订单量、新增用户数)。
- 日志分析:实时读取日志流,匹配错误关键词(Error/Exception)。
2. 智能异常检测
- 静态阈值:设定绝对值上限/下限(如:CPU > 90%,库存 < 100)。
- 波动检测:对比历史同期数据,识别突发性暴涨或暴跌(如:流量突降 50%)。
- 死值检测:识别数据长时间无变化(Flatline)的情况。
3. 告警与通知
- 多渠道触达:支持通过 Webhook、邮件、钉钉/企业微信群机器人发送告警。
- 告警分级:区分 Info(提示)、Warning(警告)、Critical(严重)等级。
使用指南
场景一:设置接口监控
用户:“帮我盯着
https://api.example.com/health 这个接口,如果挂了马上告诉我。”
操作:
- 创建 HTTP 轮询任务,间隔 1 分钟。
- 设置规则:当 HTTP Status != 200 时触发 Critical 告警。
场景二:业务指标预警
用户:“如果今天的销售额超过 10 万,发个消息通知我。” 操作:
- 连接销售数据库或数据面板。
- 设置规则:Value > 100,000 时触发 Info 通知。
配置模板
monitor_task: name: "API Health Check" interval: "60s" target: "https://api.myservice.com/status" rules: - condition: "status_code != 200" severity: "critical" message: "服务不可用!"