Giter VIP home page Giter VIP logo

alphagov.digitalmarketplace-cloudwatch-to-graphite's Introduction

Digital Marketplace Cloudwatch to Graphite

As of January 2019 this repo is no longer used by the Digital Marketplace, as we have switched to using Prometheus and alphagov/paas-prometheus-exporter.

Purpose

Ships Cloudwatch metrics to Hosted Graphite. Based on the work of https://github.com/crccheck/cloudwatch-to-graphite and the leadbutt script. Particularly config parsing to define metrics.

An example config file is included (config.yaml.example) to help you define the correct structure for your metrics.

Initial setup

Setup a virtualenv, activate it and install python dependencies with pip

virtualenv venv
source venv/bin/activate
pip install -r requirements-dev.txt

Generate config.yaml

The config.yaml file defines what metrics are to be shipped to graphite. It is generated from the config.yaml.j2 Jinja template using:

scripts/generate-config-yaml.py

To run locally

Set the required environment variables

export HOSTED_GRAPHITE_API_KEY=your-key-here
export AWS_ACCESS_KEY_ID=your-access-key-id-here
export AWS_SECRET_ACCESS_KEY=your-secret-access-key-here

...and run

python app.py

To deploy on PaaS

If you haven't done so already, go through the "Initial Setup" section above.

You will also need to create a manifest file using the example manifest (manifest.yml.example), filling in the necessary environment variables. You can then deploy this to the PaaS by running:

cf push -f manifest.yml

alphagov.digitalmarketplace-cloudwatch-to-graphite's People

Contributors

allait avatar benvand avatar idavidmcdonald avatar katstevens avatar lfdebrux avatar risicle avatar sakisv avatar samuelhwilliams avatar wynndow 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.