Skip to content

Commit

Permalink
Update readme, add diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
keetonian committed Jan 17, 2019
1 parent 9a5e202 commit 352105c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,45 @@
# cw-logs-to-slack

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

## App Architecture

TODO: arch diagram
![App Architecture](https://github.com/keetonian/cw-logs-to-slack/raw/master/images/cw-logs-to-slack.png)

## Installation Instructions

1. [Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) if you do not already have one and login
1. Go to the app's page on the [Serverless Application Repository](TODO) and click "Deploy"
1. Go to the app's page on the [Serverless Application Repository]() and click "Deploy"
1. 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html).

## App Parameters

1. `SlackUrl` (required) - Webhook URL for integration with Slack
1. `LogGroupName` (required) - Log group to listen to (has to be in same account and region)
1. `FilterPattern` (optional) - Pattern for filtering log events. Default: ERROR
1. `LogLevel` (optional) - Log level for Lambda function logging, e.g., ERROR, INFO, DEBUG, etc. Default: INFO
1. ...

## App Outputs

1. `MyFunctionName` - My Lambda function name.
1. ...
1. `LogsToSlackName` - Lambda function name.
1. `LogsToSlackArn` - Lambda function ARN.

## License Summary

This code is made available under the TODO license. See the LICENSE file.
This code is made available under the MIT license. See the LICENSE file.
Binary file added images/cw-logs-to-slack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 352105c

Please sign in to comment.