Skip to content

Latest commit

 

History

History
79 lines (58 loc) · 2.37 KB

README.md

File metadata and controls

79 lines (58 loc) · 2.37 KB

StatsD CloudWatch Backend

This is a pluggable backend for StatsD. It publishes stats to Amazon's AWS CloudWatch.

wercker status

Counters, Gauges, and Timers are supported. Sets are not implemented yet.

Be aware that AWS CloudWatch metrics are not free and the cost can quickly become prohibative. Pricing details: Amazon CloudWatch Pricing. This may be a good choice if your needs are simple and/or as a means of quickly getting off the ground, as setting up Graphite in EC2 is not trivial.

Requirements

Installation

$> cd /path/to/statsd
$> npm install statsd-cloudwatch-backend

Configuration

Add statsd-cloudwatch-backend to the list of backends in the StatsD configuration file:

{
  backends: ['statsd-cloudwatch-backend']
}

Add the following basic configuration information to the StatsD configuration file.

{
  cloudwatch: {
    namespace:  'my.api',
    region: 'us-west-2',
    dimensions: {},
    accessKeyId:  '<YOUR ACCESS KEY ID>',
    secretAccessKey: '<YOUR SECRET ACCESS KEY>',
    whitelist: ['.*'],
    blacklist: ['statsd\\.'],
    metricsLimit: 0
  }
}
  • namespace {String} - aws cloudwatch metrics namespace
  • region {String} - aws region where to send data to
  • [dimensions={}] {Map} - optional;
  • [accessKeyId] {String} - optional; aws access key
  • [secretAccessKey] {String} - optional; aws secret access key
  • [whitelist=['.*']] {Array.{String}} - optional; whitelist of metrics
  • [blacklist=['.statsd\\.']] {Array.{String}} - optional; blacklist of metrics
  • [metricsLimit=0] {Number} - optional; limit of unique metrics that can be sent out in total

White- and Blacklisting

A given metric will only be sent to AWS Cloudwatch if there is at least one matching whitelist entry and no matching blacklist entry.