How do I configure Slack as alert service

Status
Not open for further replies.

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
I know it's supported - it's listed in documentation, I can find it in the UI - but I literally don't know what do I put in which field.
Documentation pretty much only says it's there, and I wasn't able to find more information on the forums.
Can someone tell me how can I configure it?
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
It's a fairly new feature, but the basics are select the service, fill in the information it asks for.

http://doc.freenas.org/11/system.html#alert-services
Select System → Alert Services to go to the Alert Services screen. Click Add Service to display the dialog shown in Figure 5.9.1.

alertservice-add1.png

Fig. 5.9.1 Add Alert Service

The Service Name drop-down menu is used to pick a specific alert service. The fields shown in the rest of the dialog change to those required by that service. Enter the required information, check the Enabled checkbox, then click OK to save the settings.

System alerts marked WARN or CRITICAL are sent to each alert service that has been configured and enabled.

Alert services can be deleted from this list by clicking them and then clicking the Delete button at the bottom of the window. To disable an alert service temporarily, click Edit and remove the checkmark from the Enabled checkbox.
 

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
It's a fairly new feature, but the basics are select the service, fill in the information it asks for.

http://doc.freenas.org/11/system.html#alert-services
Like I already mentioned I read the documentation.
I don't know what information should go in which field, and it isn't documented at all.
Documentation doesn't mentions what these are:
1. Clustername
2. URL / incoming-webhook url (https://api.slack.com/incoming-webhooks)

What should be put into the username? My slack e-mail nick, or what would I want my FreeNAS to display as?

EDIT--
If I configure it (like I think it should be configured) how can I test if it works?
 
Last edited:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What should be put into the username?
Presumably what you need to login, which I guess is unique to the server in any useful scenario.
 

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
Presumably what you need to login, which I guess is unique to the server in any useful scenario.
Thanks for your great insight, I wouldn’t have figured it out by myself. Meanwhile it’s still not working and the documentation hasn’t changed a bit.
 

jg3

Dabbler
Joined
May 17, 2017
Messages
20
I put my own username and left the cluster blank, it seems to have joined my channel. I suppose I'm waiting for a WARN or CRITICAL event to find out :(
 

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
I put my own username and left the cluster blank, it seems to have joined my channel. I suppose I'm waiting for a WARN or CRITICAL event to find out :(
Thanks! I configured it as you mentioned. Got both event types, didn't work. And thanks to lack of any kind of documentation for this I have no idea why.
 
Joined
Jun 27, 2017
Messages
3
I had a critical error after I set up Slack notifications and never got anything. In terms of settings, I used a made up username (FreeNAS) which I assumed Slack would interpret as the 'shared by' name in the channel. I set my channel to an existing channel (in my case #freenas). The URL was set to a webhook I created in Slack. Checked the boxes for 'detailed' and 'enabled'. Not sure what else needed to be done. I recall there being talk of a test button being added at some point for notification services, but I wonder how one might test it in the mean time?
 

jg3

Dabbler
Joined
May 17, 2017
Messages
20
I got this message so I guess it is working. I'm not sure what to do with the information in it, but sounds like something (scary) happened!
Slack Message from FreeNAS.png

yg01m
 

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
I got this message so I guess it is working. I'm not sure what to do with the information in it, but sounds like something (scary) happened! View attachment 21062
yg01m
Nice!
Can you post a screenshot of your Slack notification config?

PS: Go to System>Boot, click on ‚Status’ to see which device failed.
Your boot pool (where FreeNAS was installed -probably a USB Flash drive(s)) has a failed device, you’ll need to replace it.


Wysłane z iPad za pomocą Tapatalk
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
You have a potentially-corrupted boot device that should be at least checked (and most likely replaced if it is a USB stick) following the guide's information for your version of FreeNAS.
 

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
I got this message so I guess it is working. I'm not sure what to do with the information in it, but sounds like something (scary) happened! View attachment 21062
yg01m

So did you use your slack username, email address, or something just for this alert?

I've tried all of the above 3, but any time that I click on send test alert I get a little window on the top that says 'Failed to send fake alert' but gives zero indication as to why.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Sending test alerts has been overhauled in 11.1, as I understand it. You might want to check out the BETA1 and see if things are indeed improved.
 

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
Sending test alerts has been overhauled in 11.1, as I understand it. You might want to check out the BETA1 and see if things are indeed improved.
I'm running beta1, and this is the only feedback there is:
Screen Shot 2017-10-30 at 4.10.47 PM.png


That pops up on the top for a few seconds, no output in any log that I can find.

Also, the 'Send Test Alert' option that is mentioned in the doc is only available in the old UI not in the new one.
 

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
OK, so I installed 11.1-RC1 beta this morning, and now the fake alerts are firing and heading in to Slack as expected. The only piece of information that is needed is the URL for the webhook. Everything else is set in the webhook itself, so unless you want to override the username/channel you can leave them blank.

Is it on the roadmap to allow you select what else can be send in these alerts? I just tried a UPS test, and unplugged it from power. When I did I got my alert email that the UPS was on battery, but got nothing through Slack.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Yes, a full revamp of the alerts system is on the roadmap.
 

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
Yes, a full revamp of the alerts system is on the roadmap.
Thanks! I waited patiently for multiple NICs on VMs and finally have that, so I will anxiously await this feature next :)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I'm not sure if it's scheduled for 11.2 or 11.3, but it includes the ability to select which alerts are sent to what services.
 

alx.balmus

Cadet
Joined
Jan 27, 2018
Messages
2
All you need to set up in the Slack Alert configuration window in FreeNAS is the Webhook URL.
The Webhook URL behaviour and configuration can be done ont he Slack website. You can configure there the username, channel, and icon.
slack-alert-freenas.png
 
Last edited:

mykolaq

Explorer
Joined
Apr 10, 2014
Messages
61
doesnt work for me. sent fake messages (not all) and no more =(
FreeNAS-11.1-U5
 
Status
Not open for further replies.
Top