Send alert notifications from Amazon AWS CloudWatch to Mattermost channels via AWS SNS.
Originally developed by Carlos Tadeu Panato Junior.
-
Go to System Console > Plugins > AWS SNS:
-
Set the channel to send notifications to, specified in the format
teamname,channelname
. If the specified channel does not exist, the plugin will create the channel for you.- Note: Must be the team and channel handle used in the URL. For example, in the following URL, set the value to
myteam,mychannel
: https://example.com/myteam/channels/mychannel
- Note: Must be the team and channel handle used in the URL. For example, in the following URL, set the value to
-
Set authorized users who can accept AWS SNS subscriptions. Must be a comma-separated list of user ID's.
- Tip: Use the mattermost user search CLI command to determine a user ID.
-
Set the username that this integration is attached to.
-
Generate a token used for an AWS SNS subscription. Copy this value as you will use it in a later step.
-
Go to System Console > Plugins > Management and click Enable to enable the AWS SNS plugin.
Note: If you are running Mattermost v5.11 or earlier, you must first go to the releases page of this GitHub repository, download the latest release, and upload it to your Mattermost instance following this documentation.
-
Create an AWS CloudWatch alarm for your instance.
-
Create an AWS SNS Topic with an HTTPS subscription to https://your-mattermost-url/plugins/com.mattermost.aws-sns?token=your-mattermost-token`, where
your-mattermost-url
refers to your Mattermost URL, andyour-mattermost-token
was generated on a previous step. Follow this documentation for additional configuration options. -
Switch to the Mattermost channel you configured to receive notifications. Accept the subscription posted to the channel by clicking the "Confirm" button.
-
Configure your AWS CloudWatch Alarms to use the topic you created previously.
You're all set! Alerts should now get posted from AWS CloudWatch to Mattermost.
This plugin contains a server portion.
Use make dist
to build distributions of the plugin that you can upload to a Mattermost server.
Use make check-style
to check the style.
Use make deploy
to deploy the plugin to your local server.
For additional information on developing plugins, refer to our plugin developer documentation.