status-monitor

Manages OpenClaw Agent status upload scripts, periodically syncing agent online status to the cloud monitoring platform

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 104 · 0 current installs · 0 all-time installs
byJax Hao Yang@yahao333
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the implementation: the Python script reads ~/.openclaw/openclaw.json to extract agent IDs and POSTs them to a monitor URL. No unrelated binaries, credentials or config paths are requested beyond what is needed to upload agent IDs and manage a local daemon.
Instruction Scope
SKILL.md instructions stay within scope: they describe checking for a token, guiding the user to obtain it, saving it under ~/.openclaw/credentials/openclaw-status-monitor.json, and running the included status_uploader.py in cron or daemon mode. The runtime instructions reference only the monitor URL, token locations, the openclaw.json agent list, logs, and PID files — all consistent with the stated task.
Install Mechanism
No install spec — instruction-only with a bundled Python script. No downloads from arbitrary URLs or package installs. The code file is present in the skill bundle (scripts/status_uploader.py) and is not obfuscated.
Credentials
Registry metadata declares no required env vars/primary credential, but the script and SKILL.md reference MONITOR_PLATFORM_TOKEN (and optionally OPENCLAW_MONITOR_URL). The token is the expected credential for this function, but the registry metadata does not declare it — minor inconsistency. The script stores the token in plaintext under ~/.openclaw/credentials and will use it in an x-agent-token header; this is expected but sensitive.
Persistence & Privilege
Skill is not always:true and is user-invocable. It writes only its own credential/config and log/pid files under ~/.openclaw; it does not modify other skills or system-wide settings. Daemon behavior and forking are expected for a periodic uploader.
Assessment
This skill is coherent: it periodically reads your OpenClaw agent list and uploads agent IDs to the dashboard at https://openclaw-agent-monitor.vercel.app (or an override URL). Before installing: 1) Confirm you trust the dashboard operator and domain — the skill will store an agent token in plaintext under ~/.openclaw/credentials and use it to authenticate uploads. 2) Review the contents of ~/.openclaw/openclaw.json to ensure only non-sensitive agent IDs are being uploaded. 3) If you prefer not to store a token in a file, avoid starting the daemon and instead run one-off uploads manually. 4) Note the small metadata mismatch: the registry lists no required env vars but the script honors MONITOR_PLATFORM_TOKEN and OPENCLAW_MONITOR_URL — treat those as the actual credentials/config the skill expects. If you are unsure about trusting the remote service, do not provide the token or install the daemon.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.5
Download zip
latestvk971bkwpef8yg5zfh26ssg5ta183x7e8

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Script Location

~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py

Two Running Modes

Mode 1: Cron Scheduled Sync (Default)

OpenClaw's built-in cron executes the script periodically:

python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py

Trigger phrases: say "sync status", "restart sync" or "同步状态", "重启同步状态" — OpenClaw will trigger execution on schedule.

Mode 2: Daemon Mode

Use --fork to start a real background daemon:

CommandDescription
python3 scripts/status_uploader.py start --forkStart daemon
python3 scripts/status_uploader.py start --fork --interval 10Start with custom interval (minutes)
python3 scripts/status_uploader.py stopStop service
python3 scripts/status_uploader.py statusCheck service status
python3 scripts/status_uploader.py set-interval <minutes>Set sync interval
python3 scripts/status_uploader.py testSingle test upload

Examples:

# 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

Trigger Conditions

Triggers when any of the following conditions are met:

  1. First-time initialization: say "enable status monitor", "setup status-monitor" or "启用状态监控", "开启监控同步", "配置 status-monitor"
  2. Manual trigger: say "sync status", "sync status-monitor", "upload status" or "同步状态", "同步 status-monitor", "上传状态" → single execution
  3. Scheduled sync: OpenClaw cron triggers → single execution
  4. Check status: say "check status monitor", "monitor status", "check upload service" or "查看状态监控", "状态监控状态", "检查上传服务"
  5. Stop service: say "stop status monitor", "stop upload service" or "停止状态监控", "停止上传服务"
  6. Change interval: say "sync every 10 minutes", "change to 15 minutes" or "每10分钟同步一次", "改成15分钟"
  7. Daemon mode: say "start status monitor", "start daemon", "run in background" or "启动状态监控", "启动守护进程", "后台运行" → execute start --fork

Additional triggers: say "start status-monitor service", "restart status-monitor service" or "启动status-monitor服务", "重启status-monitor服务".

Initialization Flow (Must Execute on First Use)

Step 1: Check Token Configuration

When the skill runs, first check for the token in these locations:

  1. Environment variable MONITOR_PLATFORM_TOKEN
  2. File ~/.openclaw/credentials/openclaw-status-monitor.json

