Categories

ID #1400

Monitoring integration with Slack

Slack integration script for Bright Cluster Manager

Slack integration with Bright Cluster Manager monitoring is available via a built-in action script.
This script can be found under /cm/local/apps/cmd/scripts/actions/post_to_slack_web_hook.py.

 

Slack authentication

The script requires a slack webhook to be configured (the configuration process is explained later in the article) in order to send messages to slack.

 

The supported authentication methods are:

  1. Passing the webhook url to the script as an argument in the monitoring configuration of Brightview or cmsh.
  2. Create a /root/.slackrc file and adding APP_SLACK_WEBHOOK=https://the-slack-url

 

Configuring the Slack webhook

In Slack, find the "Manage Apps" option in the main slack menu. Open the "Custom Integrations" Menu.


Slack 1

 

Click add configuration.

 

Slack-2

 

Configure the webhook settings as per the example below. Once complete, click save.
Now copy the webhook URL.

Slack-3

 

 

Configuring a Slack action in Brightview

In Brightview, navigate to the monitoring pane, select "Actions" and create a new script action as per the screenshot below. Paste in your Slack webhook URL as a parameter. Click save once complete.

 

Slack-4

 

Finally, you will need to apply the action to a trigger.
Navigate to the monitoring pane, select "Triggers". Clone the existing "Failing health checks" trigger, call it "Slack Failing health checks". Complete, the configuration below by adding the "Send message to slack" as an enter action for the trigger. Once complete, click save.

 

Slack-6

 

Now, once a health check returns a fail, a message will be posted in slack.

Slack-5

attached files: slack-1.png, slack-2.png, slack-3.png, slack-4.png, slack-5.png, slack-6.png

Tags: -

Related entries:

You cannot comment on this entry