Watchdog process manager

From NaveedTechLab/skills-library · View interactive version

Watchdog process manager is an AI agent skill from the GitHub repository NaveedTechLab/skills-library. Process supervisor to auto-restart failed watchers and orchestrator processes with comprehensive logging and alerting capabilities. Use when Claude needs to manage long-running processes, ensure service availability, monitor process health, or implement resilient process supervision with restart pol

How to use this skill

Skill file

Watchdog Process Manager

Overview

The Watchdog Process Manager is a robust process supervision system that monitors, manages, and auto-restarts failed processes. It provides comprehensive logging, alerting, and health monitoring capabilities to ensure service availability and resilience.

Core Capabilities

The watchdog process manager provides:

  1. Process Supervision: Monitors running processes and automatically restarts failed ones
  2. Health Monitoring: Tracks process health, resource usage, and performance metrics
  3. Logging & Auditing: Maintains detailed logs of process lifecycle events
  4. Alerting System: Sends notifications when processes fail or require attention
  5. Configuration Management: Flexible configuration for different restart policies
  6. Resource Management: Monitors and enforces resource limits

Usage Scenarios

Use the watchdog process manager when:

Process Supervision

Restart Policies

The watchdog supports various restart policies:

Health Checks

Processes can be monitored using:

Configuration

Process Definitions

Processes are defined with configuration specifying:

Example Configuration

processes:
  - name: "file-watcher"
    command: "python file_watcher.py"
    restart_policy: "always"
    max_restarts: 5
    restart_window: 60
    environment:
      LOG_LEVEL: "INFO"
    working_dir: "/opt/watchers"
    resource_limits:
      cpu_percent: 80
      memory_mb: 512
    health_check:
      type: "heartbeat"
      interval: 30
      timeout: 10

Alerting System

Notification Channels

The system supports multiple alerting channels:

Alert Conditions

Alerts are triggered by:

Implementation Guidelines

Best Practices

  1. Graceful Shutdown: Implement proper signal handling for clean shutdowns
  2. Health Endpoints: Expose health check endpoints for accurate monitoring
  3. Resource Limits: Set appropriate resource limits to prevent system overload
  4. Log Rotation: Implement log rotation to prevent disk space issues
  5. Monitoring Integration: Integrate with existing monitoring systems

Performance Considerations

Resources

This skill includes example resource directories that demonstrate how to manage different aspects of process supervision:

scripts/

Executable Python scripts for process supervision, health monitoring, and alerting functionality.

references/

Detailed documentation for configuration formats, alerting policies, and integration guidelines.

assets/

Template configuration files and example process definitions for common supervision scenarios.


The watchdog process manager enables reliable and resilient process management with comprehensive monitoring and alerting capabilities.

When NOT to Use This Skill

Common Mistakes

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.