Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Slack Notifications

Featured Replies

It would be great to have Slack support for notifications.

Either using the tokenized App Web API or the Incoming Webhooks feature of Slack would be great!

I'm already using plexPy, couchpotato, and sonarr Slack Notification integration, but it would great to have unRAID join the party.

+1 on this. Slack is slowly becoming a centralized place for not only my work communications, but personal as well. unRAID would be great to have in there.

  • 1 month later...

I'll add a +1

  • 1 month later...

+1 !

  • Author

And a bump... anyone have any word on this request?  This is the one notifying thing I use that hasn't added Slack Notifications yet.

 

If not an official method, what's the best way to hack the existing notifications system to feed to Slack via one of the other notification agent options?

If you want to be adventurous and support your own notification agent, look at the file /usr/local/emhttp/webGui/include/NotificationAgents.xml

 

This file is used as an API between unRAID and agents. Any new entries can be simply added here and agents become instantly available to unRAID.

 

  • Author

If you want to be adventurous and support your own notification agent, look at the file /usr/local/emhttp/webGui/include/NotificationAgents.xml

 

This file is used as an API between unRAID and agents. Any new entries can be simply added here and agents become instantly available to unRAID.

 

Challenge Accepted:

 

<Agent>
    <Name>Slack</Name>
    <Variables>
      <Variable Help="Get your WebHook as explained [a href='https://api.slack.com/incoming-webhooks' target='_blank'][u]here[/u].[/a]" Desc="WebHook URL" Default="FILL WITH YOUR OWN">WEBH_URL</Variable>
      <Variable Help="Application name, e.g., unRAID Server." Desc="Application Name" Default="unRAID Server">APP_NAME</Variable>
      <Variable Help="Specify the fields which are included in the title of the notification." Desc="Notification Title" Default="$SUBJECT">TITLE</Variable>
      <Variable Help="Specify the fields which are included in the message body of the notification." Desc="Notification Message" Default="$DESCRIPTION">MESSAGE</Variable>
    </Variables>
    <Script>
      <![CDATA[
      #!/bin/bash
      ############
      {0}
      ############
      TITLE=$(echo -e "$TITLE")
      MESSAGE=$(echo -e "$MESSAGE")

      curl -X POST -d "payload={\"username\": \"$APP_NAME\", \"text\": \"*$TITLE* \n $MESSAGE\"}" $WEBH_URL 2>&1

      ]]>
    </Script>
  </Agent>

 

This seems to work for Test, but has two issues:

[*]No Icon and I don't see where to specify in the XML.

[*]Won't save the variables for the WebHook URL and channel

 

My assumption is that some handling code that ingests/transforms this XML defines the available variables and the icon. 

For the variables, next step is to reuse some of the unused ones like maybe APP_TOKEN and USER_KEY, but I'd rather use something that makes sense.  But at least the Proof of Concept works.

 

Ideal of course would be if LimeTech took this and ran with it.

 

ADDENDUM:

Nope, changing the new variables to reuse older unused variable names from other notifications doesn't let it save the settings.  All works fine in test.  I guess for now I'll have to either hardcode it or set the default values to my values (setting default to personal settings works).

1. The icon image needs to be stored in folder /usr/local/emhttp/webGui/icons. The name of the icon is the name of the agent in lowercase and spaces removed. In your case "slack.png". The icon size is preferably 48x48.

 

2. It is not possible to store or reuse your own variables.

 

  • Author

1. The icon image needs to be stored in folder /usr/local/emhttp/webGui/icons. The name of the icon is the name of the agent in lowercase and spaces removed. In your case "slack.png". The icon size is preferably 48x48.

 

2. It is not possible to store or reuse your own variables.

 

1. Thanks that worked nicely:

TWFNDPD.png

 

2. Some variables work if you hardcode in your values as "default".  Just can't save different values.

 

Also I took out the channel field since you can set that up on the Slack WebHook Custom Integration side.

 

 

With default hardcoded values for the webhook URL, it's working nicely:

 

iJTcMdo.png

Will absolutely try this, thanks!  :)

  • 2 months later...

