360 Secure SkillHub
360 安全技能中心

API Health Monitor

核心功能:扫描指定目录下的近期OpenClaw会话日志,识别LLM API的500错误、令牌失效等异常模式,生成含健康状态、错误详情及建议的JSON报告。典型场景:开发者排查LLM API调用故障、日常监控API健康。调用checkApiHealth方法即可,无需额外输入,输出为结构化JSON对象。

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

安装技能

复制下面的话术发给你的 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