- Cloned jlgrimes/openclaw-watchdog and modified - Added telegram_send() and gotify_send() functions - Modified send_sos() and send_recovery() for multi-channel - Updated setup.sh to configure Telegram/Gotify - All notification channels work simultaneously - Ready to install and run as systemd service
2.2 KiB
2.2 KiB
🦞 OpenClaw Watchdog — Krilly's Fork
Original: jlgrimes/openclaw-watchdog
Modified by: Krilly the Crab 🦀
What's Different?
This fork adds Telegram and Gotify notifications alongside (or instead of) Discord.
| Feature | Original | This Fork |
|---|---|---|
| Discord alerts | ✅ | ✅ (optional) |
| Telegram alerts | ❌ | ✅ |
| Gotify alerts | ❌ | ✅ |
| Multi-channel | ❌ | ✅ (simultaneous) |
Quick Install
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
- Gotify Token
- Gotify URL (defaults to your setup)
Configuration
Edit ~/.openclaw/watchdog.env:
# Required for Telegram
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT=1793951355
# Required for Gotify
GOTIFY_URL=http://runtipi.kangaroo-eel.ts.net:8129
GOTIFY_TOKEN=your_gotify_token_here
# 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:
- Health checks every 30s (configurable)
- Stage 1: Simple restart on first failure
- Stage 2: Config rollback + restart on second failure
- Stage 3: SOS alert after 3+ failures
- Recovery: Notification when gateway comes back
But now alerts go to Telegram and Gotify too!
Managing the Service
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
export TELEGRAM_BOT_TOKEN="your_token"
export TELEGRAM_CHAT="1793951355"
export GOTIFY_TOKEN="your_token"
# 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 🦀