π¦ ClawHub
Monitor
by @ivangdavila
Create monitors for anything. User defines what to check, skill handles scheduling and alerts.
TERMINAL
clawhub install monitorπ About This Skill
name: Monitor slug: monitor version: 1.0.2 description: Create monitors for anything. User defines what to check, skill handles scheduling and alerts. changelog: Declared required binaries and optional env vars in metadata metadata: {"clawdbot":{"emoji":"π‘","requires":{"bins":["curl"],"env":{"optional":["PUSHOVER_TOKEN","PUSHOVER_USER"]}},"os":["linux","darwin","win32"]}}
Data Storage
~/monitor/
βββ monitors.json # Monitor definitions
βββ config.json # Alert preferences
βββ logs/ # Check results
βββ {name}/YYYY-MM.jsonl
Create on first use: mkdir -p ~/monitor/logs
Scope
This skill:
Execution model:
This skill does NOT:
Requirements
Required:
curl β for HTTP checksOptional (for alerts):
PUSHOVER_TOKEN / PUSHOVER_USER β for push notificationsUsed if available:
openssl β for SSL certificate checkspgrep β for process checksdf β for disk space checksnc β for port checksQuick Reference
| Topic | File |
|-------|------|
| Monitor type examples | templates.md |
| Alert configuration | alerts.md |
| Analysis patterns | insights.md |
Core Rules
1. User Defines Everything
When user requests a monitor: 1. WHAT: User specifies what to check 2. HOW: User provides method or grants tool access 3. WHEN: This skill handles interval 4. ALERT: This skill handles notificationsExample flow:
User: "Monitor my API at api.example.com every 5 minutes"
Agent: "I'll check HTTP status. Alert you on failures?"
User: "Yes, and check SSL cert too"
β Monitor stored with user-defined checks
2. Monitor Definition
In ~/monitor/monitors.json:{
"api_prod": {
"description": "User's API health",
"checks": [
{"type": "http", "target": "https://api.example.com/health"},
{"type": "ssl", "target": "api.example.com"}
],
"interval": "5m",
"alert_on": "change",
"requires": [],
"created": "2024-03-15"
}
}
3. Common Check Types
User can request any of these (or others):| Type | What it checks | Tool used | |------|---------------|-----------| | http | URL status + latency | curl | | ssl | Certificate expiry | openssl | | process | Process running | pgrep | | disk | Free space | df | | port | Port open | nc | | custom | User-defined command | user specifies |
4. Confirmation Format
β
Monitor: [description]
π Checks: [what will be checked]
β±οΈ Interval: [how often]
π Alert: [when to notify]
π§ Requires: [tools/access needed]
5. Alert on Change
6. Permissions
Therequires field lists what user granted:
["ssh:server1"] = user granted SSH access["docker"] = user granted Docker accessAgent asks before assuming any access.