Coder Social home page Coder Social logo

bhang / stackdriver-statsd-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stackdriver/stackdriver-statsd-backend

0.0 2.0 0.0 91 KB

Backend plugin for statsd to publish output to the Stackdriver custom metrics API

License: MIT License

JavaScript 100.00%

stackdriver-statsd-backend's Introduction

stackdriver-statsd-backend

Backend plugin for statsd to publish output to the Stackdriver custom metrics API over HTTPS.

Installation

Install statsd normally. We'll call the root directory of the statsd install $STATSD_HOME

From your $STATSD_HOME directory run $ npm install stackdriver-statsd-backend will install this module into the appropriate place, and the configurations below will reference it as a backend.

For now you can pull stackdriver.js and put it in the backends directory of your statsd and it will be configurable like below.

Configuration Examples

To set up the Stackdriver backend, you need a Stackdriver account and API key. Everything else is optional. Any of the configurations below can be put into a stackdriverConfig.js and used as a statsd config on startup.

$ bin/statsd stackdriverConfig.js

Please set flushInterval to 1 minute (60000 milliseconds) or more, as that is the highest frequency we support at this time (another good reason to use this statsd plugin).

{
    flushInterval: 60000,
    backends: [ "stackdriver-statsd-backend"], 
    stackdriver: {
        apiKey: "YOUR_API_KEY_HERE"
    }
}

To associate the metrics with a particular instance (such as the one statsd is running on) add the source parameter to your configuration. The custom metrics generated will be associated with that AWS or Rackspace Cloud instance. For AWS, instance ID is in the form i-00000000.

{
    flushInterval: 60000,
    backends: [ "stackdriver-statsd-backend"], 
    stackdriver: {
        apiKey: "YOUR_API_KEY_HERE",
        source: "AWS Instance ID here"
    }
}

To output additional logging information, add the debug parameter set to true. It will be more verbose, and can be helpful to tell what exactly is being sent to Stackdriver.

{
    flushInterval: 60000,
    backends: [ "stackdriver-statsd-backend"], 
    stackdriver: {
        apiKey: "YOUR_API_KEY_HERE",
        debug: "true"
    }
}

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.