text
~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py
OpenClaw's built-in cron executes the script periodically:
bash
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py
Trigger phrases: say "sync status", "restart sync" or "同步状态", "重启同步状态" — OpenClaw will trigger execution on schedule.
Use --fork to start a real background daemon:
CommandDescriptionpython3 scripts/status_uploader.py start --forkStart daemonpython3 scripts/status_uploader.py start --fork --interval 10Start with custom interval (minutes)python3 scripts/status_uploader.py stopStop servicepython3 scripts/status_uploader.py statusCheck service statuspython3 scripts/status_uploader.py set-interval <minutes>Set sync intervalpython3 scripts/status_uploader.py testSingle test upload
Examples:
bash
# Start daemon
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py start --fork
# Start with 10-minute interval
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py start --fork --interval 10
Triggers when any of the following conditions are met:
start --forkAdditional triggers: say "start status-monitor service", "restart status-monitor service" or "启动status-monitor服务", "重启status-monitor服务".
When the skill runs, first check for the token in these locations:
MONITOR_PLATFORM_TOKEN~/.openclaw/credentials/openclaw-status-monitor.jsonIf no token is found, guide the user to register/login:
Prompt the user: text
No monitoring token found. Let me help you set up...
Please choose a sign-in method:
Existing user: visit https://openclaw-agent-monitor.vercel.app and click Sign In
New user: visit https://openclaw-agent-monitor.vercel.app and click Sign Up
After signing in:
2. **Wait for user to reply with token**
3. **Save the token**:
- Create directory `~/.openclaw/credentials/`
- Save to `~/.openclaw/credentials/openclaw-status-monitor.json`:
json
```json
{
"agentToken": "user-provided-token",
"createdAt": "2026-03-29T10:00:00.000Z",
"monitorUrl": "https://openclaw-agent-monitor.vercel.app"
}
```
4. **Validate the token**
### Step 3: After Successful Token Validation
text
✅ Token configured successfully!
Starting upload service...
Monitor platform: https://openclaw-agent-monitor.vercel.app Upload interval: 5 minutes
Start command: python3 scripts/status_uploader.py start --fork
Management commands:
## Core Functions: Managing the Upload Script
### 1\. Check if Script Exists
bash
```bash
if [ -f ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py ]; then
echo "Script exists"
else
echo "Script not found"
fi
bash
# Start daemon with --fork (recommended)
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py start --fork --interval 10
bash
# Method 1: specify at startup
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py start --fork --interval 15
# Method 2: use set-interval command
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py set-interval 15
bash
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py stop
bash
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py status
text
~/.openclaw/logs/status_uploader_error.log
~/.openclaw/logs/status_uploader.log
bash
# View recent errors
tail -50 ~/.openclaw/logs/status_uploader_error.log
# View service logs
tail -50 ~/.openclaw/logs/status_uploader.log
Log rotation: log files auto-rotate when exceeding 10MB, format: status_uploader.20260329_183500.log
bash
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py test
The script only reads all agent IDs from openclaw.json and uploads them — it does not perform any offline detection.
Offline detection is handled by the monitoring platform (openclaw-agent-monitor):
lastActiveTimestamp based on upload time~/.openclaw/credentials/openclaw-status-monitor.json:
json
{
"agentToken": "e2d3262f-b626-4850-af11-5f2cb1c0dcad",
"createdAt": "2026-01-26T10:00:00.000Z",
"monitorUrl": "https://openclaw-agent-monitor.vercel.app",
"syncIntervalMinutes": 5
}
~/.openclaw/logs/status_uploader.log~/.openclaw/logs/status_uploader_error.log~/.openclaw/logs/status_uploader.pid~/.openclaw/credentials/openclaw-status-monitor.jsonDuring initialization:
text
❌ No monitoring token detected
Please complete these steps first:
1. Visit https://openclaw-agent-monitor.vercel.app
2. Click Sign In / Sign Up to log in or register
3. After logging in, generate an Agent Token on the Settings page
4. Send me the token
Example: My token is abc123-def456...
text
❌ Upload script not found
Please reinstall the skill or contact the developer.
Check the error log:
text
cat ~/.openclaw/logs/status_uploader_error.log
Common errors:
text
❌ Token validation failed
Your token may have expired or is invalid.
Please obtain a new token:
1. Log in to https://openclaw-agent-monitor.vercel.app
2. Go to the Settings page
3. Click Generate to create a new Token
4. Send me the new token
User: 启用状态监控 / enable status monitor Agent: Checking monitoring configuration...
❌ No Agent Token detected
Please complete these steps first:
User: 我的 Token 是 e2d3262f-b626-4850-af11-5f2cb1c0dcad / My token is e2d3262f-b626-4850-af11-5f2cb1c0dcad Agent: Validating token...
✅ Token validated successfully!
Starting upload service...
✅ Status monitor enabled!
Management commands:
User: 查看状态监控 / check status monitor Agent: Checking upload service status...
✅ Service is running PID: 12345 Sync interval: 5 minutes Log file: ~/.openclaw/logs/status_uploader.log
Recent logs:
text
2026-03-29 10:30:01 - INFO - Upload success: ['main', 'coding']
2026-03-29 10:35:02 - INFO - Upload success: ['main', 'coding']
Error log: none
User: 停止状态监控 / stop status monitor Agent: Stopping upload service...
✅ Service stopped
To restart, say "start status monitor" / "启动状态监控".
User: 同步状态 / sync status Agent: Executing manual upload...
Online agents: ['main', 'coding'] Upload result: ✅ Success
User: 重启状态监控 / restart status monitor Agent: Restarting upload service...
✅ Service restarted, PID: 67890
User: 查看状态监控错误日志 / check status monitor error log Agent: Checking error logs...
Recent errors:
text
2026-03-29 09:15:03 - HTTP 401: Unauthorized
2026-03-29 09:20:01 - Network: [Errno 8] nodename nor servname provided
Suggestion: Check if the token is correct, or check your network connection.