GithubHelp home page GithubHelp logo

cglrkn / slack-to-opsgenie-alert-creator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opsgenie/slack-to-opsgenie-alert-creator

0.0 1.0 0.0 262 KB

Create alerts from messages sent to a Slack channel

JavaScript 100.00%

slack-to-opsgenie-alert-creator's Introduction

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 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

In Slack

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

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!

slack-to-opsgenie-alert-creator's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.