Giter Club home page Giter Club logo

chimney's Introduction

Chimney

Collects smoketest results and funnels them to graphite.

Chimney will poll a set of URLs that correspond to applications running django-smoketest (or something that outputs results in the same format), collects their results and submits them to a central Graphite server. Pretty straightforward.

Running

$ chimney -config=/path/to/chimney/config.json

Ctrl-C to stop it. You probably want to keep it running with something like upstart or supervisord, though.

Configuration

Here's a sample config file:

 {
     "GraphiteBase": "graphite.example.com:2003",
     "PollInterval": 300,
     "Jitter": 20,
 
     "Tests": [
         {
             "Url": "http://app1.example.com/smoketest/",
             "MetricPrefix": "smoketest.app1."
         },
         {
             "Url": "http://app2.example.com/smoketest/",
             "MetricPrefix": "smoketest.app2."
         },
         {
             "Url": "http://app3.example.com/smoketest/",
             "MetricPrefix": "smoketest.app3."
         }
     ]
}

It's just JSON. Mind your trailing commas though.

We tell chimney where the Graphite/Carbon server is for it to send results to. Then we tell it to poll each test roughly every five minutes (with 20 seconds of random jitter to avoid thundering herds). We tell it about three different applications that have smoketest URLs. Each just needs to have the URL for the smoketests and a prefix for graphite.

Chimney will spawn a thread for each test (goroutine, actually) that, once per interval specified, makes a GET request to the test URL (with Accept: application/json), parses the results, and sends them along to Graphite under the appropriate label.

A typical response from a smoketest might look something like this:

{"status": "FAIL",
 "tests_failed": 1,
 "errored_tests": ["app1.smoke.Test.test_connectivity"],
 "tests_run": 19,
 "test_classes": 10,
 "tests_passed": 17,
 "time": 1298.7720966339111,
 "failed_tests": ["app1.main.smoke.Test.test_watchdir"],
 "tests_errored": 1}

Chimney will turn that into Graphite metrics like (assuming this is 'app1' per the configuration above):

smoketest.app1.run 19
smoketest.app1.passed 17
smoketest.app1.classes 10
smoketest.app1.failed 1
smoketest.app1.errored 1
smoketest.app1.time 1298.7720966339111

Docker

There's also a docker packaged version of chimney available. Run it like:

$ docker run -v /path/to/config.json:/etc/chimney/config.json ccnmtl/chimney

chimney's People

Contributors

nbuonin avatar nikolas avatar sdreher avatar thraxil avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chimney's Issues

Chimney should read status code on 500, 404, etc

Chimney can fail like this when we get an error:

level=error msg="error parsing JSON" URL="http://example.com" error="invalid character '<' looking for beginning of value"

This can be improved to fail earlier before it tries to parse the response as json.

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.