Giter Site home page Giter Site logo

cloudwatch-aggregator's Introduction

CloudWatch Aggregator

Manage batch logging to CloudWatch and Splunk from an HTTP POST with JSON in a non-blocking manner

Dependencies

You'll need to copy .env.example to .env and populate accordingly depending on which logging platform(s) you're using.

pipenv install
pipenv shell

Build

# build only
./scripts/build

Run

# build and run
./scripts/run

Linting/pre-commit

Linting will run automatically with black in a pre-commit hook, but you'll need to run pre-commit install first. You can also run it manually with pre-commit run -a.

Additionally, the pre-commit will update the requirements.txt file if the Pipfile.lock has been updated. The requirements.txt file is needed for Synk to run its security scans.

Configuration

There are multiple logging platforms you can configure to send log events to via environment variables/deployment params:

CloudWatch

Environment Variable/Param Type: Description
LOG_TO_CLOUDWATCH boolean: whether or not to log to CloudWatch
AWS_ACCESS_KEY_ID string: AWS access key ID for CloudWatch
AWS_SECRET_ACCESS_KEY string: AWS secret access key for CloudWatch
AWS_REGION_NAME string: AWS region for CloudWatch
AWS_LOG_GROUP string: CloudWatch log group name
CLOUD_WATCH_ALLOWED_STREAMS string: comma-separated list of allowable CloudWatch log streams

Splunk

Environment Variable/Param Type: Description
LOG_TO_SPLUNK boolean: whether or not to log to Splunk
SPLUNK_DEBUG boolean: whether or not to enable debug logs for Splunk
SPLUNK_HOST string: Splunk host
SPLUNK_PORT integer: Splunk port
SPLUNK_TOKEN string: Splunk API token
SPLUNK_INDEX string: Splunk index name for logs
SPLUNK_WAIT_ON_QUEUE boolean: ensures logs aren't dropped when queue fills if true
SPLUNK_FORMAT_JSON boolean: will convert from dict to JSON when true

cloudwatch-aggregator's People

Contributors

astrozzc avatar casey-williams-rh avatar coderbydesign avatar lpichler avatar mjholder avatar petracihalova avatar stevehnh avatar xxlhacker 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.