Slack
Feature
Germain Alerts can automatically be displayed onto your Slack channels.
Configure
Germain integrates with Slack using the Germain’s HTTP actions. In this use case, Slack API allows you to post your critical alerts (triggered by configurable SLAs or Schedule) as messages to a Slack Channel in real-time.
Create Slack App
If you have not already done so, you will need to create a Slack App and grant the App required permissions. Please follow the quick guide here to do so. Also ensure to grant the App “chat:write.public“ permission, in case it was not mentioned in the guide link provided.
After completing the setup, the minimum permissions required are shown below.
Automate posting of Germain Alert into Slack
Posting a new message can be done by doing a HTTP POST request to the Slack endpoint as shown by below call.
curl "https://slack.com/api/chat.postMessage" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--header "Authorization: Bearer xoxb-your-token" \
--data "{'channel': 'YOUR_CHANNEL_ID','text':'Germain has detected CPU Utilization is 91% which is higher than the normal percentage.'}"
This same scenario can be automated with Germain HTTP Action by following the below steps.
Germain Workspace > Left Menu > Automation > HTTP
In this screen you'll be able to easily spot which HTTP actions are available and configured to trigger on SLAs.
Clicking on an existing action will bring you to the respective configuration page.
In order to create a new HTTP action we'll click the + symbol up top which will bring up our HTTP Action Wizard
Step 1 - Action
Type in the action name, “Slack Message Creation - CPU Alert”, Execution count as 1 and click Next.
Step 2 - HTTP Request
Type in the details as per the below table.
Field | Value |
---|---|
Path | |
Request Method | POST |
Content Type | application/json |
Request Body |
CODE
|
Expected Response | 201 |
HTTP Headers |
|
Step 3 - HTTP Request
For this example, we would create a new Slack message once CPU Usage SLA has been breached.
Click Finish.
The above example while simplified showcases how simple it would be to configure automation of Slack message posting to a Channel using the Germain.
Component: Engine
Feature Availability: 8.6.0 or later