claude-home/scripts/monitoring
Cal Corum 7edb4a3a9c CLAUDE: Update VM management patterns and Tdarr operational scripts
- Update patterns/vm-management/README.md: Add comprehensive automation workflows
  - Cloud-init deployment strategies and post-install automation
  - SSH key management integration and security hardening patterns
  - Implementation workflows for new and existing VM provisioning

- Add complete VM management examples and reference documentation
  - examples/vm-management/: Proxmox automation and provisioning examples
  - reference/vm-management/: Troubleshooting guides and best practices
  - scripts/vm-management/: Operational scripts for automated VM setup

- Update reference/docker/tdarr-monitoring-configuration.md: API monitoring integration
  - Document new tdarr_monitor.py integration with existing Discord monitoring
  - Add API-based health checks and cron scheduling examples
  - Enhanced gaming scheduler integration with health verification

- Update Tdarr operational scripts with stability improvements
  - scripts/tdarr/start-tdarr-gpu-podman-clean.sh: Resource limits and CDI GPU access
  - scripts/tdarr/tdarr-schedule-manager.sh: Updated container name references
  - scripts/monitoring/tdarr-timeout-monitor.sh: Enhanced completion monitoring

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 12:18:43 -05:00
..
windows-desktop CLAUDE: Add Windows desktop monitoring system with Discord notifications 2025-08-11 09:29:09 -05:00
README.md CLAUDE: Add comprehensive Tdarr API monitoring with dataclass-based status tracking 2025-08-12 12:15:41 -05:00
setup-discord-monitoring.md CLAUDE: Add comprehensive documentation for Tdarr monitoring and NAS configuration 2025-08-10 10:39:55 -05:00
tdarr_monitor.py CLAUDE: Add comprehensive Tdarr API monitoring with dataclass-based status tracking 2025-08-12 12:15:41 -05:00
tdarr-timeout-monitor.sh CLAUDE: Update VM management patterns and Tdarr operational scripts 2025-08-12 12:18:43 -05:00

Monitoring Scripts

This directory contains various monitoring scripts and tools for the home lab infrastructure.

Available Scripts

Tdarr Monitoring

tdarr_monitor.py

A comprehensive Python-based monitoring tool for Tdarr media transcoding servers. Features dataclass-based return types for improved type safety and IDE support.

Features:

  • Server status and health monitoring
  • Queue status and statistics tracking
  • Node connectivity and performance monitoring
  • Library scan progress monitoring
  • Worker activity tracking
  • Comprehensive health checks
  • JSON and pretty-print output formats
  • Configurable timeouts and logging

Usage:

# Basic health check
./tdarr_monitor.py --server http://10.10.0.43:8265 --check health

# Monitor queue status
./tdarr_monitor.py --server http://10.10.0.43:8265 --check queue

# Get all status information
./tdarr_monitor.py --server http://10.10.0.43:8265 --check all --output json

# Monitor nodes with verbose logging
./tdarr_monitor.py --server http://10.10.0.43:8265 --check nodes --verbose

Available Checks:

  • health - Comprehensive health check (default)
  • status - Server status and configuration
  • queue - Transcoding queue statistics
  • nodes - Connected nodes status
  • libraries - Library scan progress
  • stats - Overall transcoding statistics
  • all - All checks combined

Output Formats:

  • pretty - Human-readable format (default)
  • json - Structured JSON output

Exit Codes:

  • 0 - Success, all systems healthy
  • 1 - Error or unhealthy status detected

Requirements:

  • Python 3.7+
  • requests library
  • Access to Tdarr server API endpoints

tdarr-timeout-monitor.sh

Shell script for monitoring Tdarr timeouts and system status.

Usage:

./tdarr-timeout-monitor.sh

System Monitoring

Windows Desktop Monitoring

Complete Windows desktop monitoring system with Discord notifications for reboots and system events.

Location: windows-desktop/

  • Full setup instructions in windows-desktop/README.md
  • PowerShell monitoring scripts
  • Windows Task Scheduler integration
  • Discord webhook notifications

Features:

  • Automatic reboot detection
  • System startup/shutdown monitoring
  • Discord notifications with timestamps
  • Configurable monitoring intervals
  • Windows Task Scheduler integration

Setup and Configuration

Discord Integration

See setup-discord-monitoring.md for Discord webhook setup instructions.

Integration with Home Lab

Tdarr Keywords Trigger

When working with Tdarr-related tasks, the following documentation is automatically loaded:

  • reference/docker/tdarr-troubleshooting.md
  • patterns/docker/distributed-transcoding.md
  • scripts/tdarr/README.md

Gaming-Aware Scheduling

The monitoring scripts integrate with the gaming-aware Tdarr scheduling system that provides:

  • Configurable time windows for transcoding
  • Gaming session detection
  • Automated resource management
  • Smart scheduling to avoid performance conflicts

Best Practices

  1. Regular Monitoring: Set up cron jobs or scheduled tasks for regular status checks
  2. Health Checks: Use the health check endpoints for automated monitoring
  3. Logging: Enable verbose logging for troubleshooting
  4. Timeout Configuration: Adjust timeouts based on network conditions
  5. Error Handling: Monitor exit codes for automated alerting
  • /patterns/docker/distributed-transcoding.md - Tdarr architecture patterns
  • /reference/docker/tdarr-troubleshooting.md - Troubleshooting guide
  • /scripts/tdarr/README.md - Tdarr management scripts