cloudwatch-logs-bridge v1.0.0
CloudWatch Logs Bridge
A project to watch for log events published to the AMQP oneflow.log.event
exchange, and push them to CloudWatch Logs.
This makes use of winston
& winston-cloudwatch
modules so we don't have to implement the same 'token' retry
logic ourselves (it's not the simplest API to submit log entries to).
TODO:
Replace the entirety of the oneflow.log.event
solution with a more universal & comprehensive logging solution
Environment Variables
DEBUG
- Standard debug moduleCONFIG_NAME
- The environment being bridged to CloudWatch LogsAMQP_URL
- The connection string to AMQPACCESS_KEY_ID
- The AWS access key with permission to publish to CloudWatch LogsSECRET_ACCESS_KEY
- The AWS secret access key with permission to publish to CloudWatch LogsREGION
- The region to publish to
Run, Testing, Coverage
To start:
npm start
To test:
npm test
To run coverage:
npm run cover
Building
This can build on CircleCI. The .circleci/config.yml
script includes everything necessary.
The only exception is that you need to set up the CircleCI SSH key to enable write access
to your github repository.
More info can be found in the Oneflow's Wiki
Environment variables required:
- CODECOV_TOKEN: to enable pushing coverage to codecov.io
Environment variables included in global context:
- NPM_TOKEN: to enable use of private @oneflow npms, and publishing to npm
- DOCKER_USER: to push a docker image
- DOCKER_PASS: to push a docker image
- DOCKER_EMAIL: to push a docker image
7 years ago