Unraid
Unraid runs a script for each notification when you add it as a notification agent. This script sends each one to Pocketbell, with Unraid’s alerts as Critical.
This uses an API Source.
Set it up
Section titled “Set it up”-
In the Pocketbell app, create a Source named Unraid, choose API, and copy its key.
-
Save this as
/boot/config/plugins/dynamix/notifications/agents/Pocketbell.sh, with your key in place ofpb_live_…:#!/bin/bashKEY="pb_live_…"case "$IMPORTANCE" inalert) PRIORITY=critical ;;warning) PRIORITY=important ;;*) PRIORITY=normal ;;esacjq -n --arg title "$SUBJECT" --arg message "$DESCRIPTION" --arg priority "$PRIORITY" \'{title: $title[0:250], message: (if $message == "" then $title else $message end)[0:4096],priority: $priority, tags: ["unraid"]}' |curl -fsS https://api.pocketbell.dev/v1/messages \-H "Authorization: Bearer $KEY" \-H "Content-Type: application/json" \--data @- -
Make it executable:
chmod +xthe file. The script needsjq: check thatjq --versionanswers in Unraid’s terminal. -
In Settings → Notification Settings, tick Agents for the kinds of notification to send.
-
Send a test from the terminal:
Terminal window /usr/local/emhttp/webGui/scripts/notify -e Test -s "Test from Unraid" -d "Hello" -i alert
How it behaves
Section titled “How it behaves”- Unraid’s alert is Critical, repeating until you acknowledge it; warning is Time Sensitive; everything else is normal.
jq --argmakes each value a JSON string, so text with quotes in it still makes a valid request.- The flash drive keeps the script across reboots, and the key with it, so keep the flash backup private.