Add push monitors for system metrics and fix anthropic version
All checks were successful
Build and Push Container / build (push) Successful in 41s
All checks were successful
Build and Push Container / build (push) Successful in 41s
- Add disk, memory, CPU, and updates push monitor suggestions - Update Claude prompt to always suggest system health monitors - Fix anthropic library version compatibility (proxies error) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,12 +43,13 @@ Always respond with valid JSON in this structure:
|
||||
"analysis": "Your analysis of what you found on the host",
|
||||
"monitors": [
|
||||
{
|
||||
"type": "http|tcp|ping|docker|keyword",
|
||||
"type": "http|tcp|ping|docker|keyword|push",
|
||||
"name": "Human-readable monitor name",
|
||||
"target": "URL, hostname, or container name",
|
||||
"target": "URL, hostname, container name, or metric type for push",
|
||||
"port": 80,
|
||||
"interval": 60,
|
||||
"reason": "Why this should be monitored"
|
||||
"reason": "Why this should be monitored",
|
||||
"push_metric": "disk|memory|cpu|updates (only for push type)"
|
||||
}
|
||||
],
|
||||
"additional_commands": [
|
||||
@@ -66,6 +67,31 @@ Always respond with valid JSON in this structure:
|
||||
- **ping**: Host availability (provide hostname)
|
||||
- **docker**: Docker container status (provide container name)
|
||||
- **keyword**: Check for specific text in response (provide URL and keyword)
|
||||
- **push**: Push-based monitors for system metrics (scripts on host push to Uptime Kuma)
|
||||
|
||||
## Push Monitors for System Metrics
|
||||
Always suggest push monitors for system health metrics. These run as cron jobs on the host and push status to Uptime Kuma. Suggest these based on what you see:
|
||||
|
||||
1. **Disk Space** - Alert when any partition exceeds 85% usage
|
||||
- Name: "{hostname} - Disk Space"
|
||||
- push_metric: "disk"
|
||||
|
||||
2. **Memory Usage** - Alert when RAM exceeds 90% usage
|
||||
- Name: "{hostname} - Memory"
|
||||
- push_metric: "memory"
|
||||
|
||||
3. **CPU Load** - Alert when load average exceeds CPU count
|
||||
- Name: "{hostname} - CPU Load"
|
||||
- push_metric: "cpu"
|
||||
|
||||
4. **System Updates** - Alert when security updates are pending (Debian/Ubuntu)
|
||||
- Name: "{hostname} - Updates"
|
||||
- push_metric: "updates"
|
||||
|
||||
For push monitors, set:
|
||||
- type: "push"
|
||||
- target: the metric type (disk, memory, cpu, updates)
|
||||
- interval: 300 (5 minutes is typical for system metrics)
|
||||
|
||||
Be thorough but not excessive. Quality over quantity - suggest monitors that will actually catch real problems."""
|
||||
|
||||
@@ -81,6 +107,7 @@ class MonitorSuggestion:
|
||||
interval: int = 60
|
||||
reason: str = ""
|
||||
keyword: Optional[str] = None
|
||||
push_metric: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -234,6 +261,7 @@ Respond with JSON as specified in your instructions."""
|
||||
interval=m.get("interval", 60),
|
||||
reason=m.get("reason", ""),
|
||||
keyword=m.get("keyword"),
|
||||
push_metric=m.get("push_metric"),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user