Commit Graph

5 Commits

Author SHA1 Message Date
Cal Corum
aed1f54d91 CLAUDE: Add comprehensive Tdarr API monitoring with dataclass-based status tracking
- Add tdarr_monitor.py: Python-based API monitoring client with type-safe dataclasses
  - ServerStatus, QueueStatus, NodeStatus, LibraryStatus, StatisticsStatus, HealthStatus
  - Support for health checks, queue monitoring, node status, library scans
  - JSON and pretty-print output formats with proper exit codes
  - Integration with existing Discord monitoring system

- Create scripts/monitoring/README.md: Complete monitoring documentation
  - Comprehensive usage examples and command-line options
  - Integration patterns with gaming-aware scheduling
  - Best practices for automated health monitoring

- Update CLAUDE.md: Enhanced Tdarr keyword triggers and documentation structure
  - Add "monitoring" and "api" keywords to automatically load monitoring docs
  - Reference new tdarr_monitor.py with dataclass-based status tracking
  - Update documentation structure to show monitoring script location

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 12:15:41 -05:00
Cal Corum
daedfb298c CLAUDE: Add Windows desktop monitoring system with Discord notifications
- Complete PowerShell-based monitoring solution for Windows reboots
- Detects startup, shutdown, and unexpected restart events
- Rich Discord notifications with color-coded alerts
- Automatic reboot reason detection (Windows Update, power loss, user-initiated)
- Task Scheduler integration for reliable event monitoring
- Comprehensive setup instructions and troubleshooting guide

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 09:29:09 -05:00
Cal Corum
26f5b82afa CLAUDE: Enhance operational scripts and add mobile SSH documentation
SSH Homelab Setup:
- Add mobile device SSH access documentation (Termius setup)
- Include prerequisites checklist and key transfer process
- Document network discovery commands for mobile access

Tdarr Timeout Monitor:
- Add comprehensive debug logging with structured levels (INFO/DEBUG/ERROR/WARN/SUCCESS)
- Implement command execution timing and detailed error tracking
- Enhance container status verification and error handling
- Add log entry counting and detailed output analysis
- Improve cleanup operations with better failure detection
- Add performance metrics and duration tracking for all operations

Tdarr Node Startup:
- Add unmapped node cache volume mapping for media access
- Complete production configuration for distributed transcoding

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 16:22:57 -05:00
Cal Corum
715354da7d CLAUDE: Add comprehensive documentation for Tdarr monitoring and NAS configuration
Complete documentation package for home lab infrastructure:

## New Documentation Files:
- **Tdarr Monitoring Configuration**: Complete setup guide for Discord-based Tdarr monitoring system
- **NAS Mount Configuration**: SMB/CIFS mount setup and troubleshooting for media storage
- **Discord Monitoring Setup**: Step-by-step guide for webhook configuration and notification testing

## Documentation Features:
- **Reference Architecture**: Best practices for distributed Tdarr deployments
- **Configuration Templates**: Copy-paste ready configurations with security considerations
- **Troubleshooting Guides**: Common issues and solutions for production environments
- **Integration Examples**: Real-world implementation patterns for home lab environments

## Coverage Areas:
- Docker container orchestration and monitoring
- Network storage integration and performance optimization
- Automated alerting and notification systems
- Production-ready configuration management

These documents support the enhanced monitoring system and provide comprehensive guidance for maintaining a robust home lab infrastructure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 10:39:55 -05:00
Cal Corum
6cc0d0df2e CLAUDE: Enhance Tdarr monitoring with automatic staging timeout cleanup and Discord notifications
Major improvements to Tdarr monitoring system addressing staging section timeout issues:

## New Features:
- **Automatic Staging Timeout Detection**: Monitors server logs for 300s limbo timeouts every 20 minutes
- **Stuck Directory Cleanup**: Automatically removes work directories with partial downloads preventing staging cleanup
- **Enhanced Discord Notifications**: Structured markdown messages with working user pings extracted from code blocks
- **Comprehensive Logging**: Timestamped logs with automatic rotation (1MB limit) at /tmp/tdarr-monitor/monitor.log
- **Multi-System Monitoring**: Covers both server staging issues and node worker stalls

## Technical Improvements:
- **JSON Handling**: Proper escaping for special characters, quotes, and newlines in Discord webhooks
- **Shell Compatibility**: Fixed `[[` vs `[` syntax for Docker container execution (sh vs bash)
- **Message Structure**: Professional markdown formatting with separation of alerts and actionable pings
- **Error Handling**: Robust SSH command execution and container operation handling

## Problem Solved:
- Root Cause: Hardcoded 300s staging timeout in Tdarr v2.45.01 causing large files (2-3GB+) to fail download
- Impact: Partial downloads created stuck .tmp files, ENOTEMPTY errors preventing cleanup, cascade failures
- Solution: Automated detection and cleanup system with proactive Discord alerts

## Files Added/Modified:
- `scripts/monitoring/tdarr-timeout-monitor.sh` - Enhanced monitoring script v2.0
- `reference/docker/tdarr-troubleshooting.md` - Added comprehensive monitoring system documentation

## Operational Benefits:
- Reduces manual intervention through automatic cleanup
- Self-healing system prevents staging section blockage
- Enterprise-ready monitoring with structured alerts
- Minimal resource impact: ~3s every 20min, <2MB storage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 10:38:43 -05:00