360 Secure SkillHub
360 安全技能中心

API Health Monitor

该 Skill 以 JavaScript 模块形式提供 checkApiHealth(),读取本机 OpenClaw 会话日志目录,匹配 500 错误、令牌失败、冷却、service_busy 等 LLM API 错误模式,返回含 healthy、errors、recommendation 的 JSON 健康报告。

toller892
toller892
热度 41.06
最近更新 2026-05-11 17:45:14
分类:数据依赖:读写文件 / 代码执行应用场景:报告撰写 / 数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add api-health-monitor
Metadata
name
api-health-monitor
description
Parses recent OpenClaw session logs for LLM API errors and returns a structured health report.

api-health-monitor

Scans ~/.openclaw/agents/main/sessions/ for recent LLM API error patterns (500 errors, token failures, cooldowns, service_busy) and produces a JSON health report.

Usage

const { checkApiHealth } = require('./skills/api-health-monitor');
const report = await checkApiHealth();
// { healthy: bool, errors: [...], recommendation: string }

Report Shape

Field Type Description
healthy boolean true if no errors found
errors array [{ type, message, count, lastSeen }]
recommendation string Suggested action based on findings