October 4, 20223 yr There are notification agents that aren't included in unRAID, ntfy.sh for example. It would be great if one of the notification agents could just be a user script, or multiple. This way you could write your own notification command and not have to wait for your preferred agent to be added officially. Then you user script could be something along the lines of (for ntfy.sh): curl \ -H "Title: $UNRAID_NOTIF_SUBJECT" \ -H "Priority: default" \ -H "Tags: unRAID" \ -d "$UNRAID_NOTIF_DESC" \ ntfy.sh/unraid_notifs where there are a defined list of environment variables passed to it such as: UNRAID_NOTIF_SUBJECT UNRAID_NOTIF_EVENT UNRAID_NOTIF_TIMESTAMP UNRAID_NOTIF_DESC UNRAID_NOTIF_IMPORTANCE UNRAID_NOTIF_CONTENT UNRAID_NOTIF_LINK ... Edited October 4, 20223 yr by jlaning
October 4, 20223 yr Author After some initial investigation, it seems that at least maybe dropping a custom script into the directory /boot/config/plugins/dynamix/notifications/agents/ would work based on the code in /usr/local/emhttp/plugins/dynamix/scripts/notify but I haven't tested this. However, a UI way of doing this would be preferred. EDIT: Creating a script /boot/config/plugins/dynamix/notifications/agents/ntfy worked (as a temp solution). Here's my example for ntfy.sh #!/bin/bash curl -u "user:pass" \ -H "Title: ${SUBJECT}" \ -H "Tags: unRAID" \ -d "Event: ${EVENT} Subject: ${SUBJECT} Description: ${DESCRIPTION} Importance: ${IMPORTANCE} Time: $(date '+%Y-%m-%d %H:%M:%S') ${CONTENT}" \ https://ntfy.domain.tld/unRAID Edited October 4, 20223 yr by jlaning added temporary solution
February 13, 20233 yr +1 for this too. I'm dumping stuff into syslog at the moment, but UI pop-ups would be sweet.
February 17, 20233 yr On 10/4/2022 at 4:09 PM, jlaning said: After some initial investigation, it seems that at least maybe dropping a custom script into the directory /boot/config/plugins/dynamix/notifications/agents/ would work based on the code in /usr/local/emhttp/plugins/dynamix/scripts/notify but I haven't tested this. However, a UI way of doing this would be preferred. EDIT: Creating a script /boot/config/plugins/dynamix/notifications/agents/ntfy worked (as a temp solution). Here's my example for ntfy.sh #!/bin/bash curl -u "user:pass" \ -H "Title: ${SUBJECT}" \ -H "Tags: unRAID" \ -d "Event: ${EVENT} Subject: ${SUBJECT} Description: ${DESCRIPTION} Importance: ${IMPORTANCE} Time: $(date '+%Y-%m-%d %H:%M:%S') ${CONTENT}" \ https://ntfy.domain.tld/unRAID Are you saying that you got it working with that script?
March 2, 20233 yr Was anybody else able to make this work? I do not have a folder notifications in dynamix, but I could potentially create one
March 5, 20233 yr So upon further review this totally works, if the folder does not exist just create it, you can also name the .sh file pretty much anything you want. I also updated it a bit for nicer looking notifications #!/bin/bash ntfy_url="https://ntfy.sh/topic" # Use ntfy_username and ntfy_password OR ntfy_token ntfy_username="" ntfy_password="" ntfy_token="" # Leave empty if you do not want an icon. ntfy_icon="https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/unraid.png" if [[ -n $ntfy_password && -n $ntfy_token ]]; then echo "Use ntfy_username and ntfy_password OR ntfy_token" exit 1 elif [ -n "$ntfy_password" ]; then ntfy_base64=$( echo -n "$ntfy_username:$ntfy_password" | base64 ) ntfy_auth="Authorization: Basic $ntfy_base64" elif [ -n "$ntfy_token" ]; then ntfy_auth="Authorization: Bearer $ntfy_token" else ntfy_auth="" fi ntfy_title="Unraid: ${SUBJECT}" ntfy_message="${DESCRIPTION}" if [ "${IMPORTANCE}" == "alert" ]; then ntfy_tag=rotating_light ntfy_priority="urgent" ntfy_xpriority=5 elif [ "${IMPORTANCE}" == "warning" ]; then ntfy_tag=warning ntfy_priority="high" ntfy_xpriority=4 else ntfy_tag=information_source ntfy_priority="default" ntfy_xpriority=3 fi curl $ntfy_url \ -H "$ntfy_auth" \ -H "tags:"$ntfy_tag \ -H "X-Title: $ntfy_title" \ -H "X-Icon: $ntfy_icon" \ -H "Priority: $ntfy_priority" \ -H "X-Priority: $ntfy_xpriority" \ -d "$ntfy_message" \ Edited March 6, 20233 yr by semaj4712
October 13, 20232 yr +1 for ntfy notifications as well as it's been promoted as a great self-hosted notification solution. I currently use it and would love for it to be integrated into Unraid notifications.
October 17, 20232 yr I hope this is what you where after: Already created a PR and will be hopefully included in one of the next releases.
December 21, 20232 yr I just want to add a note that may help keep anyone else from going down the Rabbit-hole that caught me. The file path to install the NTFY agent that is on this page is correct. But the one in the built-in help of the Notifications settings page is incorrect (as of 2023-1221 v 6.12.6) This page has - /boot/config/plugins/dynamix/notifications/agents/ Help on notifications page has - /boot/config/plugins/dynamix/notification/agents/ The only difference is that the correct value is plural while the Help doc has singular "notifications" vs "notification" That one little letter drove me crazy for a while. :-)
December 21, 20232 yr 22 minutes ago, macronin said: The file path to install the NTFY agent that is on this page is correct. But the one in the built-in help of the Notifications settings page is incorrect (as of 2023-1221 v 6.12.6) NTFY should be an agent by default and you don't have to do anything as the post above yours imply.
December 21, 20232 yr 8 minutes ago, ich777 said: NTFY should be an agent by default and you don't have to do anything as the post above yours imply. The post above mine talks about a submitted update that has not gone live yet (as far as I can tell). I had checked all the options on myidentifier.myunraid.net/Settings/Notifications page and NTFY is not listed as of yet. It might be in the nightly version (for future public release) but I am running Stable 6.12.6 which is the latest general usage version. Umm, just realized tat you are the author of the post above me. :-) Is this maybe in a diff location that I may haver missed?
December 21, 20232 yr 20 minutes ago, macronin said: Umm, just realized tat you are the author of the post above me. 🙂 Is this maybe in a diff location that I may haver missed? 10 minutes ago, nlz said: I haven't seen it natively in the options yet either. Oh sorry, I've pushed that against master that should be 6.13.0 and not 6.12.x
December 21, 20232 yr 13 minutes ago, ich777 said: Oh sorry, I've pushed that against master that should be 6.13.0 and not 6.12.x No problem. I'll keep an eye out for it. I appreciate you adding it.
January 24, 20242 yr On 10/17/2023 at 4:26 AM, ich777 said: I hope this is what you where after: Already created a PR and will be hopefully included in one of the next releases. I can't seem to get this to appear. I followed all the steps. Is a reboot required to read the script from: /boot/config/plugins/dynamix/notifications/agents EDIT: just noticed the version is 6.13 and i'm on 6.12.6 Edited January 24, 20242 yr by MP715
January 24, 20242 yr 9 minutes ago, MP715 said: just noticed the version is 6.13 and i'm on 6.12.6 This is included in the next stable release.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.