minecraft-monitor

TotalClaw 作者 totalclaw

通过使用服务器列表 Ping 协议检查在线状态、玩家数量、延迟和版本信息来监控 Minecraft 服务器。当用户要求检查 Minecraft 服务器状态、监视 Minecraft 服务器、验证服务器是否在线、获取玩家计数或提及 Minecraft 服务器监视时使用。示例服务器包括 corejourney.org。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~wmantly-minecraft-monitor-skill
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~wmantly-minecraft-monitor-skill/file -o wmantly-minecraft-monitor-skill.md
## 概述(中文)

通过使用服务器列表 Ping 协议检查在线状态、玩家数量、延迟和版本信息来监控 Minecraft 服务器。当用户要求检查 Minecraft 服务器状态、监视 Minecraft 服务器、验证服务器是否在线、获取玩家计数或提及 Minecraft 服务器监视时使用。示例服务器包括 corejourney.org。

## 原文

# Minecraft Server Monitoring

Quickly check Minecraft server status without installing any external dependencies.

## Quick Check

Check if a server is online:

```bash
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py corejourney.org
```

```
🟢 corejourney.org:25565 - ONLINE (45ms)
   Version: 1.20.4
   Players: 3/20
   Online: Steve, Alex, CreeperHunter
   MOTD: Welcome to Core Journey!
```

## Usage

```bash
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py <host[:port]> [timeout]
```

- **host**: Server hostname or IP address (e.g., `corejourney.org`, `192.168.1.10`)
- **port**: Optional, defaults to `25565`
- **timeout**: Optional connection timeout in seconds (default: 5)

### Examples

```bash
# Check default port
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py corejourney.org

# Check custom port
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py corejourney.org:25566

# Check IP with longer timeout
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py 192.168.1.10 10
```

## Output

**Online server:**
- 🟢 Green (good ping) / 🟡 Yellow (moderate) / 🟠 Orange (slow)
- Server address and port
- Response time in milliseconds
- Minecraft version
- Current/maximum player count
- List of online players (up to 5 shown)
- Server MOTD (message of the day)

**Offline server:**
- 🔴 Red indicator
- Error message (timeout, connection refused, etc.)

## What's Being Monitored

- ✅ Online/offline status
- ✅ Player count (current/max)
- ✅ Response time/latency
- ✅ Server version
- ✅ Online player list (if available)
- ✅ Server MOTD

## Notes

- Uses Minecraft Server List Ping (SLP) protocol - works with all modern Minecraft servers
- No server-side plugins or RCON access required
- Exit code 0 if online, 1 if offline (useful for scripts/automation)
- SRV records are not automatically resolved - use the actual server address

## Integration Ideas

- Add to a cron job for periodic health checks
- Wrap in a monitoring script that alerts if server goes offline
- Use in automation pipelines that depend on server availability
- Create a dashboard showing server status history