Code Monkey home page Code Monkey logo

cw-logs-to-slack's Introduction

cw-logs-to-slack

This serverless app publishes AWS CloudWatch logs to Slack based on a subscription filter.

App Architecture

App Architecture

Installation Instructions

  1. Create an AWS account if you do not already have one and login
  2. Go to the app's page on the Serverless Application Repository and click "Deploy"
  3. Provide the required app parameters (see parameter details below) and click "Deploy"

Slack Url

To get a webhook URL for this application:

  • Navigate to https://api.slack.com
  • Click on the "Start Building" button
  • Give your app a name and select a workspace
  • Under "Add features and functionality" select "Incoming Webhooks"
  • Turn on "Incoming Webhooks" and click "Add New Webhook to Workspace"
  • Select the desired channel and click "Authorize"
  • Copy the generated Webhook URL

Log Group Name

You can find the name of the log group by navigating to CloudWatch logs on the AWS console. You can also pass it in as a parameter from another stack or another resource (e.g. default lambda log group names are /aws/lambda/{lambda-function-name}).

Filter Pattern

CloudWatch logs allow you to filter logs based on a pattern. For more information, see the AWS Documentation.

App Parameters

  1. SlackUrl (required) - Webhook URL for integration with Slack
  2. LogGroupName (required) - Log group to listen to (has to be in same account and region)
  3. FilterPattern (optional) - Pattern for filtering log events. Default: ERROR
  4. OnlySendLogMessage (optional) - Option to only send log message instead of all message, id, and timestamp information. Default: False. Values: False, True
  5. LogLevel (optional) - Log level for Lambda function logging, e.g., ERROR, INFO, DEBUG, etc. Default: INFO

App Outputs

  1. LogsToLambdaName - Log Lambda Function Name
  2. LogsToLambdaArn - Log Lambda Function ARN
  3. LambdaToSlackName - Slack Lambda Function Name
  4. LambdaToSlackArn - Slack Lambda Function ARN

License Summary

This code is made available under the MIT license. See the LICENSE file.

Releases

If you would like to see a version of this application that uses code instead of other applications, see the 0.0.1 Release.

cw-logs-to-slack's People

Contributors

keetonian avatar

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.