GithubHelp home page GithubHelp logo

statsd-jut-backend's Introduction

statsd-jut-backend Build Status: Linux

statsd-jut-backend is a backend module for StatsD that allows users to write StatsD metrics directly into a Jut HTTP receiver.

Installing

Change to the StatsD root directory and execute the following:

npm install statsd-jut-backend

This should install the Jut backend module in the correct location. Alternatively, all of the .js files can be copied into the StatsD backend directory.

Configuring

First enable the Jut backend in StatsD config.js:

backends: ['./backends/graphite', 'statsd-jut-backend']

Then create a new config section for the Jut backend:

jut: {
    url: 'http://example.jut.io:9000/?source_type=metric'
}

Of course, use your own receiver URL from the Jut setup app.

Please see jut-config.js for more detailed information on configuring the backend.

Tagging

Each point is automatically given a number of tags before it is sent to the Jut receiver:

{
  "metric_type": "<counter|gauge|timer>",
  "name": "<name of metric"",
  "time": <epoch time in ms>,
  "value": <raw value>,
  "source_type": "metric",
  "stat": "<sum|avg|upper|etc..(mainly for timer)>",
  "interval": <statsd flush interval in ms>
}

In addition, arbitrary tags can be added to every point by setting jut.tags. This can be useful for identifying which part of the infrastructure the data originates from.

Key-Value Parsing

The Jut backend optionally supports tagging metrics based upon key-value pairs that are embedded in the name of a metric. To enable, first set jut.split_keys to true in config.js.

Now a tag can be created by separating the key from the value with __. This is easier indicated with an example:

pizza.topping__pepperoni.diameter_inches__18

This will send a metric to the Jut system with the name pizza, tagged with topping=pepperoni and diameter_inches=18. This is in addition to any standard tags that are applied to every point. Note that some tags are reserved for internal use (please see RESERVED_TAGS in lib/parse.js).

Testing

npm install
npm test

TODO

  • Implement sets and some more obscure StatsD metric types

statsd-jut-backend's People

Contributors

adittes avatar demmer avatar

Watchers

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

Forkers

adittes jut4eva

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.