{"id":3246,"date":"2023-10-16T21:22:40","date_gmt":"2023-10-17T02:22:40","guid":{"rendered":"https:\/\/lab.rapternet.us\/?p=3246"},"modified":"2023-08-18T09:45:43","modified_gmt":"2023-08-18T14:45:43","slug":"using-ntfy-sh-to-send-unraid-notifications","status":"publish","type":"post","link":"https:\/\/lab.rapternet.us\/?p=3246","title":{"rendered":"Using ntfy.sh to send unRAID notifications"},"content":{"rendered":"\n<p>unRAID supports multiple notification platforms for keeping you informed about what the server is doing, the only problem is, I don&#8217;t use any of those notification platforms. I have however started using ntfy.sh, which has been working well for my home assistant notifications, and is a very simple platform. What I&#8217;d like to do is integrate it into unRAID so that I can make use of it there as well.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>unRAID has the ability to send notifications to many different agents. These are all controlled by scripts in a specific folder, allowing it to send notifications to all enabled agents via their scripts. The location of the notification agent script folder is below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/boot\/config\/plugins\/dynamix\/notifications\/agents\/<\/pre>\n\n\n\n<p>I created the ntfy script in the folder and added the following to it&#8217;s contents. Make sure you don&#8217;t use a file extension on the script, else it won&#8217;t work.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/bin\/bash<br>#curl -u \"user:pass\"<br>curl -H \"Title: ${SUBJECT}\" \\<br>  -H \"Tags: unRAID\" \\<br>  -d \"Event: ${EVENT}<br>Subject: ${SUBJECT}<br>Description: ${DESCRIPTION}<br>Importance: ${IMPORTANCE}<br>Time: $(date '+%Y-%m-%d %H:%M:%S')<br><br>${CONTENT}\" \\<br>  https:\/\/ntfy.sh\/unRAID<\/pre>\n\n\n\n<p>I then went to the unRAID &#8220;Settings&#8221; menu, &#8220;Notifications&#8221; and the &#8220;Notification Settings&#8221;section. Here turn on the agent option for any notification types that you want sent through ntfy.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"756\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/image-1024x756.png\" alt=\"\" class=\"wp-image-3260\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/image-1024x756.png 1024w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/image-300x221.png 300w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/image-768x567.png 768w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/image-1536x1134.png 1536w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/image.png 1623w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">Notification Agent Settings<\/figcaption><\/figure>\n\n\n\n<p>With the agent option enabled, the ntfy script will be called and you&#8217;ll get notifications through the platform. This worked well for getting me better insight into my server&#8217;s status.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/lder.dev\/posts\/ntfy-Notifications-With-unRAID\/\" target=\"_blank\" rel=\"noreferrer noopener\">Blog post about setting up ntfy on unRAID<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>unRAID supports multiple notification platforms for keeping you informed about what the server is doing, the only problem is, I don&#8217;t use any of those notification platforms. I have however started using ntfy.sh, which has been working well for my home assistant notifications, and is a very simple platform. What I&#8217;d like to do is &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/lab.rapternet.us\/?p=3246\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using ntfy.sh to send unRAID notifications&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[98,14,22,15],"class_list":["post-3246","post","type-post","status-publish","format-standard","hentry","category-how-to","tag-ntfy","tag-quick-bites","tag-services","tag-unraid"],"_links":{"self":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/3246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3246"}],"version-history":[{"count":7,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/3246\/revisions"}],"predecessor-version":[{"id":3274,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/3246\/revisions\/3274"}],"wp:attachment":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}