1.0.0 • Published 7 years ago

cloudwatch-logs-bridge v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

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 module
  • CONFIG_NAME - The environment being bridged to CloudWatch Logs
  • AMQP_URL - The connection string to AMQP
  • ACCESS_KEY_ID - The AWS access key with permission to publish to CloudWatch Logs
  • SECRET_ACCESS_KEY - The AWS secret access key with permission to publish to CloudWatch Logs
  • REGION - 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