360 Secure SkillHub
360 安全技能中心

Skylv Api Status Checker

核心功能:对指定API端点执行健康检查,依据响应状态码和耗时,判定健康、降级、缓慢等6种状态,达到预设阈值时触发告警。典型场景:当用户询问API是否可用,或调试API故障时使用。输入为API检查请求,输出包含状态结果及对应级别提示,帮助快速定位API问题。

sky-lv
sky-lv
热度 53.38
最近更新 2026-05-11 17:44:32
分类:自动化依赖:代码执行应用场景:自动化脚本 / 调试排错

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add skylv-api-status-checker
Metadata
name
skylv-api-status-checker
slug
skylv-api-status-checker
version
1.0.0
description
Checks API health and uptime. Monitors endpoints and validates responses. Triggers: check api status, api health, monitor uptime.
author
SKY-lv
license
MIT
tags
["automation","tools"]
keywords
["automation","tools"]
triggers
api-status-checker

API Status Checker

Overview

Monitors API endpoints for health and uptime.

When to Use

  • User asks to "check if API is up"
  • Debugging API failures

Status Evaluation

200 in <500ms = HEALTHY 200 in 500ms-2s = DEGRADED 200 in >2s = SLOW 4xx = CLIENT_ERROR 5xx = SERVER_ERROR Timeout = DOWN

Check Command

$result = Invoke-WebRequest -Uri "https://api.example.com/health" -Method GET -TimeoutSec 10 if ($result.StatusCode -eq 200) { "OK" } else { "FAIL: " + $result.StatusCode }

Alert Thresholds

  • Response time > 2s = WARNING
  • 5xx response = CRITICAL
  • Timeout = CRITICAL