Step 2: Handling Missing Token

If no token is found, guide the user to register/login:

  1. Prompt the user:

    No monitoring token found. Let me help you set up...
    
    Please choose a sign-in method:
    1. Existing user: visit https://openclaw-agent-monitor.vercel.app and click Sign In
    2. New user: visit https://openclaw-agent-monitor.vercel.app and click Sign Up
    
    After signing in:
    - Go to the Settings page
    - Generate and copy your Agent Token
    - Send me the generated token
    
  2. Wait for user to reply with token

  3. Save the token:

    • Create directory ~/.openclaw/credentials/
    • Save to ~/.openclaw/credentials/openclaw-status-monitor.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

✅ Token configured successfully!

Starting upload service...
- Running initial sync test...
- ✅ Service started successfully!

Monitor platform: https://openclaw-agent-monitor.vercel.app
Upload interval: 5 minutes

Start command:
python3 scripts/status_uploader.py start --fork

Management commands:
- Say "sync status" to manually trigger an upload
- Say "check status monitor" to check service status
- Say "stop status monitor" to stop the service
- Say "restart status monitor" to restart the service

Core Functions: Managing the Upload Script

1. Check if Script Exists

if [ -f ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py ]; then
  echo "Script exists"
else
  echo "Script not found"
fi

2. Start Service (Recommended)

# Start daemon with --fork (recommended)
python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py start --fork --interval 10

3. Set Sync Interval

# 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

4. Stop Service

python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py stop

5. Check Service Status

python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py status

6. View Error Logs

~/.openclaw/logs/status_uploader_error.log
~/.openclaw/logs/status_uploader.log
# 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

7. Manually Trigger One Upload

python3 ~/.openclaw/skills/openclaw-status-monitor/scripts/status_uploader.py test

Upload Logic (Simplified)

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):

  • The platform automatically updates lastActiveTimestamp based on upload time
  • If no upload is received for 5+ minutes, the platform automatically marks the agent as offline

Storage Configuration

Token Storage Location

~/.openclaw/credentials/openclaw-status-monitor.json:

{
  "agentToken": "e2d3262f-b626-4850-af11-5f2cb1c0dcad",
  "createdAt": "2026-01-26T10:00:00.000Z",
  "monitorUrl": "https://openclaw-agent-monitor.vercel.app",
  "syncIntervalMinutes": 5
}

Log Locations

  • Service log: ~/.openclaw/logs/status_uploader.log
  • Error log: ~/.openclaw/logs/status_uploader_error.log
  • PID file: ~/.openclaw/logs/status_uploader.pid
  • Token config: ~/.openclaw/credentials/openclaw-status-monitor.json

Error Handling

1. Missing Token

During initialization:

❌ 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...

2. Script Not Found

❌ Upload script not found

Please reinstall the skill or contact the developer.

3. Service Start Failed

Check the error log:

cat ~/.openclaw/logs/status_uploader_error.log

Common errors:

  • Token not configured
  • Network connection failed
  • Port already in use

4. Invalid Token

❌ 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

Example Conversations

First-time Enable

User: 启用状态监控 / enable status monitor Agent: Checking monitoring configuration...

❌ No Agent Token detected

Please complete these steps first:

  1. Visit https://openclaw-agent-monitor.vercel.app
  2. Click Sign In (supports Google/GitHub, etc.)
  3. After logging in, generate an Agent Token on the Settings page
  4. Send me the token

User: 我的 Token 是 e2d3262f-b626-4850-af11-5f2cb1c0dcad / My token is e2d3262f-b626-4850-af11-5f2cb1c0dcad Agent: Validating token...

✅ Token validated successfully!

Starting upload service...

  • Running initial sync test...
  • ✅ Service started successfully!

Status monitor enabled!

Management commands:

  • Say "sync status" / "同步状态" to manually trigger an upload
  • Say "check status monitor" / "查看状态监控" to check service status
  • Say "stop status monitor" / "停止状态监控" to stop the service

Check Service Status

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:

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

Stop Service

User: 停止状态监控 / stop status monitor Agent: Stopping upload service...

✅ Service stopped

To restart, say "start status monitor" / "启动状态监控".

Manual Sync

User: 同步状态 / sync status Agent: Executing manual upload...

Online agents: ['main', 'coding'] Upload result: ✅ Success

Restart Service

User: 重启状态监控 / restart status monitor Agent: Restarting upload service...

✅ Service restarted, PID: 67890

Check Errors

User: 查看状态监控错误日志 / check status monitor error log Agent: Checking error logs...

Recent errors:

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.

Files

5 total
Select a file
Select a file to preview.

Comments

Loading comments…