0.01
No commit activity in last 3 years
No release in over 3 years
OpenTSDB, SignalFX and DatadogApi reporter for Metriks.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 0.10

Runtime

= 1.23.0
>= 0.9.9.7, ~> 0.9
>= 1.6.7
>= 0.1.0
 Project Readme

Utilities for collecting metrics in a Rails Application

Build Status

This gem provides utilities for collecting and reporting metrics in a Rails Application. This gem uses metriks.

The first category of utilities is Reporters.

Reporters

Reporters are available for OpenTSDB, SignalFX and AWS Cloudwatch. The design is heavily inspired by [Librato Reporter] (https://github.com/eric/metriks-librato_metrics)

OpenTSDBReporter

  reporter = Metriks::OpenTSDBReporter.new(host, tags, options)
  reporter.start
  1. host: hostname of OpenTSDB
  2. tags: A hash of tags that should be associated with every metric.
  3. options: A hash to control behavior of the reporter. Valid options are:

SignalFXReporter

  reporter = Metriks::SignalFXReporter.new(token, tags, options = {})
  reporter.start
  1. token: Token provided by SignalFX
  2. tags: A hash of tags that should be associated with every metric.

CloudWatchReporter

  reporter = Metriks::CloudWatchReporter.new((access_key, secret_key, namespace, tags, options = {}))
  reporter.start
  1. access_key: Access Key provided by AWS
  2. secret_key: Secret Key provided by AWS
  3. namespace: AWS CloudWatch namespace of the metric
  4. tags: A hash of tags that should be associated with every metric.

Options

All reporters accept a hash of options. Options are used to control the behavior of the reporter.

Option Description (Default)
prefix Add a prefix to the metric name ()
batch_size Number of metrics to report in a API call (50)
logger Logger for debug and info messages (nil)
registry Metriks::Registry to use. (Metriks::Registry.default)
interval Interval between two runs (60 secs)