1. The icon image needs to be stored in folder /usr/local/emhttp/webGui/icons. The name of the icon is the name of the agent in lowercase and spaces removed. In your case "slack.png". The icon size is preferably 48x48.

 

2. It is not possible to store or reuse your own variables.

 

1. Thanks that worked nicely:

TWFNDPD.png

 

2. Some variables work if you hardcode in your values as "default".  Just can't save different values.

 

Also I took out the channel field since you can set that up on the Slack WebHook Custom Integration side.

 

 

With default hardcoded values for the webhook URL, it's working nicely:

 

iJTcMdo.png

 

1.) I wonder where unraid keeps info that notification agent was enabled.

2.) Where do i have to copy unraid logo to see it in my slack, similar you have on your pic

+1 for this feature. ;)

  • 2 weeks later...
  • Author

1.) I wonder where unraid keeps info that notification agent was enabled.

2.) Where do i have to copy unraid logo to see it in my slack, similar you have on your pic

 

1) ¯\_( )_/¯

 

2) Drop a PNG logo here: /usr/local/emhttp/webGui/icons

1.) I wonder where unraid keeps info that notification agent was enabled.

 

This is stored on your flash device under folder /config/plugins/dynamix/notifications/agents

  • 1 month later...

@jedimstr Do you mind sharing the icons you used? 

  • Author

PM'd them :)

 

On 3/15/2017 at 10:52 PM, jrdnlc said:

@jedimstr Do you mind sharing the icons you used? 

 

You should contact @Squid and make a plugin for this for the Community Applications

On 3/22/2017 at 11:45 AM, kizer said:

You should contact @Squid and make a plugin for this for the Community Applications

 

+1

  • Author

Wouldn't something like this be better off as an included Notification than a plugin in CA?

  • 5 weeks later...

Is it normal for the Slack agent to disappear after a reboot on the server? It's not longer under my notifications settings tab

1 hour ago, jrdnlc said:

Is it normal for the Slack agent to disappear after a reboot on the server? It's not longer under my notifications settings tab

If you're modifying the file according to this:

Then yes, as unRaid is unpacked fresh from every reboot, and any changes to system files are lost.  You need to set up a script or something to inject those changes you're making at every boot (probably via the user scripts plugin)

3 minutes ago, Squid said:

If you're modifying the file according to this:

Then yes, as unRaid is unpacked fresh from every reboot, and any changes to system files are lost.  You need to set up a script or something to inject those changes you're making at every boot (probably via the user scripts plugin)

 

dammit. I'll wait and see if someone can help with a user script plugin then lol

13 minutes ago, jrdnlc said:

 

dammit. I'll wait and see if someone can help with a user script plugin then lol

Make the changes again.

 

Then from the command prompt:

cp /usr/local/emhttp/webGui/include/NotificationAgents.xml /boot/NotificationAgents.xml

Then add a user script (set to run at array start) composed of

cp /boot/NotificationAgents.xml /usr/local/emhttp/webGui/include/NotificationAgents.xml

But, bear in mind that should LT incorporate Slack notifications in a future release of unRaid, then you're effectively overwriting their changes with yours.  (Generally, its not recommended to overwrite system files unless you are aware of the consequences)

Edited by Squid

16 minutes ago, Squid said:

Make the changes again.

 

Then from the command prompt:


cp /usr/local/emhttp/webGui/include/NotificationAgents.xml /boot/NotificationAgents.xml

Then add a user script (set to run at array start) composed of


cp /boot/NotificationAgents.xml /usr/local/emhttp/webGui/include/NotificationAgents.xml

But, bear in mind that should LT incorporate Slack notifications in a future release of unRaid, then you're effectively overwriting their changes with yours.  (Generally, its not recommended to overwrite system files unless you are aware of the consequences)

 

I think I will wait then if it's going to get incorporated soon. I'm in no rush to add it but it's always good to know how it's done. Thanks again!

  • 2 weeks later...

Thanks for the inspiration. This works great :)

 

Hoping for an official integration in the future. I really started like Slack for both chatting and notifications.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.