Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opsgenie/slack-to-opsgenie-alert-creator
Create alerts from messages sent to a Slack channel
https://github.com/opsgenie/slack-to-opsgenie-alert-creator
opsgenie serverless slack
Last synced: 3 months ago
JSON representation
Create alerts from messages sent to a Slack channel
- Host: GitHub
- URL: https://github.com/opsgenie/slack-to-opsgenie-alert-creator
- Owner: opsgenie
- Created: 2016-12-11T08:05:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-07T10:00:31.000Z (over 1 year ago)
- Last Synced: 2024-05-29T00:26:50.941Z (6 months ago)
- Topics: opsgenie, serverless, slack
- Language: JavaScript
- Homepage:
- Size: 256 KB
- Stars: 27
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slack to OpsGenie Alert Creator
Some of our customers want a way to create alerts from messages sent to a Slack channel.
This is a sample Lambda function to help you achieve this.It is an `Outgoing WebHook` application for Slack. Slack will post the messages sent to a channel to our API Gateway endpoint and we will create an alert in OpsGenie by using our AWS Lambda function.
## Prerequisites
* Install Node.js and npm
## How to use
- Clone or download the repository
- In repository's folder run `npm install` command- Install serverless for easy deployment, it will deploy lambda function and create an API Gateway endpoint automatically
- Run `npm install -g serverless` to install `serverless` globally
- Update `serverless.yml` file by entering `slackToken` (received from Slack integration page) and `opsgenieApiKey` (received from OpsGenie Api Integration) environment variables
- [Follow these instructions on setting up AWS credentials for Serverless](https://serverless.com/framework/docs/providers/aws/guide/credentials/) if you haven't done already
- Run `serverless deploy` and all you want will be ready at a glance!
- Copy the link from the command line (one in the orange square in the image below) or you can always find it in your AWS account's API Gateway service
- Paste it to your Slack integration
- You can always take it back by running `serverless remove` command![serverless-deploy.png](images/serverless-deploy.png)
### In Slack
- Go https://slack.com/apps/build/custom-integration and add a new Outgoing Webhooks integration
![custom-integration.png](images/custom-integration.png)
- Configure your Outgoing Webhook
- Select a channel (optional)
- Select a keyword (optional)
- Paste the url received after deployment (Api Gateway URL)
- Copy `token` and paste it to `serverless.yml`'s slackToken field![slack-configuration.png](images/slack-configuration.png)
### So you need more?
If you want to create a fully featured Slack application with slash commands, events, and interactive messages, you might want to look at https://github.com/johnagan/serverless-slack-app repository. It really does a lot for you!