Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiskolabs/heroku-cloudwatch-drain
A Heroku log drain that saves logs to the AWS Cloudwatch logging service
https://github.com/kiskolabs/heroku-cloudwatch-drain
Last synced: about 5 hours ago
JSON representation
A Heroku log drain that saves logs to the AWS Cloudwatch logging service
- Host: GitHub
- URL: https://github.com/kiskolabs/heroku-cloudwatch-drain
- Owner: kiskolabs
- License: mit
- Created: 2016-10-16T09:55:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T10:50:02.000Z (almost 2 years ago)
- Last Synced: 2024-06-19T00:36:56.982Z (5 months ago)
- Language: Go
- Size: 2.48 MB
- Stars: 40
- Watchers: 20
- Forks: 34
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# heroku-cloudwatch-drain
A Heroku HTTPS log drain that stores logs in CloudWatch Logs.
[![Build Status](https://travis-ci.org/kiskolabs/heroku-cloudwatch-drain.svg?branch=master)](https://travis-ci.org/kiskolabs/heroku-cloudwatch-drain)
## Getting started
### Heroku
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
### Locally
Build and install:
$ go install
Run:
$ heroku-cloudwatch-drain
## Configuration
See all available configuration flags:
$ heroku-cloudwatch-drain -h
The AWS configuration is picked up from the environment. For a full list of
environment variables and other ways to configure the AWS region, credentials,
etc., see the [SDK
Configuration](http://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html)
page.## Exception reporting
Set the `HONEYBADGER_API_KEY` environment variable to report panics and errors to Honeybadger.
If you've deployed heroku-cloudwatch-drain to Heroku, see [Honeybadger's Heroku specific instructions](http://docs.honeybadger.io/guides/heroku.html) for more detailed information.
## New Relic Integration
Set the `NEW_RELIC_LICENSE_KEY` environment variable to enable the New Relic integration. Optionally, you can set the `NEW_RELIC_APP_NAME` to customize the app name on New Relic.
## Sending logs
Logs should be sent to this application, with the log group name as the URL
path. For example, if the heroku-cloudwatch-drain is available at
`https://drain.example.com/`, and you wish to collect logs under the log group
name `my-app`, the log drain URL should be `https://drain.example.com/my-app`.HTTP Basic Auth is supported and can be configured via CLI flags.
Both the CloudWatch Logs log group and log streams are created automatically as
requests come in. A new and unique log stream is created for each process.## AWS IAM permissions
The IAM policy containing the minimum required permissions to run this is:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:PutRetentionPolicy"
],
"Resource": [
"*"
]
}
]
}
```## Contributing
The [govendor](https://github.com/kardianos/govendor) tool is used for managing
the `vendor` directory.Run tests:
$ govendor test +local