Giter Club home page Giter Club logo

arthur-tools's Introduction

 _____     _   _              _____         _     
|  o  |___| |_| |_ _ _ ___   |_   _|___ ___| |___ 
|     |  _|  _|   | | |  _|    | | | o | o | |_ -|
|__|__|_| |_| |_|_|___|_|      |_| |___|___|_|___|

Arthur Tools

We have some tools that we developed originally for Project Arthur which then appeared to be more generally useful. So here they are.

Sending CloudWatch logs to Elasticsearch Service

The package cloudwatch_logs contains a service that enables to easily send logs from CloudWatch into a Elasticsearch Service.

See the README for more details about installatioon and usage.

JSON-formatted Logging

The package json_logging supports regular Python logging to be formatted as JSON which makes it much easier to poss-process, for example, for example by loading log lines into an Elasticsearch cluster.

See the README for more details about installatioon and usage.


Older stuff that needs to be updated

Deploying CloudFormation templates

The script do\_cloudformation.sh will help with deploying CloudFormation templates and then updating or tearing down the stacks.

Examples for Arthur ETL:

AWS_PROFILE=cloudformation-development \
  ../arthur-tools/bin/do_cloudformation.sh create dw-cluster dev \
  VpcStackName=... MasterUsername=... MasterUserPassword=... NodeType=... NumberOfNodes=... QueryConcurrency=...

Deploying Lambdas

This will be a combination of uploading a deployment package and then updating the stack to move the Lambda to the new version. See examples in the log_processing directory.

Centralized logging

Our ELK stack is really Elasticsearch + Lambda + Kibana where we use Lambdas to pull in logging information from Lambdas, Services, and Applications.

Contributing

Running linters

Until we have a setup with Docker, let's use a virtual environment.

Installation

python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade --requirement requirements-linters.txt

Usage

For example for cloudwatch_logs:

source venv/bin/activate

black cloudwatch_logs/cw_logs_to_es/
flake8 cloudwatch_logs/cw_logs_to_es/
isort cloudwatch_logs/cw_logs_to_es/
mypy cloudwatch_logs/cw_logs_to_es/

arthur-tools's People

Contributors

dependabot[bot] avatar marwamc-hs avatar michael-john-fu avatar thomas-vogels avatar tvogels01 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arthur-tools's Issues

Pull in tags for logging of Lambda functions

Functions should be able to declare a set of tags that they want to have in the logs.

Assuming the Lambda has a tag of "team" that is set to "arthur", a call like this

update_context(tags=["team"])

Should result in "team":"arthur" in the log record.

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.