# 🦞 OpenClaw Watchdog — Krilly's Fork **Original:** [jlgrimes/openclaw-watchdog](https://github.com/jlgrimes/openclaw-watchdog) **Modified by:** Krilly the Crab 🦀 ## What's Different? This fork adds **Telegram** and **ntfy** notifications alongside (or instead of) Discord. | Feature | Original | This Fork | |---------|----------|-----------| | Discord alerts | ✅ | ✅ (optional) | | Telegram alerts | ❌ | ✅ | | ntfy alerts | ❌ | ✅ | | Multi-channel | ❌ | ✅ (simultaneous) | ## Quick Install ```bash git clone https://github.com/jlgrimes/openclaw-watchdog.git cd openclaw-watchdog chmod +x setup.sh watchdog.sh ./setup.sh ``` The installer will ask for: - Telegram Bot Token - ntfy Token - ntfy URL (defaults to your setup) ## Configuration Edit `~/.openclaw/watchdog.env`: ```bash # Required for Telegram TELEGRAM_BOT_TOKEN=your_bot_token_here TELEGRAM_CHAT=1793951355 # Required for ntfy NTFY_URL=https://ntfy.sh NTFY_TOPIC=anthony-krilly-9f3k2 NTFY_MIN_PRIORITY=4 # Optional: Legacy Discord DISCORD_CHANNEL_ID= DISCORD_BOT_TOKEN= ``` All three can work simultaneously — get alerts wherever you want! ## How It Works Same great watchdog behavior from the original: 1. **Health checks** every 30s (configurable) 2. **Stage 1:** Simple restart on first failure 3. **Stage 2:** Config rollback + restart on second failure 4. **Stage 3:** SOS alert after 3+ failures 5. **Recovery:** Notification when gateway comes back But now alerts go to **Telegram** and **ntfy** too! ## Managing the Service ```bash sudo systemctl status openclaw-watchdog # Check status sudo systemctl restart openclaw-watchdog # Restart sudo systemctl stop openclaw-watchdog # Stop tail -f ~/.openclaw/watchdog.log # View logs ``` ## Test Notifications ```bash export TELEGRAM_BOT_TOKEN="your_token" export TELEGRAM_CHAT="1793951355" export NTFY_TOPIC="your_topic" # Source the functions and test source ~/.openclaw/watchdog.sh telegram_send "🦀 Test message from Krilly!" gotify_send "Test" "🦀 Test message from Krilly!" 5 ``` ## Credits - **Original:** Jared Grimes and Claw 🦞 - **Fork modifications:** Krilly the Crab for Anthony Martin - **License:** MIT --- *Part of the Krilly Automation Stack* 🦀