Quantcast
Channel: THWACK: Discussion List - All Communities
Viewing all articles
Browse latest Browse all 16365

Alerting using #Slack

$
0
0

Hi,

 

Thought i'd put this up here, as i've found it massively useful - and it has completely changed out alerting strategy - for the better. Those of you that don't know, Slack is a messaging / collaboration tool - allowing you to create channels for discussions on different subjects across your team. All IT teams in our company use it across 3 sites, and it is a great tool. One of the best things about it, is that you can send information to slack using the API.

 

This enables us to have channels dedicated to Alerts triggered from Solarwinds. People that need to know about things subscribe to the relevant channels, then others that might want to know, but don't need to be alerted can also subscribe but turn off notifications. The up shot is, that everyone knows where to look first in the event of an issue - especially for IT users that don't use solar winds directly (i.e. devs that might be deploying code having issues etc) Slack has a windows app with desktop notifications, iPhone / android apps with push notifications - so alerts can be actioned by the right people straight away. It also triggers conversation on the problem, which is great. here is an example of a couple of our simple alerts:

 

slack1.PNG

 

slack2.PNG

 

As you can see, you can pass information in the same way you can emails, so any useful information to make the alert more descriptive the better. Reboot alert allows users to just click the link to acknowledge they rebooted it (and notify the channel that they did the reboot)

 

The same goes for reset actions

 

slack3.PNG

You get the idea.

 

Configuring these alerts is just simple JSON - Slack is has a free tier, so there is no cost in using it - once you have signed up you can then manage your integrations on the preferences page.

 

For Slack:

 

Create a channel in Slack for your alerts

Create a new Integration > choose Incoming webhook

 

You will be given a Webhook URL - make a note of it

Choose which channel the alerts will go to

 

For Solarwinds:

 

For any currently configured alert, you can just add a new alert action Send a GET or POST to a web server

 

In the Configure action change the radio button to use HTTP POST

 

In the URL use the URL you were given in the Slack incoming webhook configuration

 

In the body to post, this is what will be posted and should be in JSON format. Solarwinds for some reason doesnt like the 'proper' format, so example, you can't have line breaks or spaces to make the code easier to read, you need to have it as 1 line. This is a pain for editing and working out what you want to post, so i recommend using sublime or some other text editor to write it out, then copy and paste it into the alert. So to get the Reboot alert:

 

payload={"text":"${N=SwisEntity;M=Caption} Has Rebooted", "attachments":[{"text":"Alert: ${N=Alerting;M=AlertName}.${N=Alerting;M=AlertDetailsUrl} If this was you, please acknowledge here: ${N=Alerting;M=AcknowledgeUrl} ", "title": "${N=SwisEntity;M=Caption} has rebooted.  ","title_link": "${N=SwisEntity;M=DetailsUrl}","color":"#FEE529" }]}

 

There are different parts to the alert, so you have the title, then the text, then the attachments text - there might be a better way to lay this out, but i couldnt get it to work. The variables can be anything that you can put in an email or any other alert. the color setting is just the color in the slack notification.

 

So that's pretty much it - its a simple way of getting people to chat and discuss alerts without distracting emails to people that don't care, all level 1 alerts we have now come into slack channels, separated by team or service. you don't end up with an inbox full of useless alerts, notifications are pushed to mobile too - so everyone is up to speed regardless of where they are.


Viewing all articles
Browse latest Browse all 16365

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>