cloudfoundry/statsd-injector

Name: statsd-injector

Owner: Cloud Foundry

Description: Companion component to Metron that receives Statsd and emits Dropsonde to Metron

Created: 2015-05-20 21:57:18.0

Updated: 2018-03-20 21:29:29.0

Pushed: 2018-03-20 21:29:27.0

Homepage: null

Size: 594

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

statsd-injector

Companion component to Metron that receives Statsd and emits Dropsonde to Metron

Getting started

The following instructions may help you get started with statsd-injector in a standalone environment.

External Dependencies

To start, you must have the latest version of Go installed and on your PATH.

Then, choose one of the following:

Running from the bosh release

The statsd-injector-release repository contains a complete GOPATH with all of the statsd-injector's dependencies frozen at known working versions. Working from that repository will guarantee the best compatibility with the bosh release.

To work from within the bosh release:

  1. Clone https://github.com/cloudfoundry/statsd-injector-release
  2. From the statsd-injector-release directory:
  3. Run git submodule update --init --recursive
  4. If you're not using direnv, run source .envrc
Running with go get
Running Tests

We are using Ginkgo, to run tests. To run the tests, execute the following from the top level directory of this repository:

go -r -race -randomizeAllSpecs
Including statsd-injector in a bosh deployment

As an example, if you want the injector to be present on loggregator boxes, add the following in cf-lamb.yml

oggregator_templates:
 name: doppler
 release: (( lamb_meta.release.name ))
 name: syslog_drain_binder
 release: (( lamb_meta.release.name ))
 name: metron_agent
 release: (( lamb_meta.release.name ))
 name: statsd-injector
 release: (( lamb_meta.release.name ))
Emitting metrics to the statsd-injector

You can emit statsd metrics to the injector by sending a correctly formatted message to udp port 8125

As an example using netcat:

 "origin.some.counter:1|c" | nc -u -w0 127.0.0.1 8125

You should see the metric come out of the firehose.

The injector expects the the name of the metric to be of the form <origin>.<metric_name>


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.