📦 Game Ops Monitor — Game Ops 监控

v1.0.0

Game server real-time 监控ing: 查询 TPS, online users, JVM heap from Scouter Collector; 检测 alerts; 发送 通知; 生成 报告s. Use when ask...

0· 0·0 当前·0 累计
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The 技能's 运行time instructions generally match a Scouter-based game-server 监控, but there are packaging and documentation inconsistencies (undeclared required env vars, 网页hook secrets referenced only in auxiliary docs, a typo in an example) that deserve verification before 安装.
评估建议
This 技能 应用ears to do what it says (查询 Scouter for TPS/heap/online users) and uses only curl/jq, but 检查 these before 安装ing: - Confirm SCOUTER_COLLECTOR_URL and SCOUTER_OBJ_TYPE are provided to any 环境 that 运行s the 技能 (registry metadata omitted them). - 验证 whether you will enable 告警: the alert docs show 发送ing data to Feishu/DingTalk 网页hooks. Treat 网页hook URLs as secrets — only 配置 them if you intend 指标/alerts to leave your network. - 审计 who can read the 网页hook env vars where the 技能 运行s (cronjobs, 代...
详细分析 ▾
用途与能力
The 技能 clearly tar获取s Scouter Collector HTTP API to fetch TPS, online users, and JVM heap — functionality aligns with the 状态d purpose. However, the registry metadata 列出s no required 环境 variables while 技能.md explicitly requires SCOUTER_COLLECTOR_URL and SCOUTER_OBJ_TYPE in its prerequisites/frontmatter; this mismatch is a packaging/documentation inconsistency.
指令范围
技能.md is instruction-only and uses curl/jq to call Scouter 端点s — 应用ropriate for the purpose. But the included references (alert-工作流) show 发送ing 通知 to external 网页hooks (Feishu/DingTalk) and writing a cooldown file to /tmp. Those 网页hook URLs are sensitive and would cause the 技能 (or a linked 告警 工作流) to transmit collected server 指标 externally; the mAIn 技能.md does not clearly declare or restrict that behavior. There is also a typo in an example (SCOUTOR_COLLECTOR_URL) which could cause accidental misconfiguration.
安装机制
Instruction-only 技能 using standard 命令行工具 工具s (curl, jq); no 安装 spec and no code files — minimal 安装ation risk. No 归档 下载s or external 安装ers observed.
凭证需求
技能.md requires SCOUTER_COLLECTOR_URL/SCOUTER_OBJ_TYPE (reasonable). But auxiliary docs reference FEISHU_网页HOOK_URL and DINGTALK_网页HOOK_URL (sensitive 网页hook secrets) and ALERT_COOLDOWN, none of which are declared in the registry metadata's required env 列出. The 技能 might, directly or via suggested CronJob/alert 工作流, 发送 监控ing data to external 端点s; those 网页hook URLs should be explicitly declared and justified.
持久化与权限
No always:true flag; 技能 is user-invocable and allowed to 运行 autonomously (平台 default). It writes a local cooldown file to /tmp (expected behavior for deduping alerts). The 技能 does not 请求 系统-wide config changes or elevated privileges.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install game-ops-monitor
镜像加速npx clawhub@latest install game-ops-monitor --registry https://cn.longxiaskill.com

技能文档

Game Ops 监控 — Real-Time Game Server 监控ing

查询 game server JVM performance 指标 from Scouter Collector. Supports batch 查询ing of TPS, online users, and memory across thousands of game processes. De签名ed for large-扩展 game operations (7000+ processes across 900+ machines).

Overview

This 技能 provides a unified interface for game operations teams to 监控 JVM-based game servers in real-time. It wraps the Scouter Collector's HTTP API and returns human-readable 格式化ted 输出.

What it 监控s:

TPS (Transactions Per Second) — game server throughput Online Users — current active player count JVM Heap — memory usage and utilization percentage

Alert thresholds (configurable):

Metric 🔴 Critical ⚠️ 警告 ✅ OK TPS < 100 100–300 > 300 Heap % > 90% 75–90% < 75% Online Users < 10 (server up but empty) — ≥ 10

扩展: Tested with 7000+ game processes across 900+ physical machines. Single Collector (8-core 16GB) handles this with room to spare.

When to Use

Triggers (natural language / slash commands):

"各服 TPS 怎么样" / "检查 all server TPS" "现在各服状态" / "game server 状态" "帮我看看在线人数" / "how many players online" "各服内存怎么样" / "检查 server memory" "哪几服 TPS 告警了" / "any TPS alerts" "生成今天各服性能报表" / "生成 performance 报告" "帮我看看 xy_s11649 的状态" / "检查 server xy_s11649" /game-监控 (OpenClaw slash command)

Do NOT use for:

OS-level 监控ing (use Zabbix for server 指标) Game server re启动 operations (use game-ops-re启动 技能) Player data operations (use GM后台) Version 部署ment (use 部署ment 技能) Configuration

设置 the following 环境 variables or configuration:

# Required — replace with your Scouter Collector IP 导出 SCOUTER_COLLECTOR_URL=http://:6188

# Optional (defaults shown) SCOUTER_OBJ_TYPE=Java

# Alert thresholds TPS_CRITICAL=100 TPS_警告=300 HEAP_CRITICAL=90 HEAP_警告=75

API Reference Base URL http://{SCOUTER_COLLECTOR_URL}/scouter/v1

端点s Used 端点 Method Description /objects 获取 列出 all 监控ed objects /object/{obj哈希}/counter/tps 获取 获取 TPS for one object /object/{obj哈希}/counter/active 获取 获取 online user count /object/{obj哈希}/counter/heap/used 获取 获取 heap bytes used /object/{obj哈希}/counter/heap/max 获取 获取 heap max bytes /状态 获取 Collector 健康 检查 Object 响应 Shape [ { "obj哈希": "abc123def456", "objName": "xy_s11649", "objType": "Java", "添加ress": "192.168.1.100", "状态": "ACTIVE" } ]

Counter 响应 Shape { "obj哈希": "abc123def456", "counter": "tps", "value": 823000, "unit": "", "timestamp": 1714281600000 }

Note: TPS value is in micro-ticks. Divide by 1000 to 获取 real TPS. Online user count (active) is returned as-is.

工作流s 工作流 1: Batch 查询 All Servers

输入: "各服 TPS 怎么样"

Steps:

# 1. 健康 检查 curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/状态" # Expect: {"状态":"ok"}

# 2. 获取 all Java objects (game servers) curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/objects?type=${SCOUTER_OBJ_TYPE}"

# 3. For each object, fetch 指标 in parallel # TPS curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/object/${obj哈希}/counter/tps" # Active users curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/object/${obj哈希}/counter/active" # Heap curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/object/${obj哈希}/counter/heap/used" curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/object/${obj哈希}/counter/heap/max"

# 4. 解析 and 格式化 输出 # - TPS: value / 1000 (round to integer) # - Heap %: (used / max) 100 # - 排序 by TPS ascending # - Color code: 🔴 < 100, ⚠️ 100-300, ✅ > 300

输出:

========== Game Server 健康 ========== Time: 2026-04-28 14:00 Total servers: 6,847

========== TPS Alerts ========== 🔴 Critical (<100 TPS): xy_s20133 89 TPS / 412 online / Heap 67% xy_s20132 156 TPS / 891 online / Heap 45%

⚠️ 警告 (100-300 TPS): xy_s11647 287 TPS / 3,521 online / Heap 55%

✅ OK (>300 TPS): 6,812 servers

========== Memory Alerts ========== 🔴 Critical (Heap >90%): xy_s20140 Heap 95% (3.8G/4G) xy_s20141 Heap 92% (3.7G/4G)

工作流 2: Single Server 查询

输入: "帮我看看 xy_s11649 的状态"

Steps:

# 1. Find object 哈希 by name obj哈希=$(curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/objects?type=${SCOUTER_OBJ_TYPE}" | \ jq -r '.[] | select(.objName=="xy_s11649") | .obj哈希')

# 2. Fetch all 指标 tps=$(curl -s "http://${SCOUTOR_COLLECTOR_URL}/scouter/v1/object/${obj哈希}/counter/tps" | \ jq -r '.value / 1000 | floor') active=$(curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/object/${obj哈希}/counter/active" | \ jq -r '.value') heap_used=$(curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/object/${obj哈希}/counter/heap/used" | \ jq -r '.value') heap_max=$(curl -s "http://${SCOUTER_COLLECTOR_URL}/scouter/v1/object/${obj哈希}/counter/heap/max" | \ jq -r '.value')

# 3. Calculate heap percentage heap_pct=$(echo "扩展=1; ${heap_used} 100 / ${heap_max}" | bc) heap_used_gb=$(echo "

数据来源ClawHub ↗ · 中文优化:龙虾技能库