Proxmox VE Webhook Notifications: Slack, Discord, and Telegram Alerts
Set up webhook notifications in Proxmox VE 8 to send alerts to Slack, Discord, and Telegram for backup completions, HA failover, and system events.
Proxmox VE 8 Notification System
Proxmox VE 8 introduced a modern notification framework that replaces the legacy email-only approach. The new system supports multiple notification endpoints (SMTP, Gotify, webhooks) and uses matchers to route specific events to specific targets. This means you can send backup completion notices to email, HA failover alerts to Slack, and critical errors to a Telegram group — all from the built-in notification system.
Webhook Notifications with curl
While Proxmox VE 8 has a built-in webhook endpoint type, you can also use hook scripts for maximum flexibility. The most common approach is using curl to POST to messaging platform webhooks.
Slack Notifications
Create a Slack incoming webhook in your Slack workspace (Apps > Incoming Webhooks), then create a notification script:
# Create the Slack notification script:
cat > /usr/local/bin/notify-slack.sh << 'SCRIPT'
#!/bin/bash
SLACK_WEBHOOK="https://hooks.slack.com/services/YOUR/WEBHOOK/URL"
MESSAGE="$1"
SEVERITY="${2:-info}"
# Color based on severity:
case $SEVERITY in
error) COLOR="#ff0000" ;;
warning) COLOR="#ffaa00" ;;
*) COLOR="#36a64f" ;;
esac
curl -s -X POST "$SLACK_WEBHOOK" \
-H 'Content-Type: application/json' \
-d "{
\"attachments\": [{
\"color\": \"$COLOR\",
\"title\": \"Proxmox Alert - $(hostname)\",
\"text\": \"$MESSAGE\",
\"ts\": $(date +%s)
}]
}"
SCRIPT
chmod +x /usr/local/bin/notify-slack.sh
# Test it:
/usr/local/bin/notify-slack.sh "Test notification from Proxmox" "info"
Discord Notifications
Discord webhooks are similar to Slack. Create a webhook in your Discord channel (Channel Settings > Integrations > Webhooks):
# Create the Discord notification script:
cat > /usr/local/bin/notify-discord.sh << 'SCRIPT'
#!/bin/bash
DISCORD_WEBHOOK="https://discord.com/api/webhooks/YOUR/WEBHOOK/URL"
MESSAGE="$1"
SEVERITY="${2:-info}"
case $SEVERITY in
error) COLOR=16711680 ;; # Red
warning) COLOR=16744448 ;; # Orange
*) COLOR=3584611 ;; # Green
esac
curl -s -X POST "$DISCORD_WEBHOOK" \
-H 'Content-Type: application/json' \
-d "{
\"embeds\": [{
\"title\": \"Proxmox Alert - $(hostname)\",
\"description\": \"$MESSAGE\",
\"color\": $COLOR,
\"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"
}]
}"
SCRIPT
chmod +x /usr/local/bin/notify-discord.sh
Telegram Notifications
Create a Telegram bot via BotFather, get the bot token and chat ID, then:
# Create the Telegram notification script:
cat > /usr/local/bin/notify-telegram.sh << 'SCRIPT'
#!/bin/bash
BOT_TOKEN="YOUR_BOT_TOKEN"
CHAT_ID="YOUR_CHAT_ID"
MESSAGE="$1"
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
-d "chat_id=${CHAT_ID}" \
-d "parse_mode=HTML" \
-d "text=Proxmox Alert - $(hostname)%0A${MESSAGE}"
SCRIPT
chmod +x /usr/local/bin/notify-telegram.sh
# Find your chat ID (send a message to your bot first, then):
curl -s "https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates" | python3 -m json.tool | grep chat -A5
Backup Completion Hooks
Proxmox calls hook scripts at various stages of the backup process. Create a vzdump hook script to send notifications on backup completion or failure:
# Create the backup hook script:
cat > /usr/local/bin/vzdump-hook.sh << 'SCRIPT'
#!/bin/bash
# vzdump hook script - called with: phase, mode, vmid
PHASE="$1"
MODE="$2"
VMID="$3"
case "$PHASE" in
job-end)
/usr/local/bin/notify-slack.sh "Backup job completed successfully for VM $VMID (mode: $MODE)" "info"
;;
job-abort)
/usr/local/bin/notify-slack.sh "BACKUP FAILED for VM $VMID (mode: $MODE)" "error"
;;
backup-end)
/usr/local/bin/notify-slack.sh "Backup completed: VM $VMID" "info"
;;
log-end)
/usr/local/bin/notify-slack.sh "Backup log finalized: VM $VMID" "info"
;;
esac
SCRIPT
chmod +x /usr/local/bin/vzdump-hook.sh
# Configure vzdump to use the hook:
# In /etc/vzdump.conf:
echo "script: /usr/local/bin/vzdump-hook.sh" >> /etc/vzdump.conf
# Or per-job via the web UI: Datacenter > Backup > Edit > Advanced > Hook Script
HA Failover Alerts
Monitor HA failover events by watching the HA manager log:
# Create an HA monitoring script:
cat > /usr/local/bin/ha-monitor.sh << 'SCRIPT'
#!/bin/bash
# Check for recent HA failover events
LAST_CHECK="/tmp/ha-monitor-last"
LOG="/var/log/pve/ha-manager.log"
if [ ! -f "$LAST_CHECK" ]; then
touch "$LAST_CHECK"
exit 0
fi
# Find new failover events since last check:
EVENTS=$(find "$LOG" -newer "$LAST_CHECK" -exec grep -l "migrate\|relocate\|failover\|fence" {} \; 2>/dev/null)
if [ -n "$EVENTS" ]; then
DETAILS=$(grep -E "migrate|relocate|failover|fence" "$LOG" | tail -5)
/usr/local/bin/notify-slack.sh "HA Event detected:\n$DETAILS" "warning"
fi
touch "$LAST_CHECK"
SCRIPT
chmod +x /usr/local/bin/ha-monitor.sh
# Check every 2 minutes:
# Add to crontab:
*/2 * * * * /usr/local/bin/ha-monitor.sh
While webhook notifications keep you informed about specific events, having a full dashboard view of your Proxmox environment on your phone is equally valuable. ProxmoxR complements webhook alerts by giving you real-time access to node status, VM states, and resource usage — so when you receive an alert, you can immediately check the situation from anywhere.
Summary
Proxmox VE 8's notification system combined with webhook scripts lets you receive real-time alerts on Slack, Discord, or Telegram. Set up notification scripts for each platform, hook them into vzdump for backup alerts, and monitor HA events with a cron-based log watcher. This gives you immediate visibility into critical events across your Proxmox infrastructure, even when you are away from your desk.
Take Proxmox management mobile
All the features discussed in this guide — accessible from your phone with ProxmoxR. Real-time monitoring, power control, firewall management, and more.