Code Monkey home page Code Monkey logo

gostatsd's Introduction

gostatsd

An implementation of Etsy's statsd in Go.

The project provides both a server called "gostatsd" which works much like Etsy's version, but also provides a library for developing customized servers.

Building the server

From the gostatsd/ directory run go build. The binary will be built in place and called gostatsd

Running the server

gostatsd -help gives a complete description of available options and their defaults.

Sending metrics

The server listens for UDP packets on the address given by the -l flag, aggregates them, then sends them to graphite server address given by the -g flag.

The format of each metric is:

<bucket name>:<value>|<type>\n
  • <bucket name> is a string like abc.def.g, just like a graphite bucket name
  • <value> is a string representation of a floating point number
  • <type> is one of c, g, or ms for "counter", "gauge", and "timer" respectively.

A single packet can contain multiple metrics, each ending with a newline.

A simple way to test your installation or send metrics from a script is to use echo and the netcat utility nc:

echo 'abc.def.g:10|c' | nc -w1 -u localhost 8125

Monitoring

Currently you can get some basic idea of the status of the server by visiting the address given by the -c option with your web browser.

Using the library

In your source code:

import "github.com/kisielk/gostatsd/statsd"

Documentation can be found via go doc github.com/kisielk/gostatsd/statsd or at http://godoc.org/github.com/kisielk/gostatsd/statsd

gostatsd's People

Contributors

kisielk avatar paulhammond avatar

Watchers

kkk avatar James Cloos avatar

Forkers

deanthompson

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.