4.6 KiB
4.6 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 62ee21e8-2b56-4d38-a73d-47e2724f08c6 | solution | N8N + Claude Code Automated Server Monitoring System |
|
0.9 | 0.8 | 2025-12-20T04:35:53.428069+00:00 | 2026-03-02T20:05:09.178088+00:00 |
|
Built automated server health monitoring with N8N and Claude Code headless mode.
Architecture:
- Claude Code LXC (10.10.0.148, CT 300) runs diagnostics
- N8N (10.10.0.210) triggers checks every 5 minutes
- Two-stage cost optimization: free Python health check, Claude only on issues
- SSH chain: N8N → Claude LXC → Target servers
Key Components:
- server-diagnostics skill at ~/.claude/skills/server-diagnostics/
- health-check.sh: Free detection script (grep for exited/stopped containers)
- remediate.sh: Claude-powered analysis and auto-fix
- Discord webhook for alerts
Lessons Learned:
- Docker 20.10 doesn't support --format 'json', use Go templates instead
- N8N SSH node has quoting issues - use wrapper scripts
- Discord embeds don't support markdown tables - use bullet points
- Ubuntu 22.04 LXC template failed, 20.04 works
- Python 3.8 needs Optional[str] not str | None syntax
Cost Model:
- Healthy checks: $0 (just Python script)
- Issues found: ~$0.10-0.15 (Claude remediation)
Bonus Fixes:
- avahi-daemon was consuming 67+ hours CPU responding to Docker veth changes
- GNOME desktop services (gdm, gvfs) wasting ~12% CPU on headless server