원클릭으로
monitoring
System health monitoring, alerts, and error tracking
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
System health monitoring, alerts, and error tracking
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Trade crypto binary markets on Polymarket with 4 automated strategies. Support: 5-min BTC, 15-min/1h/4h/daily all assets (BTC, ETH, SOL, XRP)
Dollar-cost averaging across all platforms
Hyperliquid L1 perps DEX (69% market share)
Local hybrid search for markdown notes and docs. Use when searching notes, finding related content, or retrieving documents from indexed collections.
Trade perpetual futures on Binance, Bybit, Hyperliquid, MEXC with up to 200x leverage
Execute trades on Polymarket using py_clob_client - full API access for market data, orders, positions
| name | monitoring |
| description | System health monitoring, alerts, and error tracking |
| emoji | 🔔 |
Monitor system health, track errors, and receive alerts when issues occur.
/monitor start # Start monitoring
/monitor stop # Stop monitoring
/monitor status # Check monitoring status
/monitor health # Run health check
/monitor health --verbose # Detailed health info
/monitor providers # Check LLM provider status
/monitor alerts # View recent alerts
/monitor alerts --unread # Unread alerts only
/monitor alert-targets # View alert destinations
/monitor alert-targets add email <addr> # Add email target
/monitor alert-targets add webhook <url> # Add webhook target
/monitor alert-targets remove <id> # Remove target
/monitor config # View config
/monitor cooldown 300 # Set alert cooldown (seconds)
/monitor threshold cpu 80 # Set CPU alert threshold
/monitor threshold memory 90 # Set memory threshold
import { createMonitoringService } from 'clodds/monitoring';
const monitor = createMonitoringService({
// Health check interval
intervalMs: 60000, // 1 minute
// Alert targets
alertTargets: [
{ type: 'email', address: 'alerts@example.com' },
{ type: 'webhook', url: 'https://hooks.example.com/alerts' },
],
// Alert cooldown (prevent spam)
alertCooldownMs: 300000, // 5 minutes
// Thresholds
thresholds: {
cpu: 80, // Alert at 80% CPU
memory: 90, // Alert at 90% memory
errorRate: 10, // Alert at 10% error rate
},
});
// Start monitoring
await monitor.start();
// Check if running
const isRunning = monitor.isRunning();
// Stop monitoring
await monitor.stop();
// Run health check
const health = await monitor.runHealthCheck();
console.log(`Overall: ${health.status}`); // 'healthy' | 'degraded' | 'unhealthy'
console.log('\nSystem:');
console.log(` CPU: ${health.system.cpu}%`);
console.log(` Memory: ${health.system.memory}%`);
console.log(` Disk: ${health.system.disk}%`);
console.log('\nProviders:');
for (const [name, status] of Object.entries(health.providers)) {
console.log(` ${name}: ${status.status} (${status.latencyMs}ms)`);
}
console.log('\nServices:');
for (const [name, status] of Object.entries(health.services)) {
console.log(` ${name}: ${status.status}`);
}
// Check LLM provider status
const providers = await monitor.checkProviders();
for (const provider of providers) {
console.log(`${provider.name}:`);
console.log(` Status: ${provider.status}`);
console.log(` Latency: ${provider.latencyMs}ms`);
console.log(` Last error: ${provider.lastError || 'none'}`);
console.log(` Error rate: ${provider.errorRate}%`);
}
// Get recent alerts
const alerts = await monitor.getAlerts({ limit: 10 });
for (const alert of alerts) {
console.log(`[${alert.severity}] ${alert.title}`);
console.log(` ${alert.message}`);
console.log(` Time: ${alert.timestamp}`);
console.log(` Acknowledged: ${alert.acknowledged}`);
}
// Acknowledge alert
await monitor.acknowledgeAlert(alertId);
// Get unread count
const unread = await monitor.getUnreadAlertCount();
// Add alert target
await monitor.addAlertTarget({
type: 'email',
address: 'team@example.com',
});
await monitor.addAlertTarget({
type: 'webhook',
url: 'https://hooks.slack.com/...',
});
// List targets
const targets = monitor.getAlertTargets();
// Remove target
await monitor.removeAlertTarget(targetId);
// Listen for events
monitor.on('alert', (alert) => {
console.log(`🚨 Alert: ${alert.title}`);
});
monitor.on('healthCheck', (health) => {
if (health.status !== 'healthy') {
console.log(`⚠️ System ${health.status}`);
}
});
monitor.on('providerDown', (provider) => {
console.log(`❌ Provider down: ${provider.name}`);
});
monitor.on('providerRecovered', (provider) => {
console.log(`✅ Provider recovered: ${provider.name}`);
});
// Send manual alert
await monitor.sendAlert({
severity: 'warning', // 'info' | 'warning' | 'error' | 'critical'
title: 'Custom Alert',
message: 'Something important happened',
metadata: { key: 'value' },
});
| Type | Trigger |
|---|---|
| provider_down | LLM provider not responding |
| high_cpu | CPU usage above threshold |
| high_memory | Memory usage above threshold |
| high_error_rate | Error rate above threshold |
| unhandled_exception | Uncaught exception |
| unhandled_rejection | Unhandled promise rejection |
// Update config
monitor.configure({
intervalMs: 30000,
alertCooldownMs: 600000,
thresholds: {
cpu: 85,
memory: 95,
errorRate: 5,
},
});